Project: datamanagement
Issue DM-751: Replacing boost system lib with eups libs breaks scons build
While detecting boost, Qserv build system checks for both system lib and then eups lib. This procedure use next code : {code:python} class BoostChecker: def __init__(self, env): self.env = env self.suffix = None self.suffixes = ["-gcc41-mt", "-gcc34-mt", "-mt", ""] self.cache = {} pass def getLibName(self, libName): if libName in self.cache: return self.cache[libName] r = self._getLibName(libName) self.cache[libName] = r return r def _getLibName(self, libName): state.log.debug("BoostChecker._getLibName() LIBPATH : %s, CPPPATH : %s" % (self.env["LIBPATH"], self.env["CPPPATH"])) if self.suffix == None: conf = self.env.Configure() def checkSuffix(sfx): return conf.CheckLib(libName + sfx, language="C++", autoadd=0) {code} and this last line run next gcc command : {code:bash} g++ -o .sconf_temp/conftest_10.o -c -g -pedantic -Wall -Wno-long-long -D_FILE_OFFSET_BITS=64 -fPIC -I/data/fjammes/stack/Linux64/protobuf/master-g832d498170/include -I/data/fjammes/stack/Linux64/boost/1.55.0.1/include -I/data/fjammes/stack/Linux64/zookeeper/master-gc48457902f/c-binding/include -I/data/fjammes/stack/Linux64/mysql/master-g5d79af2a50/include -I/data/fjammes/stack/Linux64/antlr/master-gc05368a54f/include -I/data/fjammes/stack/Linux64/xrootd/master-gfc9bfb2059/include/xrootd -Ibuild -I/data/fjammes/stack/Linux64/anaconda/1.8.0/include/python2.7 .sconf_temp/conftest_10.cpp g++ -o .sconf_temp/conftest_10 .sconf_temp/conftest_10.o -L/data/fjammes/stack/Linux64/xrootd/master-gfc9bfb2059/lib -L/data/fjammes/stack/Linux64/protobuf/master-g832d498170/lib -L/data/fjammes/stack/Linux64/antlr/master-gc05368a54f/lib -L/data/fjammes/stack/Linux64/zookeeper/master-gc48457902f/c-binding/lib -L/data/fjammes/stack/Linux64/mysql/master-g5d79af2a50/lib -L/data/fjammes/stack/Linux64/boost/1.55.0.1/lib -lboost_regex-mt scons: Configure: yes {code} As the "-mt" suffix is searched before the empty suffix, previous command succeed.In my example boost_regex-mt is a system lib. When launching "scons build", then CheckLib only looks for boost in /data/fjammes/stack/Linux64/boost/1.55.0.1/lib, not in /usr/lib/. This behaviour is eups-correct, but prevents to find boost_regex-mt. In this example, a trivial solution is to reverse self.suffixes in python code, but a better solution would be to prevent g++ to use default search paths (e.g. : /usr/lib and /usr/include) in the second command. Is it possible to to it with scons ? Mario, did you meet the same problem with sconsUtils ? Thanks Fabrice
Story points: 3