[Scons-users] SCons puts the quoted LINKFLAGS value into the command line

Mats Wichmann mats at wichmann.us
Fri Dec 29 13:01:20 EST 2017


On 12/29/2017 10:20 AM, Yuri wrote:
> Failure:
> g++6 -o lib/libtmv.so.0 " -L/usr/local/lib -fstack-protector
> -Wl,-rpath=/usr/local/lib/gcc6 -L/usr/local/lib/gcc6" -fopenmp -shared ...
> g++6: error:  -L/usr/local/lib -fstack-protector
> -Wl,-rpath=/usr/local/lib/gcc6 -L/usr/local/lib/gcc6: No such file or
> directory
> 
> How to complete the build of this project?
split the link information into distinct arguments when adding to
LINKFLAGS. You can do that manually (write it as a list/tuple), or use
the Python split(), or the SCons Split().

Perhaps something like:

env.AppendUnique(LINKFLAGS=Split("-L/usr/local/lib -fstack-protector
> -Wl,-rpath=/usr/local/lib/gcc6 -L/usr/local/lib/gcc6"))

or if you're fishing it out of the environment, which we have a case of
in our codebase so I have an example:

env.AppendUnique(LINKFLAGS=Split(os.environ['LDFLAGS']))



More information about the Scons-users mailing list