Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827074 - =sys-apps/openrc-0.44.8::gentoo does not build on musl without sys-libs/libxcrypt: "libcrypt" not found (missing pc file?)
Summary: =sys-apps/openrc-0.44.8::gentoo does not build on musl without sys-libs/libxc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-11-24 08:47 UTC by Vic Kerr (wikky)
Modified: 2021-12-01 09:40 UTC (History)
2 users (show)

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


Attachments
Patch for 0.44.8 (libcrypt.patch,557 bytes, patch)
2021-11-29 08:30 UTC, Vic Kerr (wikky)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vic Kerr (wikky) 2021-11-24 08:47:53 UTC
>>> Emerging (1 of 1) sys-apps/openrc-0.44.8::gentoo
  * openrc-0.44.8.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
 >>> Unpacking source...
 >>> Unpacking openrc-0.44.8.tar.gz to /var/tmp/portage/sys-apps/openrc-0.44.8/work
 >>> Source unpacked in /var/tmp/portage/sys-apps/openrc-0.44.8/work
 >>> Preparing source in /var/tmp/portage/sys-apps/openrc-0.44.8/work/openrc-0.44.8 ...
  * Applying openrc-0.44.8-selinux-no-pam.patch ...
 patching file meson.build
 patching file meson.build
 patching file src/rc/meson.build [ ok ]
 >>> Source prepared.
 >>> Configuring source in /var/tmp/portage/sys-apps/openrc-0.44.8/work/openrc-0.44.8 ...
/var/tmp/portage/sys-apps/openrc-0.44.8/temp/environment: line 2473: type: locale: not found
meson setup --libdir lib --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload --build.pkg-config-path /usr/share/pkgconfig --pkg-config-path /usr/share/pkgconfig --native-file /var/tmp/portage/sys-apps/openrc-0.44.8/temp/meson.x86_64-gentoo-linux-musl.amd64.ini --buildtype plain -Daudit=disabled -Dbranding="Gentoo Linux"
-Dnewnet=false -Dos=Linux -Dpam=false -Dselinux=disabled -Dshell=/bin/sh -Dsysvinit=true -Dtermcap=ncurses /var/tmp/portage/sys-apps/openrc-0.44.8/work/openrc-0.44.8 /var/tmp/portage/sys-apps/openrc-0.44.8/work/openrc-0.44.8-build
 The Meson build system
 Version: 0.58.2
 Source dir: /var/tmp/portage/sys-apps/openrc-0.44.8/work/openrc-0.44.8
 Build dir: /var/tmp/portage/sys-apps/openrc-0.44.8/work/openrc-0.44.8-build
 Build type: native build
 Project name: OpenRC
 Project version: 0.44.8
 C compiler for the host machine: x86_64-gentoo-linux-musl-gcc (gcc 11.2.0 "x86_64-gentoo-linux-musl-gcc (Gentoo Hardened 11.2.0 p1) 11.2.0")
 C linker for the host machine: x86_64-gentoo-linux-musl-gcc ld.bfd 2.37
 Host machine cpu family: x86_64
 Host machine cpu: x86_64
 Dependency audit skipped: feature audit disabled
 Found pkg-config: /usr/bin/x86_64-gentoo-linux-musl-pkg-config (1.6.3)
 Found CMake: /usr/bin/cmake (3.20.5)
 Run-time dependency pam found: NO (tried pkgconfig and cmake)
 Library pam found: NO
 Run-time dependency libcrypt found: NO (tried pkgconfig and cmake)

 meson.build:96:0: ERROR: Dependency "libcrypt" not found, tried pkgconfig and cmake

# /usr/bin/x86_64-gentoo-linux-musl-pkg-config --modversion libcrypt
Package libcrypt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcrypt.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcrypt', required by 'virtual:world', not found

Notice sys-libs/musl itself is meant to satisfy virtual/libcrypt (both -1 and -2):

RDEPEND="
        !prefix-guest? (
                ...
                elibc_musl? ( sys-libs/musl )

I'm upgrading this system from =sys-apps/openrc-0.42.1-r1 which obviously built fine.

=sys-libs/libxcrypt-4.4.25-r1 installed a pc file, resulting in a successful build of openrc:

# /usr/bin/x86_64-gentoo-linux-musl-pkg-config --modversion libcrypt
4.4.25
# /usr/bin/x86_64-gentoo-linux-musl-pkg-config --libs libcrypt
-L/usr/lib/xcrypt -lcrypt

I don't know if it works on a pre-libxcrypt glibc as I don't have a glibc system to test on.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-24 08:49:50 UTC
Ugh, that’s frustrating. musl does indeed provide libcrypt but meson’s find stuff isn’t recognising it.

Will look.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 01:11:31 UTC
(In reply to Sam James from comment #1)
> Ugh, that’s frustrating. musl does indeed provide libcrypt but meson’s find
> stuff isn’t recognising it.
> 
> Will look.

Patch here: https://github.com/OpenRC/openrc/pull/478/commits/489b2a41ff45637f5a2ce38b20098abd0072ee3e
Comment 3 Vic Kerr (wikky) 2021-11-29 08:30:41 UTC
Created attachment 756987 [details, diff]
Patch for 0.44.8

(In reply to Sam James from comment #2)
> Patch here:
> https://github.com/OpenRC/openrc/pull/478/commits/
> 489b2a41ff45637f5a2ce38b20098abd0072ee3e

That patch doesn't apply to 0.44.8 (but it does to git). Attaching a slightly tweaked patch that does apply.

I can confirm both patches result in a functioning openrc.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-29 23:25:12 UTC
(In reply to Wikky Kerr from comment #3)
> Created attachment 756987 [details, diff] [details, diff]
> Patch for 0.44.8
> 
> (In reply to Sam James from comment #2)
> > Patch here:
> > https://github.com/OpenRC/openrc/pull/478/commits/
> > 489b2a41ff45637f5a2ce38b20098abd0072ee3e
> 
> That patch doesn't apply to 0.44.8 (but it does to git). Attaching a
> slightly tweaked patch that does apply.
> 
> I can confirm both patches result in a functioning openrc.

Thanks!

I think this should now be sorted by https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-apps/openrc?id=2b9164ff6d1041aefe9af711847dec54b5e1d166.
Comment 5 Vic Kerr (wikky) 2021-12-01 08:42:45 UTC
Confirmed. Thanks.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-01 09:40:20 UTC
(In reply to Wikky Kerr from comment #5)
> Confirmed. Thanks.

Thank you!