Can't build Arduino_101 on Mac following instructions #5807
Labels
area: Toolchains
Toolchains
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Milestone
Using the 1.10.0 release, after I build crosstool-ng, I am unable to build the arduino_101 target on MacOS Sierra:
It first said that it can't find the toolchain:
-- Generating zephyr/include/generated/autoconf.h
CMake Error at /Users/zhuang1/projects/zephyrjs/zephyr.js/deps/zephyr/cmake/extensions.cmake:811 (message):
No such file or directory: CMAKE_READELF:
'/Volumes/CrossToolNG/x-tools/i586-zephyr-elfiamcu/bin/i586-zephyr-elfiamcu-readelf'
So it turns out that after building crosstool-ng, the tool chain is located under
/Volumes/CrossToolNG/x-tools/i586-zephyr-elf/i586-zephyr-elf
So I commented out this line at cmake/toolchain-xtools.cmake:
#set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
then I I pass in the actual path:
cmake -DBOARD=arduino_101 -DCROSS_COMPILE=/Volumes/CrossToolNG/x-tools/i586-zephyr-elf/bin/i586-zephyr-elf- ..
then it fails to build with make:
[ 92%] Linking C executable zephyr_prebuilt.elf
/Volumes/CrossToolNG/x-tools/i586-zephyr-elf/lib/gcc/i586-zephyr-elf/6.3.0/../../../../i586-zephyr-elf/bin/ld: Warning: size of symbol `main' changed from 22 in ../libapp.a(main.c.obj) to 5 in kernel/libkernel.a(init.c.obj)
/Volumes/CrossToolNG/x-tools/i586-zephyr-elf/lib/gcc/i586-zephyr-elf/6.3.0/../../../../i586-zephyr-elf/bin/ld: skipping incompatible /Volumes/CrossToolNG/x-tools/i586-zephyr-elf/lib/gcc/i586-zephyr-elf/6.3.0/libgcc.a when searching for -lgcc
/Volumes/CrossToolNG/x-tools/i586-zephyr-elf/lib/gcc/i586-zephyr-elf/6.3.0/../../../../i586-zephyr-elf/bin/ld: skipping incompatible /Volumes/CrossToolNG/x-tools/i586-zephyr-elf/lib/gcc/i586-zephyr-elf/6.3.0/libgcc.a when searching for -lgcc
/Volumes/CrossToolNG/x-tools/i586-zephyr-elf/lib/gcc/i586-zephyr-elf/6.3.0/../../../../i586-zephyr-elf/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1
make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: