[riot-notifications] [RIOT-OS/RIOT] boards/native: fix overriden INCLUDES leading to build failure (#11572)

Alexandre Abadie notifications at github.com
Mon May 27 16:23:03 CEST 2019


> I checked in board.c and the issue is only for native_motor, so I think it should be moved 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 `USEMODULE=log_printfnoformat make -C examples/hello-world`.

I checked info-build target to compare the list of directories included (in `INCLUDES`), using `USEMODULE=log_printfnoformat make -C examples/hello-world info-build`:
- this PR:
```
INCLUDES: 
	-I/home/aabadie/softs/src/riot/RIOT/core/include  
	-I/home/aabadie/softs/src/riot/RIOT/drivers/include  
	-I/home/aabadie/softs/src/riot/RIOT/sys/include  
	-I/home/aabadie/softs/src/riot/RIOT/boards/native/include  
	-DNATIVE_INCLUDES  
	-I/home/aabadie/softs/src/riot/RIOT/boards/native/include/  
	-I/home/aabadie/softs/src/riot/RIOT/core/include/  
	-I/home/aabadie/softs/src/riot/RIOT/drivers/include/  
	-I/home/aabadie/softs/src/riot/RIOT/cpu/native/include  
	-I/home/aabadie/softs/src/riot/RIOT/sys/include  
	-I/home/aabadie/softs/src/riot/RIOT/cpu/native/include  
	-I/home/aabadie/softs/src/riot/RIOT/sys/log/log_printfnoformat
```
- master:
```
INCLUDES: 
	-I/home/aabadie/softs/src/riot/RIOT/core/include  
	-I/home/aabadie/softs/src/riot/RIOT/drivers/include  
	-I/home/aabadie/softs/src/riot/RIOT/sys/include  
	-I/home/aabadie/softs/src/riot/RIOT/boards/native/include  
	-DNATIVE_INCLUDES  
	-I/home/aabadie/softs/src/riot/RIOT/boards/native/include/  
	-I/home/aabadie/softs/src/riot/RIOT/core/include/  
	-I/home/aabadie/softs/src/riot/RIOT/drivers/include/  
	-I/home/aabadie/softs/src/riot/RIOT/cpu/native/include  
	-I/home/aabadie/softs/src/riot/RIOT/sys/include  
	-I/home/aabadie/softs/src/riot/RIOT/cpu/native/include  
	-I/home/aabadie/softs/src/riot/RIOT/sys/log/log_printfnoformat
```

They are exactly the same but the latter doesn't work. So for me the use of `INCLUDES = $(NATIVEINCLUDES)` in the board Makefile is somehow breaking the list of includes.

Now if I use the verbose build, one can see that the `log_printfnoformat` is not in the list of `-I` arguments of gcc, which is in contradiction with what `info-build` returns:
- on master (and it fails right after of course):
```
gcc \
	-DRIOT_FILE_RELATIVE=\"boards/native/board_init.c\" \
	-DRIOT_FILE_NOPATH=\"board_init.c\" \
	-Werror -Wall -Wextra -pedantic -std=gnu99 -m32 -fstack-protector-all -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -fdiagnostics-color -Wstrict-prototypes -Wold-style-definition -fno-common -Wall -Wextra -Wformat=2 -Wformat-overflow -Wformat-truncation -Wmissing-include-dirs -include '/home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/riotbuild/riotbuild.h'  -DNATIVE_INCLUDES -I/home/aabadie/softs/src/riot/RIOT/boards/native/include/ -I/home/aabadie/softs/src/riot/RIOT/core/include/ -I/home/aabadie/softs/src/riot/RIOT/drivers/include/ -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -MD -MP -c -o /home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/board/board_init.o /home/aabadie/softs/src/riot/RIOT/boards/native/board_init.c
gcc \
	-DRIOT_FILE_RELATIVE=\"boards/native/board.c\" \
	-DRIOT_FILE_NOPATH=\"board.c\" \
	-Werror -Wall -Wextra -pedantic -std=gnu99 -m32 -fstack-protector-all -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -fdiagnostics-color -Wstrict-prototypes -Wold-style-definition -fno-common -Wall -Wextra -Wformat=2 -Wformat-overflow -Wformat-truncation -Wmissing-include-dirs -include '/home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/riotbuild/riotbuild.h'  -DNATIVE_INCLUDES -I/home/aabadie/softs/src/riot/RIOT/boards/native/include/ -I/home/aabadie/softs/src/riot/RIOT/core/include/ -I/home/aabadie/softs/src/riot/RIOT/drivers/include/ -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -MD -MP -c -o /home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/board/board.o /home/aabadie/softs/src/riot/RIOT/boards/native/board.c
In file included from /home/aabadie/softs/src/riot/RIOT/boards/native/board.c:21:
/home/aabadie/softs/src/riot/RIOT/core/include/log.h:98:10: fatal error: log_module.h: No such file or directory
 #include "log_module.h"
```
- with this PR:
```
gcc \
	-DRIOT_FILE_RELATIVE=\"examples/hello-world/main.c\" \
	-DRIOT_FILE_NOPATH=\"main.c\" \
	-Werror -Wall -Wextra -pedantic -std=gnu99 -m32 -fstack-protector-all -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -fdiagnostics-color -Wstrict-prototypes -Wold-style-definition -fno-common -Wall -Wextra -Wformat=2 -Wformat-overflow -Wformat-truncation -Wmissing-include-dirs -include '/home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/riotbuild/riotbuild.h'  -I/home/aabadie/softs/src/riot/RIOT/core/include -I/home/aabadie/softs/src/riot/RIOT/drivers/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -I/home/aabadie/softs/src/riot/RIOT/boards/native/include -DNATIVE_INCLUDES -I/home/aabadie/softs/src/riot/RIOT/boards/native/include/ -I/home/aabadie/softs/src/riot/RIOT/core/include/ -I/home/aabadie/softs/src/riot/RIOT/drivers/include/ -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/log/log_printfnoformat -MD -MP -c -o /home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/application_hello-world/main.o /home/aabadie/softs/src/riot/RIOT/examples/hello-world/main.c
"make" -C /home/aabadie/softs/src/riot/RIOT/boards/native
make[2]: Entering directory '/home/aabadie/softs/src/riot/RIOT/boards/native'
mkdir -p /home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/board/
gcc \
	-DRIOT_FILE_RELATIVE=\"boards/native/board_init.c\" \
	-DRIOT_FILE_NOPATH=\"board_init.c\" \
	-Werror -Wall -Wextra -pedantic -std=gnu99 -m32 -fstack-protector-all -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -fdiagnostics-color -Wstrict-prototypes -Wold-style-definition -fno-common -Wall -Wextra -Wformat=2 -Wformat-overflow -Wformat-truncation -Wmissing-include-dirs -include '/home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/riotbuild/riotbuild.h'  -I/home/aabadie/softs/src/riot/RIOT/core/include -I/home/aabadie/softs/src/riot/RIOT/drivers/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -I/home/aabadie/softs/src/riot/RIOT/boards/native/include -DNATIVE_INCLUDES -I/home/aabadie/softs/src/riot/RIOT/boards/native/include/ -I/home/aabadie/softs/src/riot/RIOT/core/include/ -I/home/aabadie/softs/src/riot/RIOT/drivers/include/ -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/log/log_printfnoformat -DNATIVE_INCLUDES -I/home/aabadie/softs/src/riot/RIOT/boards/native/include/ -I/home/aabadie/softs/src/riot/RIOT/core/include/ -I/home/aabadie/softs/src/riot/RIOT/drivers/include/ -I/home/aabadie/softs/src/riot/RIOT/cpu/native/include -I/home/aabadie/softs/src/riot/RIOT/sys/include -MD -MP -c -o /home/aabadie/softs/src/riot/RIOT/examples/hello-world/bin/native/board/board_init.o /home/aabadie/softs/src/riot/RIOT/boards/native/board_init.c
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11572#issuecomment-496229309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190527/c8c79d15/attachment.html>


More information about the notifications mailing list