Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570524 - sys-libs/pam-1.2.1 on musl: pam_exec.c: undefined reference to `strndupa'
Summary: sys-libs/pam-1.2.1 on musl: pam_exec.c: undefined reference to `strndupa'
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-01-01 20:15 UTC by Nicholas Fish
Modified: 2016-01-07 18:52 UTC (History)
2 users (show)

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


Attachments
Build log from failed pam-1.2.1-r1 emerge demonstrating strndupa error (pam-1.2.1-r1-musl-build.log,91.07 KB, text/plain)
2016-01-01 20:15 UTC, Nicholas Fish
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Fish 2016-01-01 20:15:02 UTC
Created attachment 421536 [details]
Build log from failed pam-1.2.1-r1 emerge demonstrating strndupa error

Please assign to musl@gentoo.org

It is not possible to build Linux-PAM 1.2.1 against musl due to pam's usage of strndupa(). See attached build.log.

There is already a bug filed for this upstream:
https://fedorahosted.org/linux-pam/ticket/46

As well as a suggested patch:
https://fedorahosted.org/linux-pam/attachment/ticket/46/0009-pam_exec-fix-build-when-strndupa-is-not-available.patch

I have uptaken this patch on a later revision pam ebuild in my own overlay:
https://gitweb.gentoo.org/user/ennui.git/tree/sys-libs/pam?h=musl
Comment 1 Anthony Basile gentoo-dev 2016-01-02 20:10:55 UTC
see i would have switched to strndup which uses malloc instead of alloc and then been careful to free the char* after use.  anyhow that patch looks okay to me.

if you are actively working with musl, please provide patches against the musl overlay at https://gitweb.gentoo.org/proj/musl.git/ so all may benefit from your work.
Comment 2 Nicholas Fish 2016-01-07 18:50:37 UTC
Believe this has been fixed.

https://gitweb.gentoo.org/proj/musl.git/commit/?id=b880a39368148d7f7e2906a6d07d73fe606f7c8a
Comment 3 Nicholas Fish 2016-01-07 18:52:33 UTC
No issues emerging sys-libs/pam-1.2.1-r99 from musl overlay.