This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Cannot build for Thingy91

Trying to build asset tracker for Thingy91 following the instructions at
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thingy91.html

I get:

and:

Output:

Loading solution asset_tracker.emProject
Executing load commands
cmake -GNinja -DBOARD=thingy91_nrf9160ns -DBOARD_DIR=C:/Users/mario.raposo/ncs/v1.3.1/nrf/boards/arm/thingy91_nrf9160 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt -BC:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns -HC:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Users/mario.raposo/ncs/v1.3.1/toolchain/segger_embedded_studio/html/configure_nordic_project_menuconfig.py
Including boilerplate (Zephyr base (cached)): C:/Users/mario.raposo/ncs/v1.3.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker
-- Using NCS Toolchain 1.3.0 for building. (C:/Users/mario.raposo/ncs/v1.3.1/toolchain/cmake)
-- Zephyr version: 2.3.0-rc1 (C:/Users/mario.raposo/ncs/v1.3.1/zephyr)
-- Board: thingy91_nrf9160ns
-- Found west: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/Scripts/west.exe (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt)
-- Found BOARD.dts: C:/Users/mario.raposo/ncs/v1.3.1/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts
-- Generated zephyr.dts: C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
Parsing C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/Kconfig
Loaded configuration 'C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/.config'
No change to configuration in 'C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/.config'
No change to Kconfig header in 'C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/include/generated/autoconf.h'
-- Cache files will be written to: C:/Users/mario.raposo/ncs/v1.3.1/zephyr/.cache
CMake Error at C:/Users/mario.raposo/ncs/v1.3.1/zephyr/cmake/extensions.cmake:1457 (message):
Assertion failed: The toolchain is unable to build a dummy C file. See
CMakeError.log.

And CMakeError.log:

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
Build flags:
Id flags:

The output was:
1
c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
Build flags:
Id flags:

The output was:
1
c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status





Parents Reply Children
  • Deleted it and still get the same issue:

    No change to Kconfig header in 'C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/include/generated/autoconf.h'
    -- Cache files will be written to: C:/Users/mario.raposo/ncs/v1.3.1/zephyr/.cache
    CMake Error at C:/Users/mario.raposo/ncs/v1.3.1/zephyr/cmake/extensions.cmake:1457 (message):
    Assertion failed: The toolchain is unable to build a dummy C file. See
    CMakeError.log.
    Call Stack (most recent call first):
    C:/Users/mario.raposo/ncs/v1.3.1/zephyr/CMakeLists.txt:42 (assert)


    -- Configuring incomplete, errors occurred!
    See also "C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/mario.raposo/ncs/v1.3.1/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeError.log".
    Project load failed
    Reported error: solution load command failed (1)

  • Also tried to manually install following the instructions.
    At: 

    pip3 install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt

    I get:

    Installing collected packages: lxml, gcovr, coverage, toml, py, atomicwrites, attrs, pluggy, iniconfig, pytest, typed-ast, typing-extensions, mypy-extensions, mypy, mock, docutils, Pygments, sphinxcontrib-htmlhelp, idna, chardet, certifi, urllib3, requests, sphinxcontrib-devhelp, sphinxcontrib-jsmath, sphinxcontrib-qthelp, sphinxcontrib-applehelp, sphinxcontrib-serializinghtml, snowballstemmer, alabaster, imagesize, pytz, babel, sphinx, breathe, sphinx-rtd-theme, sphinx-tabs, sphinxcontrib-svg2pdfconverter, pyserial, naturalsort, appdirs, pycparser, cffi, milksnake, cmsis-pack-manager, psutil, future, pylink-square, pywinusb, sortedcontainers, intervaltree, pyusb, wcwidth, prettytable, pyocd, tabulate, cbor, Click, arrow, gitlint, junit2html, lpc-checksum, Pillow, python-magic, junitparser, isort, mccabe, lazy-object-proxy, astroid, pylint
    Running setup.py install for lxml ... error
    ERROR: Command errored out with exit status 1:
    command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mario.raposo\\AppData\\Local\\Temp\\pip-install-y6mv_1ud\\lxml\\setup.py'"'"'; __file__='"'"'C:\\Users\\mario.raposo\\AppData\\Local\\Temp\\pip-install-y6mv_1ud\\lxml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mario.raposo\AppData\Local\Temp\pip-record-gkx4t3ib\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\lxml'
    cwd: C:\Users\mario.raposo\AppData\Local\Temp\pip-install-y6mv_1ud\lxml\
    Complete output (74 lines):
    Building lxml version 4.5.2.
    Building without Cython.
    Building against pre-built libxml2 andl libxslt libraries
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\lxml
    copying src\lxml\builder.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\cssselect.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\sax.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\__init__.py -> build\lib.win-amd64-3.9\lxml
    creating build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.9\lxml\includes
    creating build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\builder.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\clean.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\defs.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\diff.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.9\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.9\lxml\html
    creating build\lib.win-amd64-3.9\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.9\lxml\isoschematron
    copying src\lxml\etree.h -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\etree_api.h -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.9\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.9\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.9\lxml\includes
    creating build\lib.win-amd64-3.9\lxml\isoschematron\resources
    creating build\lib.win-amd64-3.9\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\rng
    creating build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl
    creating build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.9\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": visualstudio.microsoft.com/.../
    ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mario.raposo\\AppData\\Local\\Temp\\pip-install-y6mv_1ud\\lxml\\setup.py'"'"'; __file__='"'"'C:\\Users\\mario.raposo\\AppData\\Local\\Temp\\pip-install-y6mv_1ud\\lxml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mario.raposo\AppData\Local\Temp\pip-record-gkx4t3ib\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\lxml' Check the logs for full command output.

    However, I have build tools for visual studio installed.

Related