boards/native: fix overriden INCLUDES leading to build failure#11572
boards/native: fix overriden INCLUDES leading to build failure#11572aabadie merged 1 commit intoRIOT-OS:masterfrom
Conversation
cladmi
left a comment
There was a problem hiding this comment.
NATIVEINCLUDES is currently necessary here. At least, changing it is not trivial. And += should not be used at all.
The goal to use NATIVEINCLUDES is to not use the modules include directories and currently use the system posix headers for example.
It make sense for module giving a RIOT interface around system functionalities.
If boards needs both RIOT and system headers it means the system specific part may need to be split out.
|
I checked in |
|
The main question for native, is what should be using the |
|
@cladmi So you say that the real solution is to move ´native_motor´ outside? |
I don't understand the relation with the problem that this PR is trying to solve. Moving native_motor "outside" doesn't solve the build issue you get with I checked info-build target to compare the list of directories included (in
They are exactly the same but the latter doesn't work. So for me the use of Now if I use the verbose build, one can see that the
|
|
NATIVEINCLUDES is not as simple as this. It is there for a good reason. And indeed, the modules using NATIVEINCLUDES cannot use any riot modules includes. It is on purpose. |
|
@jcarrano currently it is using APIs that are not available for However, in practice, why is there even a |
Can you explain this a bit more ? |
From #8940. The goal of For Every modules that need to communicate with the Linux/mac underlying system, must use the system headers, not the ones we provide if they can be different. Currently who should use |
304a7fe to
e897634
Compare
|
@aabadie I think we can change that |
e897634 to
4ad46e6
Compare
|
@cladmi, I remove I'll removed the previous commits if it's ok for you, just keeping the commit with the new test application. |
|
I was thinking about
When removing it needs to be reviewed that the included header did not change unexpectedly. |
4ad46e6 to
580c6eb
Compare
|
@cladmi, I updated this PR following your suggestion:
After building
I'm not sure to understand. Do you mean the included files verification ? e.g. a new static test or something ? |
|
ping @cladmi |
I mean I will test the update now. |
|
Comparing with your reference PR, it indeed did not change the And to be even more precise, the whole binary directories are the same And both the Can you please rebase and only keep the commit removing As a justification somehow if you want inspiration |
I'm sorry but I read 3 times your initial comment about "So this needs its specific pull request" and this cannot the reason. It seems at least that the test application had nothing to with "So this needs its specific pull request". Also I think it's fine to keep the test application in this PR event if it doesn't seem related: it gives a way to verify that |
580c6eb to
b48bd22
Compare
b48bd22 to
d8746ad
Compare
|
I cut out the test application from this PR and opened #11968 |
|
So where do |
They are not needed in
See #11572 (comment) |
I see. I did not read the whole discussion. |
miri64
left a comment
There was a problem hiding this comment.
ACK. The argumentation in this PR makes sense and I locally-tested locally with some apps I know had problems with POSIX headers in the past:
examples/posix_socketstests/gnrc_sock_dnstests/posix_*tests/pthreads_*
I also tested #11968 with and without this PR merged and it indeed fixes it fixes compiling for the test introduced there for native.
|
Triggered rebuild, since last build was a few days back. |
|
All green, let's merge. Thanks @miri64 ! |
Contribution description
This PR fixes an issue when one loads the
log_printfnoformatsubmodule into an application and builds for native. This use case works for all other boards.I'm not sure this is the best fix and I'm also wondering why using
INCLUDES = $(NATIVEINCLUDES)inMakefile.includeis needed.Testing procedure
Build an application with
log_printfnoformaton native:With this PR it works, on master, you get the following error:
Issues/PRs references
Required by #11573, fixes #11603