You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@serf.apache.org by "Ivan Zhakov (Jira)" <ji...@apache.org> on 2022/08/12 08:32:00 UTC

[jira] [Updated] (SERF-151) SCons: env['LIBPATH'] sometimes is a string and that breaks RPATH

     [ https://issues.apache.org/jira/browse/SERF-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Zhakov updated SERF-151:
-----------------------------
    Fix Version/s: serf-1.3.9

> SCons: env['LIBPATH'] sometimes is a string and that breaks RPATH
> -----------------------------------------------------------------
>
>                 Key: SERF-151
>                 URL: https://issues.apache.org/jira/browse/SERF-151
>             Project: serf
>          Issue Type: Bug
>            Reporter: Serf Importer
>            Priority: Major
>              Labels: Priority-Medium, Type-Defect
>             Fix For: serf-1.3.9
>
>
> 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:P: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*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)