rauc / rauc-hawkbit-updater

The RAUC hawkBit updater is a simple commandline tool/daemon that runs on your target and interfaces between RAUC and hawkBit's DDI API.
https://rauc-hawkbit-updater.readthedocs.io
GNU Lesser General Public License v2.1
58 stars 36 forks source link

"CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rauc-hawkbit-updater.dir/all' failed" - when cross compiling with aarch64 #131

Closed surabhiashok1 closed 2 years ago

surabhiashok1 commented 2 years ago

I am cross compiling the rauc-hawkbit-updater with aarch64. I created tool chain file and added the cross compiler related options and cmake was successful. but make command is giving the error. The build error log of make command is below.

/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/libio.h:154:14: error: parameter '_IO_lock_t' has incomplete type
 typedef void _IO_lock_t;
              ^
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/libio.h:154:14: error: declaration for parameter '_IO_lock_t' but no such parameter
In file included from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/libio.h:49:0,
                 from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/stdio.h:74,
                 from /home/unknown/Music/rauc-hawkbit-updater-master/src/rauc-hawkbit-updater.c:10:
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/4.9.3/include/stdarg.h:40:27: error: declaration for parameter '__gnuc_va_list' but no such parameter
 typedef __builtin_va_list __gnuc_va_list;
                           ^
In file included from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/libio.h:31:0,
                 from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/stdio.h:74,
                 from /home/unknown/Music/rauc-hawkbit-updater-master/src/rauc-hawkbit-updater.c:10:
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/_G_config.h:30:3: error: declaration for parameter '_G_fpos64_t' but no such parameter
 } _G_fpos64_t;
   ^
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/_G_config.h:25:3: error: declaration for parameter '_G_fpos_t' but no such parameter
 } _G_fpos_t;
   ^
In file included from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/_G_config.h:20:0,
                 from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/libio.h:31,
                 from /opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/stdio.h:74,
                 from /home/unknown/Music/rauc-hawkbit-updater-master/src/rauc-hawkbit-updater.c:10:
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/wchar.h:94:3: error: declaration for parameter '__mbstate_t' but no such parameter
 } __mbstate_t;
   ^
In file included from /home/unknown/Music/rauc-hawkbit-updater-master/src/rauc-hawkbit-updater.c:10:0:
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/stdio.h:64:25: error: parameter '__FILE' has incomplete type
 typedef struct _IO_FILE __FILE;
                         ^
/opt/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/libc/usr/include/stdio.h:64:25: error: declaration for parameter '__FILE' but no such parameter
/home/unknown/Music/rauc-hawkbit-updater-master/src/rauc-hawkbit-updater.c:164:1: error: expected '{' at end of input
 }
 ^
/home/unknown/Music/rauc-hawkbit-updater-master/src/rauc-hawkbit-updater.c:164:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
CMakeFiles/rauc-hawkbit-updater.dir/build.make:71: recipe for target 'CMakeFiles/rauc-hawkbit-updater.dir/src/rauc-hawkbit-updater.c.o' failed
make[2]: *** [CMakeFiles/rauc-hawkbit-updater.dir/src/rauc-hawkbit-updater.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rauc-hawkbit-updater.dir/all' failed
make[1]: *** [CMakeFiles/rauc-hawkbit-updater.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
ejoerns commented 2 years ago

This looks like an issue within your toolchain as most of these errors are caused by your toolchain's headers.

Seems unrelated to rauc-hawkbit-updater.

Feel free to use a toolchain from this century.