Control: reassign -1 scons
Control: affects -1 serf
Control: tag -1 patch
On Sun, Sep 07, 2014 at 07:07:24PM -0700, Daniel Schepler wrote:
> From my pbuilder build log:
>
> ...
> scons GSSAPI=/usr CFLAGS="-g -O2 -fstack-protector-strong -Wformat
> -Werror=format-security" CPPFLAGS="-D_FORTIFY_SOURCE=2"
> LINKFLAGS="-Wl,-z,relro -Wl,-z,defs -Wl,--as-needed"
> scons: Reading SConscript files ...
> TypeError: Directory /usr/include/mit-krb5 found where file expected.:
> File "/tmp/buildd/serf-1.3.7/SConstruct", line 360:
> env.ParseConfig('$GSSAPI --cflags gssapi')
> File "/usr/lib/scons/SCons/Environment.py", line 1555:
> return function(self, self.backtick(command))
> File "/usr/lib/scons/SCons/Environment.py", line 1550:
> return env.MergeFlags(cmd, unique)
> File "/usr/lib/scons/SCons/Environment.py", line 814:
> args = self.ParseFlags(args)
> File "/usr/lib/scons/SCons/Environment.py", line 800:
> do_parse(arg)
> File "/usr/lib/scons/SCons/Environment.py", line 730:
> dict['LIBS'].append(self.fs.File(arg))
> File "/usr/lib/scons/SCons/Node/FS.py", line 1340:
> return self._lookup(name, directory, File, create)
> File "/usr/lib/scons/SCons/Node/FS.py", line 1319:
> return root._lookup_abs(p, fsclass, create)
> File "/usr/lib/scons/SCons/Node/FS.py", line 2216:
> result.diskcheck_match()
> File "/usr/lib/scons/SCons/Node/FS.py", line 2362:
> "Directory %s found where file expected.")
> File "/usr/lib/scons/SCons/Node/FS.py", line 385:
> return self.func(*args, **kw)
> File "/usr/lib/scons/SCons/Node/FS.py", line 406:
> raise TypeError(errorfmt % node.abspath)
> debian/rules:26: recipe for target 'debian/stamp-build' failed
> make: *** [debian/stamp-build] Error 2
> dpkg-buildpackage: error: debian/rules build gave error exit status 2The problem here boils down to scons not understanding the -isystem flag. $ krb5-config --cflags gssapi -isystem /usr/include/mit-krb5 When Environment.ParseFlags parses this, it ends up trying to put "-isystem" into CCFLAGS and "/usr/include/mit-krb5" into LIBS. The attached patch adds support for this flag. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>
diff --git a/debian/patches/manpages.patch b/debian/patches/manpages.patch
index 38506ce..ba7994f 100644
--- a/debian/patches/manpages.patch
+++ b/debian/patches/manpages.patch
@@ -7433,6 +7433,7 @@ Index: scons/scons.1
+-framework FRAMEWORKS
+-frameworkdir= FRAMEWORKPATH
+-include CCFLAGS
++-isystem CPPFLAGS
+-isysroot CCFLAGS, LINKFLAGS
+-I CPPPATH
+-l LIBS
diff --git a/engine/SCons/Environment.py b/engine/SCons/Environment.py
index 5644a30..83ca503 100644
--- a/engine/SCons/Environment.py
+++ b/engine/SCons/Environment.py
@@ -746,6 +746,11 @@ class SubstitutionEnvironment(object):
dict['CPPPATH'].append(arg[2:])
else:
append_next_arg_to = 'CPPPATH'
+ elif arg[:8] == '-isystem':
+ if arg[8:]:
+ dict['CPPPATH'].append(arg[8:])
+ else:
+ append_next_arg_to = 'CPPPATH'
elif arg[:4] == '-Wa,':
dict['ASFLAGS'].append(arg[4:])
dict['CCFLAGS'].append(arg)
signature.asc
Description: Digital signature

