Bug 12450 - Samba no longer builds with ld.gold linker
Samba no longer builds with ld.gold linker
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.2.14
All Linux
: P5 normal
: ---
Assigned To: Andreas Schneider
Samba QA Contact
https://bugs.gentoo.org/show_bug.cgi?...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-25 14:05 UTC by Mike Lothian
Modified: 2017-06-28 08:41 UTC (History)
3 users (show)

See Also:


Attachments
Samba build failure (355.35 KB, application/octet-stream)
2016-11-25 14:05 UTC, Mike Lothian
no flags Details
Proposed patch for master (114.46 KB, patch)
2016-11-26 17:18 UTC, Andreas Schneider
no flags Details
patch for 4.5 (35.04 KB, patch)
2016-12-05 12:43 UTC, Andreas Schneider
asn: review? (obnox)
asn: review? (ab)
abartlet: review+
Details
patch for 4.4 (35.69 KB, patch)
2016-12-05 12:43 UTC, Andreas Schneider
asn: review? (obnox)
asn: review? (ab)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2016-11-25 14:05:56 UTC
Created attachment 12696 [details]
Samba build failure

Samba no longer builds with the ld.gold linker, I think this is a regression since binutils 2.17

The compilation fails with:

[2637/2782] Linking default/source3/smbd/smbd
default/source3/libsmbregistry-samba4.so: error: undefined reference to 'db_open'
default/source3/libsmbregistry-samba4.so: error: undefined reference to 'state_path'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.2.14/work/samba-4.2.14-abi_x86_64.amd64/bin'
Build failed:  -> task failed (err #1):
        {task: cc_link epmd_28.o,lsasd_29.o,rpc_sock_helper_27.o,server_141.o -> smbd}
make: *** [Makefile:8: all] Error 1


This can be worked around by passing -fuse-ld=bfd to LDFLAGS


The Gentoo bug is https://bugs.gentoo.org/show_bug.cgi?id=600788
Comment 1 Andreas Schneider 2016-11-26 17:18:09 UTC
Created attachment 12697 [details]
Proposed patch for master
Comment 2 Andreas Schneider 2016-12-05 12:43:28 UTC
Created attachment 12721 [details]
patch for 4.5
Comment 3 Andreas Schneider 2016-12-05 12:43:46 UTC
Created attachment 12722 [details]
patch for 4.4
Comment 4 Karolin Seeger 2017-06-28 08:41:18 UTC
Patch does not apply on current v4-5-test (source3/wscript_build:453).