Comment 3 for bug 1587289

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1587289] Re: Bad includes generated by snapcraft scons plugin

El 06/06/16 a las 16:42, Mark Shuttleworth escribió:
> Well, somehow Scons is ending up telling GCC to '"-I X -I Y"' (note the
> double set of quotes). That's a bug :)
>
> I bet if the "" were removed it would work. I just don't know where in
> the stack it's coming from.

The SConstruct file is part of gpsd's source code.
The current sources you are using have:
        env.MergeFlags({flag : [os.getenv(flag)]})

I just checked upstream's latest and greatest[1] and I see it seems to
have been corrected:
        env.MergeFlags({flag: Split(os.getenv(flag))})

So I rolled in the git tree as a source, replacing the tarball, and it
all works fine.

I am marking this invalid, if you feel that is wrong, feel free to
reopen it. But the fact is, we are just passing an envvar of the form
CLFAGS="$CFLAGS -I/usr/include -I/usr/include/..." and the SConstruct
was grabbing that envvar incorrectly.

[1] http://git.savannah.gnu.org/cgit/gpsd.git/tree/SConstruct#n311