Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Per 'man scons':
env.Append(key=val, [...])
[...] If the values
of the construction variable and the keyword argument are the same type,
then the two values will be simply added together. Otherwise, the
construction variable and the value of the keyword argument are both coerced
to lists, and the lists are added together. (See also the Prepend method,
below.)
The result is that under some circumstances (GSSAPI disabled, and possibly more), LIBPATH is only modified by this single call before getting to setting RPATH:
env.Append(LIBPATH='$OPENSSL/lib')
As a result, env['LIBPATH'] is a string and the following:
for d in env['LIBPATH']:
env.Append(RPATH=':'+d)
iterates over characters of that string rather than list elements. As a result, RPATH ends up like '$:O:E:'... and that isn't really useful.
I'm attaching a patch that fixes the issue through consistently appending lists to variables, except for RPATH. This way, SCons guarantees that the end result will be a list and everything will work fine.
Original issue reported by mgorny@gentoo.org