Skip to content

cross-compiling fails #1534

@saruvora

Description

@saruvora

Hi I have changed some thing in the CMakeLists.txt for cross-compiling for arm-linux-gnueabihf.
My PC is running debian and arm as well.

set(CMAKE_INSTALL_PREFIX "/path/to/arm")
# Specify the cross-compiler
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc-10)

and then I run:

cmake -D HAVE_LINUXGPIO=1 -D HAVE_LIBELF=1 -D HAVE_LIBUSB=1 -D HAVE_LIBHIDAPI=0 -D HAVE_LIBFTDI1=1 -D HAVE_LIBUSB_1_0=1 -D HAVE_LIBREADLINE=0 -B build_arm

I run into following errors I have already install libusb-1-0.0-dev :

Determining if the include file libelf/libelf.h exists failed with the following output:
Change Dir: /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_80844/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_80844.dir/build.make CMakeFiles/cmTC_80844.dir/build
gmake[1]: Entering directory '/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_80844.dir/CheckIncludeFile.c.o
/usr/bin/cc --sysroot=/../   -std=gnu11 -o CMakeFiles/cmTC_80844.dir/CheckIncludeFile.c.o -c /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: libelf/libelf.h: No such file or directory
    1 | #include <libelf/libelf.h>

      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
gmake[1]: *** [CMakeFiles/cmTC_80844.dir/build.make:85: CMakeFiles/cmTC_80844.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory '/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_80844/fast] Error 2
Determining if the include file lusb0_usb.h exists failed with the following output:
Change Dir: /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_fb0e5/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_fb0e5.dir/build.make CMakeFiles/cmTC_fb0e5.dir/build
gmake[1]: Entering directory '/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_fb0e5.dir/CheckIncludeFile.c.o
/usr/bin/cc --sysroot=/../   -std=gnu11 -o CMakeFiles/cmTC_fb0e5.dir/CheckIncludeFile.c.o -c /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: lusb0_usb.h: No such file or directory
    1 | #include <lusb0_usb.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
gmake[1]: *** [CMakeFiles/cmTC_fb0e5.dir/build.make:85: CMakeFiles/cmTC_fb0e5.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory '/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_fb0e5/fast] Error 2
Determining if the ftdi_tcioflush exist failed with the following output:
Change Dir: /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_968ef/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_968ef.dir/build.make CMakeFiles/cmTC_968ef.dir/build
gmake[1]: Entering directory '/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_968ef.dir/CheckSymbolExists.c.o
/usr/bin/cc --sysroot=/../   -std=gnu11 -o CMakeFiles/cmTC_968ef.dir/CheckSymbolExists.c.o -c /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp/CheckSymbolExists.c
gmake[1]: *** No rule to make target '/home/developer/avrdude-7.2_/1', needed by 'cmTC_968ef'.  Stop.
gmake[1]: Leaving directory '/home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_968ef/fast] Error 2
File /home/developer/avrdude-7.2_/build_arm/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <libftdi1/ftdi.h>
int main(int argc, char** argv)
{
 (void)argv;
#ifndef ftdi_tcioflush
  return ((int*)(&ftdi_tcioflush))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Can someone help me resolve this issue, please?
Also, is it possible to flash Atxmega256A3u which is connected to the armv7l via UARTD0? without any extra hardware except USB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested, or not an issue but a technical question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions