Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 929970 - sys-libs/pam: fails to build versioned symbols with lld-17, causes system warnings
Summary: sys-libs/pam: fails to build versioned symbols with lld-17, causes system war...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-13 22:32 UTC by Felix W.
Modified: 2025-01-08 04:56 UTC (History)
4 users (show)

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


Attachments
Fix autotools version script detection and provide correct version script for modules. (pam-1.5.3-lld-17-undefined-symbols.patch,23.34 KB, patch)
2024-04-13 22:52 UTC, Felix W.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix W. 2024-04-13 22:32:16 UTC
Using lld-17, pam configures without symbol versioning. This causes warnings whenever pam is invoked:

> kermit ~ # rc-service sshd restart
>  * Stopping sshd ...
> start-stop-daemon: /usr/lib64/libpam.so.0: no version information available
> (required by start-stop-daemon) 

Reproducible: Always

Steps to Reproduce:
1.Use clang/lld-17
2.build sys-libs/pam
3.use anything that dynamically loads libpam



The root cause is that pams configure checks for versioned symbols with an assembly file that contains undefined symbols itself, causing lld-17 to fail:

> checking for ld --version-script... no

Furthermore, most pam modules do not implement all symbols required to satisfy "${S}/modules/modules.map".
Comment 1 Felix W. 2024-04-13 22:52:30 UTC
Created attachment 890742 [details, diff]
Fix autotools version script detection and provide correct version script for modules.

I've added a proposed fix short of defining "-Wl,-undefinied-version", because I actually want pam to fail building if symbols that should be defined are undefined.

I don't think upstream will accept it because it lacks architecture, but perhaps something can be worked out.

Patch tested with clang/ld.lld and gcc/ld.bfd on pam-1.5.3 and pam-1.5.3-r1.
Comment 2 Larry the Git Cow gentoo-dev 2025-01-08 04:56:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb07a754c3ef70e7165adb2e0800050d95dc10ee

commit eb07a754c3ef70e7165adb2e0800050d95dc10ee
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-08 04:15:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-08 04:55:44 +0000

    sys-libs/pam: add 1.7.0_p20241230
    
    * Switch to Meson
    * Wire up elogind+logind support (bug #931115) as it's now available
      upstream
    * Docs are hard-disabled for now, but that's sort of fine (enough) for now
      given that we had bug #913087 for the previous ebuild
    * Using a snapshot as there's a few build system patches post-tag and
      some other generally noteworthy patches we'd have to pull in manually
      otherwise
    * Wire up verify-sig for the next release (but not used for this ebuild
      as took a snapshot)
    
    Bug: https://bugs.gentoo.org/913087
    Bug: https://bugs.gentoo.org/942075
    Closes: https://bugs.gentoo.org/929970
    Closes: https://bugs.gentoo.org/925334
    Closes: https://bugs.gentoo.org/931115
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/pam/Manifest                   |   1 +
 sys-libs/pam/pam-1.7.0_p20241230.ebuild | 165 ++++++++++++++++++++++++++++++++
 2 files changed, 166 insertions(+)