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

XCC Build offsets.c :FAILED #29937

Closed
hongshui3000 opened this issue Nov 11, 2020 · 2 comments
Closed

XCC Build offsets.c :FAILED #29937

hongshui3000 opened this issue Nov 11, 2020 · 2 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@hongshui3000
Copy link
Contributor

hongshui3000 commented Nov 11, 2020

Describe the bug
Build FAIL:
file:mem_domain.h

struct k_thread;
typedef struct k_thread *k_tid_t;

Build PASS:
file:mem_domain.h

struct k_thread;
typedef struct k_thread *k_tid_tXXXX;

To Reproduce
Steps to reproduce the behavior:
west build -b qemu_xtensa samples/hello_world

Logs and console output
FAILED: zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj
C:\usr\xtensa\XtDevTools\install\tools\RI-2020.5-win32\XtensaTools\bin\xt-xcc.exe -DBUILD_VERSION=zephyr-v2.4.0-1113-g0bcd66ac36d8 -DKERNEL -D_FORTIFY_SOURCE=2
-D__ZEPHYR__=1 -I../kernel/include -I../arch/xtensa/include -I../include -Izephyr/include/generated -I../soc/xtensa/sample_controller -I../soc/xtensa/sample_controller/include -IE:/work/rtos_work/zephyrproject/modules/hal/xtensa/include -IE:/work/rtos_work/zephyrproject/modules/hal/xtensa/zephyr/soc/sample_controller -isystem ../lib/libc/minimal/include -Os -imacros E:/work/rtos_work/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g
-imacrosE:/work/rtos_work/zephyrproject/zephyr/include/toolchain/xcc_missing_defs.h -fms-extensions -imacros E:/work/rtos_work/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Werror=implicit-int -fno-pic -fno-strict-overflow -ffunction-sections -fdata-sections -mlongcalls -std=c99 -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 E:/work/rtos_work/zephyrproject/zephyr/arch/xtensa/core/offsets/offsets.c
In file included from E:/work/rtos_work/zephyrproject/zephyr/arch/xtensa/core/offsets/offsets.c:27:
../include/kernel.h:380: error: redefinition of typedef 'k_tid_t'
../include/app_memory/mem_domain.h:22: error: previous declaration of 'k_tid_t' was here
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'E:\work\rtos_work\zephyrproject\zephyr\build'

Environment (please complete the following information):

  • OS: Windows
  • Toolchain :XCC(Xplorer 8.0.15)
@hongshui3000 hongshui3000 added the bug The issue is a bug, or the PR is fixing a bug label Nov 11, 2020
@nashif
Copy link
Member

nashif commented Nov 11, 2020

this should be addressed with #29359

@nashif nashif added the priority: medium Medium impact/importance bug label Nov 11, 2020
@nashif nashif self-assigned this Nov 11, 2020
@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Jan 11, 2021
@nashif nashif removed the Stale label Jan 12, 2021
nashif added a commit to nashif/zephyr that referenced this issue Jan 13, 2021
Move thread definitions to its own header to avoid redeclaration and
redefinition of types which is not allowed in some standards.

Fixes zephyrproject-rtos#29937

Signed-off-by: Anas Nashif <[email protected]>
@nashif nashif closed this as completed in fc1b5de Jan 13, 2021
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 priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants