Hi,
I am trying to cross compile a third party logging agent so it can run on my Openwrt router. I am following the instructions provided on this link: https://openwrt.org/docs/guide-developer/crosscompile
Some further details:
- SDK: openwrt-sdk-19.07.2-mvebu-cortexa9_gcc-7.5.0_musl_eabi.Linux-x86_64.tar.xz
- Agent is fluent-bit: https://github.com/fluent/fluent-bit#build-from-scratch
- Build host is Ubuntu 18 (VM)
And the commands I issue are:
cmake ..
make CC=arm-openwrt-linux-muslgnueabi-gcc LD=arm-openwrt-linux-muslgnueabi-ld
Sadly I am getting the following error:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for gcc... arm-openwrt-linux-muslgnueabi-gcc LD=arm-openwrt-linux-muslgnueabi-ld
checking whether the C compiler works... no
configure: error: in `/home/ubuntu/fluent-bit-1.4.4/build/backtrace-prefix/src/backtrace-build':
configure: error: C compiler cannot create executables
See `config.log' for more details
CMakeFiles/backtrace.dir/build.make:105: recipe for target 'backtrace-prefix/src/backtrace-stamp/backtrace-configure' failed
make[2]: *** [backtrace-prefix/src/backtrace-stamp/backtrace-configure] Error 77
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/backtrace.dir/all' failed
make[1]: *** [CMakeFiles/backtrace.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
I tested running the gcc compiler manually "arm-openwrt-linux-muslgnueabi-gcc --version" and it works so path seems to be correct.
Any suggestions? Thanks for your help!