Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 871726 - sys-libs/musl-1.2.3: libcrypt.a from musl conflicts with sys-libs/libxcrypt[static-libs]
Summary: sys-libs/musl-1.2.3: libcrypt.a from musl conflicts with sys-libs/libxcrypt[s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: Bug, PATCH
Depends on:
Blocks:
 
Reported: 2022-09-19 13:11 UTC by dm9pZCAq
Modified: 2022-09-19 15:57 UTC (History)
4 users (show)

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


Attachments
possible patch for this issue (musl-1.2.3-r3.patch,466 bytes, patch)
2022-09-19 13:11 UTC, dm9pZCAq
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dm9pZCAq 2022-09-19 13:11:31 UTC
Created attachment 812863 [details, diff]
possible patch for this issue

when emergin sys-libs/musl with USE='-crypt' then both sys-libs/libxcrypt and sys-libs/musl provides /usr/lib/libcrypt.a which causes conflict

 * Detected file collision(s):
 *
 *      /usr/lib/libcrypt.a
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * sys-libs/libxcrypt-4.4.28-r2:0::gentoo
 *      /usr/lib/libcrypt.a
 *
 * Package 'sys-libs/musl-1.2.3-r3' NOT merged due to file collisions. If
 * necessary, refer to your elog messages for the whole content of the
 * above message.
Comment 1 Anthony Basile gentoo-dev 2022-09-19 13:38:03 UTC
(In reply to dm9pZCAq from comment #0)
> Created attachment 812863 [details, diff] [details, diff]
> possible patch for this issue
> 
> when emergin sys-libs/musl with USE='-crypt' then both sys-libs/libxcrypt
> and sys-libs/musl provides /usr/lib/libcrypt.a which causes conflict
> 
>  * Detected file collision(s):
>  *
>  *      /usr/lib/libcrypt.a
>  *
>  * Searching all installed packages for file collisions...
>  *
>  * Press Ctrl-C to Stop
>  *
>  * sys-libs/libxcrypt-4.4.28-r2:0::gentoo
>  *      /usr/lib/libcrypt.a
>  *
>  * Package 'sys-libs/musl-1.2.3-r3' NOT merged due to file collisions. If
>  * necessary, refer to your elog messages for the whole content of the
>  * above message.

Yeah, you can't just remove the header.  Did you look through the symbols of libcrypt.a to make sure it just provides the crypt() stuff that's being replaced by libxcrypt? It should be but we should make sure before we start removing lib archives.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-19 15:36:07 UTC
(In reply to Anthony Basile from comment #1)
> (In reply to dm9pZCAq from comment #0)
> > Created attachment 812863 [details, diff] [details, diff] [details, diff]
> > possible patch for this issue
> > 
> > when emergin sys-libs/musl with USE='-crypt' then both sys-libs/libxcrypt
> > and sys-libs/musl provides /usr/lib/libcrypt.a which causes conflict
> > 
> >  * Detected file collision(s):
> >  *
> >  *      /usr/lib/libcrypt.a
> >  *
> >  * Searching all installed packages for file collisions...
> >  *
> >  * Press Ctrl-C to Stop
> >  *
> >  * sys-libs/libxcrypt-4.4.28-r2:0::gentoo
> >  *      /usr/lib/libcrypt.a
> >  *
> >  * Package 'sys-libs/musl-1.2.3-r3' NOT merged due to file collisions. If
> >  * necessary, refer to your elog messages for the whole content of the
> >  * above message.
> 
> Yeah, you can't just remove the header.  Did you look through the symbols of
> libcrypt.a to make sure it just provides the crypt() stuff that's being
> replaced by libxcrypt? It should be but we should make sure before we start
> removing lib archives.

Yes.
Comment 3 Larry the Git Cow gentoo-dev 2022-09-19 15:50:57 UTC
The bug has been closed via the following commit(s):

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

commit 0f515d501eea31a42364499f4537a70efbf1d924
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-19 15:50:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-19 15:50:33 +0000

    sys-libs/musl: drop libcrypt.a too for USE=-crypt
    
    While musl doesn't split out libcrypt.so, it does
    apparently for libcrypt.a.
    
    Closes: https://bugs.gentoo.org/871726
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/musl/{musl-1.2.3-r3.ebuild => musl-1.2.3-r4.ebuild} | 3 ++-
 sys-libs/musl/musl-9999.ebuild                               | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Comment 4 Mike Gilbert gentoo-dev 2022-09-19 15:54:35 UTC
From what I can tell, libcrypt.a as provided by sys-libs/musl is an empty archive. 

It probably only exists to prevent build systems from erroring if they expect libcrypt to exist and always add -lcrypt to the link command.