Bad includes generated by snapcraft scons plugin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Invalid
|
Medium
|
Sergio Schvezov |
Bug Description
This part fails to build:
gpsd:
plugin: scons
source: http://
scons-options: [ prefix=/usr/, python=no, qt=no ]
stage-packages: [ libncurses5-dev, libtinfo-dev ]
The final error is this:
gcc -o ais_json.os -c -I/home/
And the issue appears to be the " " around the double -I sections, which make GCC think that there is supposed to be a file called " -I ... -I ..."
Changed in snapcraft: | |
milestone: | none → 2.11 |
assignee: | nobody → Sergio Schvezov (sergiusens) |
importance: | Undecided → Medium |
Changed in snapcraft: | |
milestone: | 2.12 → 2.13 |
milestone: | 2.13 → none |
We export include directories for the staging area and staged packages (from `stage-packages`) to allow building this. What we do is for CPPFLAGS, CFLAGS and CXXFLAGS is to add -I directives for the canonical include directories which are on non standard paths.
It seems the SConstruct file for gpsd treats CPPFLAGS differently:
- SConstruct:261 for CFLAGS
- SConstruct:265 for CPPFLAGS
Where the former does a proper split while the latter does a plain join. Given that CPPFLAGS is really the proper way to declare includes (and we use the others for some compatibility with a plethora of build systems) I feel reluctant to just remove CPPFLAGS here.
That said, to unblock you quickly you can change those `stage-packages` to `build-packages`
Does my assessment sound fair?