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

intel_adsp_cavs25: can not build multiple tests under tests/posix/ and tests/lib/newlib/ #44926

Closed
LixinGuoX opened this issue Apr 18, 2022 · 0 comments · Fixed by #44930
Closed
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms

Comments

@LixinGuoX
Copy link
Collaborator

LixinGuoX commented Apr 18, 2022

Describe the bug
After this PR: #44529 merged, multiple tests with specific config can not build successfully on intel_adsp_cavs25.

tests/lib/newlib/heap_listener
tests/lib/newlib/thread_safety
tests/posix/fs
tests/posix/common

To Reproduce
Steps to reproduce the behavior:

  1. cmake -B build1 -DBOARD=intel_adsp_cavs25 -GNinja -S tests/posix/common/ -DCONFIG_NEWLIB_LIBC=y
  2. cd build1/
  3. ninja
  4. See error

Or using twister:

  1. twister -p intel_adsp_cavs25 -T tests/posix/ -T tests/lib/newlib/ -v

Expected behavior
Test cases should build smoothly.

Logs and console output

Loading Zephyr default modules (Zephyr base).
-- Application: /home/guo/zephyrproject/zephyr/tests/posix/common
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
-- Cache files will be written to: /home/guo/.cache/zephyr
-- Zephyr version: 3.0.99 (/home/guo/zephyrproject/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: intel_adsp_cavs25
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.13.2 (/home/guo/zephyr-sdk-0.13.2)
-- Found dtc: /home/guo/zephyr-sdk-0.13.2/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.13.2 (/home/guo/zephyr-sdk-0.13.2)
-- Found BOARD.dts: /home/guo/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs25/intel_adsp_cavs25.dts
-- Generated zephyr.dts: /home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/zephyr/dts.cmake

warning: MAX_THREAD_BYTES (defined at arch/Kconfig:348) was assigned the value '4' but got the value
''. Check these unsatisfied dependencies: USERSPACE (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MAX_THREAD_BYTES and/or look up
MAX_THREAD_BYTES in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.

Parsing /home/guo/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/guo/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs25/intel_adsp_cavs25_defconfig'
Merged configuration '/home/guo/zephyrproject/zephyr/tests/posix/common/prj.conf'
Merged configuration '/home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/twister/testcase_extra.conf'
Configuration saved to '/home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/zephyr/.config'
Kconfig header saved to '/home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/guo/zephyr-sdk-0.13.2/xtensa/intel_s1000/xtensa-zephyr-elf/bin/xtensa-zephyr-elf-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/guo/zephyrproject/zephyr/twister-out/intel_adsp_cavs25/tests/posix/common/portability.posix.common.newlib
[  1%] Generating ../../../../include/generated/core-isa-dM.h
[  2%] Generating ../../../../include/generated/zsr.h
[  2%] Built target zsr_h
[  3%] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[  4%] Built target parse_syscalls_target
[  5%] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[  5%] Built target syscall_list_h_target
[  6%] Generating include/generated/driver-validation.h
[  6%] Built target driver_validation_h_target
[  7%] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
[  7%] Built target kobj_types_h_target
[  7%] Building C object zephyr/CMakeFiles/offsets.dir/arch/xtensa/core/offsets/offsets.c.obj
[  7%] Built target offsets
[  8%] Generating include/generated/offsets.h
[  8%] Built target offsets_h
[  9%] Generating include/generated/version.h
-- Zephyr version: 3.0.99 (/home/guo/zephyrproject/zephyr), build: zephyr-v3.0.0-2702-gc5b59282d6bc
[  9%] Built target version_h
[  9%] Built target zephyr_generated_headers
[  9%] Building C object CMakeFiles/app.dir/src/clock.c.obj
[ 10%] Building C object CMakeFiles/app.dir/src/main.c.obj
[ 10%] Building C object CMakeFiles/app.dir/src/mqueue.c.obj
[ 11%] Building C object CMakeFiles/app.dir/src/mutex.c.obj
[ 11%] Building C object CMakeFiles/app.dir/src/nanosleep.c.obj
[ 12%] Building C object CMakeFiles/app.dir/src/posix_rwlock.c.obj
[ 13%] Building C object CMakeFiles/app.dir/src/pthread.c.obj
[ 13%] Building C object CMakeFiles/app.dir/src/pthread_key.c.obj
[ 14%] Building C object CMakeFiles/app.dir/src/semaphore.c.obj
[ 14%] Building C object CMakeFiles/app.dir/src/timer.c.obj
[ 15%] Linking C static library app/libapp.a
[ 15%] Built target app
[ 15%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
[ 16%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
[ 16%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
[ 17%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
[ 18%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
[ 18%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
[ 19%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
[ 19%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
[ 20%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
[ 21%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
[ 21%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
[ 22%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
[ 22%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
[ 23%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
[ 24%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
[ 24%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
[ 25%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
[ 25%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
[ 26%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
[ 26%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
[ 27%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
[ 28%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj
[ 28%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
[ 29%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/mpsc_pbuf.c.obj
[ 29%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/winstream.c.obj
[ 30%] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
[ 31%] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
[ 31%] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
[ 32%] Linking C static library libzephyr.a
[ 32%] Built target zephyr
[ 32%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
[ 33%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
[ 34%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
[ 34%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
[ 35%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
[ 35%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
[ 36%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
[ 37%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
[ 37%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
[ 38%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
[ 38%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj
[ 39%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj
[ 40%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj
[ 40%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj
[ 41%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/pipes.c.obj
[ 41%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj
[ 42%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj
[ 43%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj
[ 43%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj
[ 44%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj
[ 44%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
[ 45%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj
[ 46%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
[ 46%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
[ 47%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
[ 47%] Linking C static library libkernel.a
[ 47%] Built target kernel
[ 47%] Generating linker_zephyr_pre0.cmd
[ 47%] Built target linker_zephyr_pre0_script
[ 47%] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
[ 48%] Linking C static library libisr_tables.a
[ 48%] Built target isr_tables
[ 50%] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
[ 50%] Linking C static library libarch__common.a
[ 50%] Built target arch__common
Scanning dependencies of target arch__xtensa__core
[ 51%] Building C object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/cpu_idle.c.obj
[ 51%] Building C object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/fatal.c.obj
[ 52%] Building ASM object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/window_vectors.S.obj
[ 53%] Building ASM object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/xtensa-asm2-util.S.obj
[ 53%] Building C object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/xtensa-asm2.c.obj
[ 54%] Building C object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/irq_manage.c.obj
[ 54%] Building ASM object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/crt1.S.obj
[ 55%] Building C object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/xtensa_backtrace.c.obj
[ 56%] Building ASM object zephyr/arch/arch/xtensa/core/CMakeFiles/arch__xtensa__core.dir/debug_helpers_asm.S.obj
[ 56%] Linking C static library libarch__xtensa__core.a
[ 56%] Built target arch__xtensa__core
Scanning dependencies of target arch__xtensa__core__startup
[ 57%] Building ASM object zephyr/arch/arch/xtensa/core/startup/CMakeFiles/arch__xtensa__core__startup.dir/memerror-vector.S.obj
[ 57%] Building ASM object zephyr/arch/arch/xtensa/core/startup/CMakeFiles/arch__xtensa__core__startup.dir/memctl_default.S.obj
[ 58%] Building ASM object zephyr/arch/arch/xtensa/core/startup/CMakeFiles/arch__xtensa__core__startup.dir/reset-vector.S.obj
[ 58%] Linking ASM static library libarch__xtensa__core__startup.a
[ 58%] Built target arch__xtensa__core__startup
[ 58%] Building C object zephyr/lib/libc/newlib/CMakeFiles/lib__libc__newlib.dir/libc-hooks.c.obj
/home/guo/zephyrproject/zephyr/lib/libc/newlib/libc-hooks.c:92:16: error: conflicting types for '_heap_sentry'
   92 |   extern void *_heap_sentry;
      |                ^~~~~~~~~~~~
In file included from /home/guo/zephyrproject/zephyr/include/zephyr/arch/xtensa/irq.h:58,
                 from /home/guo/zephyrproject/zephyr/include/zephyr/arch/xtensa/arch.h:27,
                 from /home/guo/zephyrproject/zephyr/include/zephyr/arch/cpu.h:27,
                 from /home/guo/zephyrproject/zephyr/lib/libc/newlib/libc-hooks.c:7:
/home/guo/zephyrproject/zephyr/soc/xtensa/intel_adsp/common/include/soc.h:78:13: note: previous declaration of '_heap_sentry' was here
   78 | extern char _heap_sentry[];
      |             ^~~~~~~~~~~~
make[2]: *** [zephyr/lib/libc/newlib/CMakeFiles/lib__libc__newlib.dir/build.make:76: zephyr/lib/libc/newlib/CMakeFiles/lib__libc__newlib.dir/libc-hooks.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2938: zephyr/lib/libc/newlib/CMakeFiles/lib__libc__newlib.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Environment (please complete the following information):

@LixinGuoX LixinGuoX added bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms labels Apr 18, 2022
@ceolin ceolin self-assigned this Apr 18, 2022
ceolin pushed a commit to ceolin/zephyr that referenced this issue Apr 18, 2022
Fix a variable declaration type conflict:

libc-hooks.c:92:16: error: conflicting types for '_heap_sentry'
   92 |   extern void *_heap_sentry;
soc.h:78:13: note: previous declaration of '_heap_sentry' was here

Fixes zephyrproject-rtos#44926

Signed-off-by: Flavio Ceolin <[email protected]>
MaureenHelm pushed a commit that referenced this issue Apr 18, 2022
Fix a variable declaration type conflict:

libc-hooks.c:92:16: error: conflicting types for '_heap_sentry'
   92 |   extern void *_heap_sentry;
soc.h:78:13: note: previous declaration of '_heap_sentry' was here

Fixes #44926

Signed-off-by: Flavio Ceolin <[email protected]>
ibaz-nordic pushed a commit to ibaz-nordic/zephyr that referenced this issue Apr 21, 2022
Fix a variable declaration type conflict:

libc-hooks.c:92:16: error: conflicting types for '_heap_sentry'
   92 |   extern void *_heap_sentry;
soc.h:78:13: note: previous declaration of '_heap_sentry' was here

Fixes zephyrproject-rtos#44926

Signed-off-by: Flavio Ceolin <[email protected]>
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 platform: Intel ADSP Intel Audio platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants