Bug 10548 - Samba 4.X fails to build on e.g. FreeBSD due to link flag ordering bug
Summary: Samba 4.X fails to build on e.g. FreeBSD due to link flag ordering bug
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.0.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 10:43 UTC by Michael Adam
Modified: 2016-08-01 19:26 UTC (History)
4 users (show)

See Also:


Attachments
patch for 4.0, cherry-picked from master (2.12 KB, patch)
2014-04-11 10:46 UTC, Michael Adam
obnox: review+
vl: review+
Details
patch for v4-1-test, picked from master (2.12 KB, patch)
2014-04-11 10:47 UTC, Michael Adam
obnox: review+
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Adam 2014-04-11 10:43:21 UTC
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, but it is a general
problem.
Comment 1 Michael Adam 2014-04-11 10:46:39 UTC
Created attachment 9845 [details]
patch for 4.0, cherry-picked from master

Patch from master for 4.0.
Added cherry-pick and bug info.
Comment 2 Michael Adam 2014-04-11 10:47:39 UTC
Created attachment 9846 [details]
patch for v4-1-test, picked from master

Patch from master.
Added cherry-pick-info and bug-info.
Comment 3 Michael Adam 2014-04-11 12:17:44 UTC
Assigning to Karolin for inclusion in 4.0.NEXT and 4.1.NEXT
Comment 4 Karolin Seeger 2014-04-29 08:29:24 UTC
Pushed to autobuild-v[4-1|4-0]-test.
Comment 5 Michael Adam 2014-05-19 07:35:42 UTC
Since the patch is pushed to the branches, shouldn't the bug be switchet to resolved?
Comment 6 Karolin Seeger 2014-05-19 09:04:42 UTC
(In reply to comment #5)
> Since the patch is pushed to the branches, shouldn't the bug be switchet to
> resolved?

Pushed to both branches.
Closing out bug report.

Thanks!
Comment 7 Jeremy Allison 2015-03-27 20:52:20 UTC
This fix is completely broken I'm afraid and either needs reverting or fixing.

Take a look at:

https://bugzilla.samba.org/show_bug.cgi?id=11165

for details.

Waf is a broken build system, does not correctly cross compile, has wasted 6+ hours of my time and WE MUST MOVE AWAY FROM IT !
Comment 8 Michael Adam 2015-03-30 08:40:31 UTC
(In reply to Jeremy Allison from comment #7)
> This fix is completely broken I'm afraid and either needs reverting or fixing.
> 
> Take a look at:
> 
> https://bugzilla.samba.org/show_bug.cgi?id=11165
> 
> for details.
> 
> Waf is a broken build system, does not correctly cross compile, has wasted 6+ > hours of my time and WE MUST MOVE AWAY FROM IT !

Jeremy, could you please stop hijacking bugs?
We should have a bug for failure to cross-compile.

And this would imho be a feature enhancement, since
for all I can tell, this never worked for our waf build.
But maybe I am wrong.

Anyways. This bug here is fixed. The freebsd build works just fine.

Michael
Comment 9 Michael Adam 2015-03-30 08:46:40 UTC
And the error that shows up in the description of bug #11165 has no relationship to the patches attached to this bug. the linkflags.remove(x) does not appear in these patches.

Closing the bug again and removing the misleading dependency.
Comment 10 Andrew Bartlett 2016-08-01 19:26:02 UTC
*** Bug 10515 has been marked as a duplicate of this bug. ***