Skip to content

Can't build Arduino_101 on Mac following instructions #5807

@jimmy-huang

Description

@jimmy-huang

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

Metadata

Metadata

Assignees

Labels

area: ToolchainsToolchainsbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions