Skip to content

Keeping reusable components under samples/ leads to build issues #1166

@pfalcon

Description

@pfalcon

Steps to reproduce:

  1. Try to build samples/net/echo_server with BLE support:
make BOARD=96b_carbon CONF_FILE=prj_bt.conf

This will lead to following object layout:

$ find -name "*.o"
./bluetooth/gatt/ipss.o
./outdir/96b_carbon/arch/built-in.o
./outdir/96b_carbon/arch/common/built-in.o
./outdir/96b_carbon/arch/common/isr_tables.o
./outdir/96b_carbon/arch/arm/built-in.o

As can be seen, ipss.o goes outside the normal outdir/$(BOARD)/ hierarchy. This of course causes conflicts when building the same samples for other boards/archs (I don't see errors, but there're definitely spurious rebuilds).

Another issue trying to build a sample like samples/net/sockets/echo . As can be seen, this has 4 layers of hierarchy, while samples/net/common/Makefile.common refers to ipss.o as:

obj-y += ../../../bluetooth/gatt/ipss.o

so, it simply cannot find it for the samples like that.

Metadata

Metadata

Labels

bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions