Open nordic-krch opened 8 months ago
This is not related to twister, this same issue can be reproduced with west and probably with cmake only, so it is a build system issue.
yes, it's an issue with cmake dependencies just reproduced it in twister context.
Any update about this issue? I got another reproduction of it - the same environment like @nordic-krch described - incremental builds. In my case, after such change https://github.com/zephyrproject-rtos/zephyr/commit/4b2bf5abccab6aefd6afe70f91000e21767b81a8 which should regenerate content of zephyr/include/generated/syscalls I got error:
zephyr/include/generated/syscalls/kernel.h:1333:19: error: conflicting types for 'k_pipe_put'; have 'int(struct k_pipe *, void *, size_t, size_t *, size_t, k_timeout_t)' {aka 'int(struct k_pipe *, void *, unsigned int, unsigned int *, unsigned int, k_timeout_t)'}
1333 | static inline int k_pipe_put(struct k_pipe * pipe, void * data, size_t bytes_to_write, size_t * bytes_written, size_t min_xfer, k_timeout_t timeout)
| ^~~~~~~~~~
zephyr/include/zephyr/kernel.h:4971:15: note: previous declaration of 'k_pipe_put' with type 'int(struct k_pipe *, const void *, size_t, size_t *, size_t, k_timeout_t)' {aka 'int(struct k_pipe *, const void *, unsigned int, unsigned int *, unsigned int, k_timeout_t)'}
4971 | __syscall int k_pipe_put(struct k_pipe *pipe, const void *data,
|
Can solution proposed in this issue by nordic-krch be applied? Or there is another one needed?
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.
conflicting types for 'k_pipe_put'
I see the same issue. Conflicting declarations steams from a file that seems to be generated: build/mcuboot/zephyr/include/generated/syscalls/kernel.h:1333
.
A make clean
does not solve this. So it seems to me, that the clean target does not clean up all generated files.
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.
Describe the bug When using
twister
with--no-clean
option it fails when new syscall is added between the builds. It seems that there are some cmake dependency issue that prevents regeneration of syscall header.Please also mention any information which could help others to understand the problem you're facing:
To Reproduce Steps to reproduce the behavior:
git checkout ac3a6d3721
checkout a commit just before the commit which adds new syscallscripts/twister -p nrf52840dk_nrf52840 -s samples/subsys/logging/logger/sample.logger.basic --no-clean
git checkout 1a0e8d6f9e
checkout commit which adds new syscallscripts/twister -p nrf52840dk_nrf52840 -s samples/subsys/logging/logger/sample.logger.basic --no-clean
will fail due to syscall header not having a new callExpected behavior Build should succeed because syscall files shall be re-generated.
Impact Cannot use
--no-clean
build in CI.Additional context Following patch helps but I'm no CMake expert so hard to say if that is a proper solution: