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

Building hello_world failed #23418

Closed
swapnabulbule opened this issue Mar 12, 2020 · 2 comments
Closed

Building hello_world failed #23418

swapnabulbule opened this issue Mar 12, 2020 · 2 comments
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@swapnabulbule
Copy link

I have followed steps as per guid https://docs.zephyrproject.org/latest/getting_started/index.html#
Until step 6, building the application,receiving error.
OS: Ubuntu 18.04

  1. export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
    export ZEPHYR_SDK_INSTALL_DIR=/home/swapna/Documents/Workspace/Zephyr_ESP

west build -p auto -b esp32 samples/hello_world
-- west build: build configuration:
source directory: /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/samples/hello_world
build directory: /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build (created)
BOARD: esp32 (origin: command line)
-- west build: generating a build system
-- Zephyr version: 2.2.0-rc3
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.9", minimum required is "3.6")
-- Selected BOARD esp32
-- Found west: /home/swapna/.local/bin/west (found suitable version "0.7.2", minimum required is "0.6.0")
-- Loading /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts as base
Devicetree header saved to '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h'
Parsing /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig'
Merged configuration '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
CMake Error at /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/cmake/extensions.cmake:1479 (message):
No such file or directory: LIBGCC_FILE_NAME: ''
Call Stack (most recent call first):
/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:69 (assert_exists)
/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/cmake/target_toolchain.cmake:49 (include)
/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/cmake/app/boilerplate.cmake:476 (include)
CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /home/swapna/bin/cmake/cmake-3.16.4-Linux-x86_64/bin/cmake -B/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build -S/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=esp32

I have tried couple of things changing variant and tool chain.

  1. export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
    export CROSS_COMPILE=/usr/bin/arm-none-eabi-

I have followed steps as per guid https://docs.zephyrproject.org/latest/getting_started/index.html#
Until step 6, building the application,receiving error.

swapna@18:~/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr$ west build -p auto -b esp32 samples/hello_world
-- west build: build configuration:
source directory: /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/samples/hello_world
build directory: /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build (created)
BOARD: esp32 (origin: command line)
-- west build: generating a build system
-- Zephyr version: 2.2.0-rc3
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.9", minimum required is "3.6")
-- Selected BOARD esp32
-- Found west: /home/swapna/.local/bin/west (found suitable version "0.7.2", minimum required is "0.6.0")
-- Loading /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts as base
Devicetree header saved to '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h'
Parsing /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig'
Merged configuration '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Cache files will be written to: /home/swapna/.cache/zephyr
CMake Warning at /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/boards/common/esp32.board.cmake:7 (message):
Setting ESP_IDF_PATH in the environment is deprecated. Use cmake
-DESP_IDF_PATH=... instead.
Call Stack (most recent call first):
/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/boards/xtensa/esp32/board.cmake:3 (include)
/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/cmake/app/boilerplate.cmake:506 (include)
CMakeLists.txt:5 (include)

-- Configuring done
-- Generating done
-- Build files have been written to: /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build
-- west build: building application
[1/122] Preparing syscall dependency handling

[7/122] Building C object zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj
FAILED: zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj
ccache /usr/bin/arm-none-eabi-gcc -DBUILD_VERSION=v2.2.0-rc3-20-gcfd0f3e18d01 -DKERNEL -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I../kernel/include -I../arch/xtensa/include -I../include -Izephyr/include/generated -I../soc/xtensa/esp32 -I../soc/xtensa/esp32/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/modules/hal/esp-idf/zephyr/../components/esp32/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/modules/hal/esp-idf/zephyr/../components/soc/esp32/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/modules/hal/xtensa/include -I/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/modules/hal/xtensa/zephyr/soc/esp32 -isystem ../lib/libc/minimal/include -isystem /usr/lib/gcc/arm-none-eabi/6.3.1/include -isystem /usr/lib/gcc/arm-none-eabi/6.3.1/include-fixed -Os -imacros/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros/home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj -c /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/arch/xtensa/core/offsets/offsets.c
/tmp/ccTtYhaH.s: Assembler messages:
/tmp/ccTtYhaH.s:35: Error: bad expression
/tmp/ccTtYhaH.s:35: Error: junk at end of line, first unrecognized character is 8' /tmp/ccTtYhaH.s:41: Error: bad expression /tmp/ccTtYhaH.s:41: Error: junk at end of line, first unrecognized character is 0'
/tmp/ccTtYhaH.s:47: Error: bad expression
/tmp/ccTtYhaH.s:47: Error: junk at end of line, first unrecognized character is 4' /tmp/ccTtYhaH.s:53: Error: bad expression /tmp/ccTtYhaH.s:53: Error: junk at end of line, first unrecognized character is 8'
/tmp/ccTtYhaH.s:59: Error: bad expression
/tmp/ccTtYhaH.s:59: Error: junk at end of line, first unrecognized character is 0' /tmp/ccTtYhaH.s:65: Error: bad expression /tmp/ccTtYhaH.s:65: Error: junk at end of line, first unrecognized character is 4'
/tmp/ccTtYhaH.s:71: Error: bad expression
/tmp/ccTtYhaH.s:71: Error: junk at end of line, first unrecognized character is 5' /tmp/ccTtYhaH.s:77: Error: bad expression /tmp/ccTtYhaH.s:77: Error: junk at end of line, first unrecognized character is 0'
/tmp/ccTtYhaH.s:83: Error: bad expression
/tmp/ccTtYhaH.s:83: Error: junk at end of line, first unrecognized character is 6' /tmp/ccTtYhaH.s:89: Error: bad expression /tmp/ccTtYhaH.s:89: Error: junk at end of line, first unrecognized character is 1'
/tmp/ccTtYhaH.s:95: Error: bad expression
/tmp/ccTtYhaH.s:95: Error: junk at end of line, first unrecognized character is 1' /tmp/ccTtYhaH.s:101: Error: bad expression /tmp/ccTtYhaH.s:101: Error: junk at end of line, first unrecognized character is 1'
/tmp/ccTtYhaH.s:107: Error: bad expression
/tmp/ccTtYhaH.s:107: Error: junk at end of line, first unrecognized character is 1' /tmp/ccTtYhaH.s:113: Error: bad expression /tmp/ccTtYhaH.s:113: Error: junk at end of line, first unrecognized character is 1'
/tmp/ccTtYhaH.s:119: Error: bad expression
/tmp/ccTtYhaH.s:119: Error: junk at end of line, first unrecognized character is 2' /tmp/ccTtYhaH.s:125: Error: bad expression /tmp/ccTtYhaH.s:125: Error: junk at end of line, first unrecognized character is 0'
/tmp/ccTtYhaH.s:131: Error: bad expression
/tmp/ccTtYhaH.s:131: Error: junk at end of line, first unrecognized character is 4' /tmp/ccTtYhaH.s:137: Error: bad expression /tmp/ccTtYhaH.s:137: Error: junk at end of line, first unrecognized character is 7'
/tmp/ccTtYhaH.s:143: Error: bad expression
/tmp/ccTtYhaH.s:143: Error: junk at end of line, first unrecognized character is 6' /tmp/ccTtYhaH.s:149: Error: bad expression /tmp/ccTtYhaH.s:149: Error: junk at end of line, first unrecognized character is 1'
/tmp/ccTtYhaH.s:155: Error: bad expression
/tmp/ccTtYhaH.s:155: Error: junk at end of line, first unrecognized character is 1' /tmp/ccTtYhaH.s:162: Error: bad expression /tmp/ccTtYhaH.s:162: Error: junk at end of line, first unrecognized character is 4'
/tmp/ccTtYhaH.s:168: Error: bad expression
/tmp/ccTtYhaH.s:168: Error: junk at end of line, first unrecognized character is 0' /tmp/ccTtYhaH.s:174: Error: bad expression /tmp/ccTtYhaH.s:174: Error: junk at end of line, first unrecognized character is 8'
/tmp/ccTtYhaH.s:180: Error: bad expression
/tmp/ccTtYhaH.s:180: Error: junk at end of line, first unrecognized character is 0' /tmp/ccTtYhaH.s:186: Error: bad expression /tmp/ccTtYhaH.s:186: Error: junk at end of line, first unrecognized character is 0'
/tmp/ccTtYhaH.s:192: Error: bad expression
/tmp/ccTtYhaH.s:192: Error: junk at end of line, first unrecognized character is 0' /tmp/ccTtYhaH.s:198: Error: bad expression /tmp/ccTtYhaH.s:198: Error: junk at end of line, first unrecognized character is 4'
/tmp/ccTtYhaH.s:204: Error: bad expression
/tmp/ccTtYhaH.s:204: Error: junk at end of line, first unrecognized character is 8' /tmp/ccTtYhaH.s:210: Error: bad expression /tmp/ccTtYhaH.s:210: Error: junk at end of line, first unrecognized character is 9'
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/swapna/bin/cmake/cmake-3.16.4-Linux-x86_64/bin/cmake --build /home/swapna/Documents/Workspace/Zephyr_ESP/zephyrproject/zephyr/build

I am not sure which variant and toolchain

@swapnabulbule swapnabulbule added the bug The issue is a bug, or the PR is fixing a bug label Mar 12, 2020
@nashif
Copy link
Member

nashif commented Mar 12, 2020

west build -b esp32 samples/hello_world/
-- west build: generating a build system
-- Application: /home/nashif/Work/zephyrproject/zephyr/samples/hello_world
-- Zephyr version: 2.2.99
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.6", minimum required is "3.6")
-- Board: esp32
-- Found west: /home/nashif/.local/bin/west (found suitable version "0.7.2", minimum required is "0.6.0")
-- Found toolchain: espressif (/home/nashif/Work/SDK/xtensa-esp32-elf)
-- Loading /home/nashif/Work/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts as base
Devicetree header saved to '/home/nashif/Work/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h'
Parsing /home/nashif/Work/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/nashif/Work/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig'
Merged configuration '/home/nashif/Work/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home/nashif/Work/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/nashif/Work/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 5.2.0
-- The CXX compiler identification is GNU 5.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/nashif/Work/SDK/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Cache files will be written to: /home/nashif/.cache/zephyr
CMake Warning at /home/nashif/Work/zephyrproject/zephyr/boards/common/esp32.board.cmake:7 (message):
  Setting ESP_IDF_PATH in the environment is deprecated.  Use cmake
  -DESP_IDF_PATH=...  instead.
Call Stack (most recent call first):
  /home/nashif/Work/zephyrproject/zephyr/boards/xtensa/esp32/board.cmake:3 (include)
  /home/nashif/Work/zephyrproject/zephyr/cmake/app/boilerplate.cmake:508 (include)
  CMakeLists.txt:5 (include)


-- Configuring done
-- Generating done
-- Build files have been written to: /home/nashif/Work/zephyrproject/zephyr/build
-- west build: building application
[1/122] Preparing syscall dependency handling

[122/122] Linking C executable zephyr/zephyr.elf

You are not using the right toolchain, please follow the documentation.

@nashif nashif closed this as completed Mar 12, 2020
@swapnabulbule
Copy link
Author

Can I know which toolchain are using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants