Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The toolchain is unable to build a dummy C file #176

Open
lorepieri8 opened this issue Apr 23, 2019 · 2 comments
Open

The toolchain is unable to build a dummy C file #176

lorepieri8 opened this issue Apr 23, 2019 · 2 comments
Labels
bug Something isn't working macOS macOS related issues. Setup Issue Build or installation is failing

Comments

@lorepieri8
Copy link
Member

lorepieri8 commented Apr 23, 2019

Describe the bug
The toolchain is unable to build a dummy C file.

To Reproduce
in zephyr folder:
export GNUARMEMB_TOOLCHAIN_PATH="~/opt/gcc-arm-none-eabi-7-2018-q2-update/"
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
source zephyr-env.sh
the do the anyledger zephyr build and
cmake -GNinja -DBOARD=nrf52840_pca10056 -DBUILD_XCOMPILE=1 ../

Desktop (please complete the following information):

  • OS: macOS
  • Zephyr Kernel: 1.14.0
  • Toolchain: gcc-arm-none-eabi-7-2018-q2-update

Additional context

lorenzo@MacBook-Air-di-Lorenzo ~/gitHubRepo/recentZephyr/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build $ cmake -GNinja -DBOARD=nrf52840_pca10056 -DBUILD_XCOMPILE=1 ../
-- Found PythonInterp: /Users/lorenzo/anaconda/bin/python3 (found suitable version "3.6", minimum required is "3") 
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Zephyr version: 1.14.99
-- Found PythonInterp: /Users/lorenzo/anaconda/bin/python3 (found suitable version "3.6.0", minimum required is "3.4") 
-- Selected BOARD nrf52840_pca10056
-- Found west: /Library/Frameworks/Python.framework/Versions/3.6/bin/west (found suitable version "0.5.7", minimum required is "0.5.6")
-- Loading /Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts as base
-- Overlaying /Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/dts/common/common.dts
Parsing Kconfig tree in /Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/Kconfig
Loading /Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056_defconfig as base
Merging /Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/prj.conf
Configuration written to '/Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build/zephyr/.config'

warning: TEST_RANDOM_GENERATOR (defined at subsys/random/Kconfig:8) was assigned the value 'y' but
got the value 'n'. You can check symbol information (including dependencies) in the 'menuconfig'
interface (see the Application Development Primer section of the manual), or in the Kconfig
reference at
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TEST_RANDOM_GENERATOR.html (which is
updated regularly from the master branch). See the 'Setting configuration values' section of the
Board Porting Guide as well.
-- Cache files will be written to: /Users/lorenzo/Library/Caches/zephyr
-- The ASM compiler identification is GNU
-- Found assembler: /Users/lorenzo/opt/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Failed
CMake Error at ../../../cmake/extensions.cmake:1150 (message):
  Assertion failed: The toolchain is unable to build a dummy C file.  See
  CMakeError.log.
Call Stack (most recent call first):
  ../../../CMakeLists.txt:30 (assert)


-- Configuring incomplete, errors occurred!
See also "/Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build/CMakeFiles/CMakeOutput.log".
See also "/Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build/CMakeFiles/CMakeError.log".

CMakeError.log:

Performing C SOURCE FILE Test toolchain_is_ok failed with the following output:
Change Dir: /Users/lorenzo/gitHubRepo/recentZephyr/zephyrproject/zephyr/samples/anyledger/anyledger-wallet/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_873b2 
[1/2] Building C object CMakeFiles/cmTC_873b2.dir/src.c.o
clang: warning: -Wl,--unresolved-symbols=ignore-in-object-files: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nostartfiles' [-Wunused-command-line-argument]
[2/2] Linking C executable cmTC_873b2
FAILED: cmTC_873b2 
: && /Library/Developer/CommandLineTools/usr/bin/cc -Dtoolchain_is_ok -nostartfiles -nostdlib -isystem "/Users/lorenzo/opt/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/include" -isystem "/Users/lorenzo/opt/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed" -Wl,--unresolved-symbols=ignore-in-object-files -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/cmTC_873b2.dir/src.c.o  -o cmTC_873b2   && :
ld: unknown option: --unresolved-symbols=ignore-in-object-files
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }
@lorepieri8 lorepieri8 added bug Something isn't working High Priority It creates bottlenecks or it's needed asap. Setup Issue Build or installation is failing macOS macOS related issues. and removed High Priority It creates bottlenecks or it's needed asap. labels Apr 23, 2019
@lybrus
Copy link

lybrus commented Dec 25, 2019

Hi!
Are there any updates?

@embeddedninja
Copy link

I saw a similar issue. Solution posted here worked for me:
https://devzone.nordicsemi.com/f/nordic-q-a/55475/the-toolchain-is-unable-to-build-a-dummy-c-file/225042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS macOS related issues. Setup Issue Build or installation is failing
Projects
None yet
Development

No branches or pull requests

3 participants