Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 956025 - sys-fs/multipath-tools-0.9.8 fails build on openrc
Summary: sys-fs/multipath-tools-0.9.8 fails build on openrc
Status: UNCONFIRMED
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: 2025-05-16 12:50 UTC by Mark Liman
Modified: 2025-05-19 10:26 UTC (History)
1 user (show)

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


Attachments
Successful build log from latest ISO and openrc stage3 using the same profile (build-working.log,86.83 KB, text/plain)
2025-05-19 10:15 UTC, Mark Liman
Details
Failed build log from cross environment (build-fail.log,27.79 KB, text/plain)
2025-05-19 10:17 UTC, Mark Liman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Liman 2025-05-16 12:50:19 UTC
When trying to emerge multipath-tools in a x86_64 crossdev environment using profile 31 (23 no-multilib hardened) with the systemd use flag disabled the build fails with error:

uxsock.c:20:10: fatal error: systemd/sd-daemon.h: No such file or directory                                                                              

Granted I haven't merged @system and I haven't had the chance to try this in a normal stage3, this behavior should not happen anyways as without the systemd use flag multipath should have no dependency on systemd considering equery b reports said file belongs to systemd and not systemd-utils. Using the guidance from the multipath github issues https://github.com/opensvc/multipath-tools/issues/99, you can set the makeflag SYSTEMD="", removing the dependency on systemd completely and allowing it to build successfully. 

Performing the changes below to the ebuild allowed it to build without a dependence on sd-daemon.h:

	if use systemd ; then
		emake "${myemakeargs[@]}" "$@"
	else
		emake "${myemakeargs[@]}" SYSTEMD="" "$@"
	fi

Additionally the current ebuild does work for the latest version 0.11.0 in the sense it will successfully build, however, I haven't been able to try the functionality yet.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-16 21:24:50 UTC
The full build.log would still be appreciated to see what happened.
Comment 2 Mark Liman 2025-05-19 10:15:18 UTC
Created attachment 929111 [details]
Successful build log from latest ISO and openrc stage3 using the same profile

I also managed to test the latest iso with a stage3 openrc chroot using the same profile, the build successfully worked as the SYSTEMD variable in config.mk is empty
Comment 3 Mark Liman 2025-05-19 10:17:44 UTC
Created attachment 929112 [details]
Failed build log from cross environment

This is the failed build log from the cross environment, the key difference is config.mk detects SYSTEMD 256 which is the systemd my cross host is running, so I am guessing it's detecting the systemd on my host rather than checking the /usr/x86-64.... The host is running profile 42 23.0 hardened systemd.

Sorry for not providing the build log earlier.
Comment 4 Mark Liman 2025-05-19 10:26:02 UTC
This is the offending line in create-config.mk

SYSTEMD := $(strip $(or $(shell $(PKG_CONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \                                                                                                                                                                                                                                            
                        $(shell systemctl --version 2>/dev/null | sed -n 's/systemd \([0-9]*\).*/\1/p')))  

I don't know how package config works or should work in crossdev, however, from the looks of the build log the default pkg-config is being ran rather than the cross one.