Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914898 - net-fs/samba-4.19.0: ld.lld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined
Summary: net-fs/samba-4.19.0: ld.lld: error: version script assignment of 'local' to s...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 912821
  Show dependency tree
 
Reported: 2023-09-28 19:50 UTC by Brahmajit Das
Modified: 2024-08-26 21:43 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log and emerge --info (build.log,206.98 KB, text/plain)
2023-09-28 19:52 UTC, Brahmajit Das
Details
For now, this is a workaround. (temp.diff,428 bytes, patch)
2023-09-28 19:54 UTC, Brahmajit Das
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brahmajit Das 2023-09-28 19:50:35 UTC
With lld 17, samba-4.19.0 fails to build, in the linking phase.

Reproducible: Always

Steps to Reproduce:
1. On llvm profile, be on llvm:17
2. Emerge net-fs/samba-4.19.0
Actual Results:  
ld.lld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol '__bss_start' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol '_edata' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected Results:  
Build completes
Comment 1 Brahmajit Das 2023-09-28 19:52:31 UTC
Created attachment 871689 [details]
Build log and emerge --info
Comment 2 Brahmajit Das 2023-09-28 19:54:23 UTC
Created attachment 871690 [details, diff]
For now, this is a workaround.
Comment 3 Pablo Cholaky 2024-03-08 07:14:14 UTC
I can confirm this patch works at samba-4.19.4.

Using regular profile with clang as default compiler and lld as default linker
Comment 4 wolfgang 2024-05-13 20:28:30 UTC
I can confirm this patch still works in net-fs/samba-4.20.0
Comment 5 Michal Vu 2024-08-26 21:43:26 UTC
Hello, I can confirm that this fix is still possible in samba-4.20.2. Here is a way to "apply" the patch without modifying the ebuild or the samba's source code.

1) Create a file in /etc/portage/env/fix-samba-clang (the name of the file is completely optional, but it should be in the /etc/portage/env directory)

2) Inside the file, insert the following line and save the file:

LDFLAGS="${LDFLAGS} -Wl,--undefined-version"

3) Add the following line into /etc/portage/package.env file to make samba use the LDFLAGS defined above during emerge:

net-fs/samba fix-samba-clang

4) Compile samba -> it should be fine now