[PATCH] fix waf rpath ordering problem

Michael Adam obnox at samba.org
Thu Oct 24 16:01:00 MDT 2013


Updated patch attached.

After comment by ita, I changed the -rpath part of the patch:
While -R comes as '-Wl,-R/path', -rpath is used as '-Wl,-rpath,/path'

I did not notice this sublte difference, since I only had the
"-R" variant available from FreeBSD.

Cheers - Michael

On 2013-10-17 at 09:07 +1300, Andrew Bartlett wrote:
> On Wed, 2013-10-16 at 17:59 +0200, Michael Adam wrote:
> > Hi,
> > 
> > attached find a patch that fixes WAF rpath ordering problem
> > in our build:
> > 
> > When a library or system (like cups) provides an RPATH,
> > e.g. with -Wl,-R or -Wl,-rpath, this was added by waf
> > to the LINKFLAGS, wich was later prepended to our RPATH.
> > But if the path by chance contains an older version of
> > one of our internal libraries like talloc, this would lead
> > to linking the too old talloc into our binaries.
> > 
> > This has been observed on, e.g., FreeBSD, with cups and
> > talloc installed from packages/ports to /usr/local,
> > but it is a general problem.
> > 
> > The patch has been tested and reviewed by Volker already
> > and could hence be pushed to master (and I will unless I
> > ge a veto.)
> > 
> > But I am copying Thomas (ita) since the patch touches wafadmin
> > instead of wafsamba. So maybe you can also comment on whether
> > there is a better way to fix this or whether this would also
> > be a patch for upstream waf.
> 
> I'm so glad you figured this out!
> 
> Reviewed-by: Andrew Bartlett <abartlet at samba.org>
> 
> (I'll let you push once we have a chance for ita to comment, but it
> seems entirely reasonable to me)
> 
> Andrew Bartlett
> 
> -- 
> Andrew Bartlett
> http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
> Samba Developer, Catalyst IT                   http://catalyst.net.nz
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-build-fix-ordering-problems-with-lib-provided-and-in.patch
Type: text/x-diff
Size: 2001 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20131025/aa60a2b7/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20131025/aa60a2b7/attachment.pgp>


More information about the samba-technical mailing list