Bug 236125 - /sbin/geom cannot work anymore when world is build WITHOUT_DYNAMICROOT
Summary: /sbin/geom cannot work anymore when world is build WITHOUT_DYNAMICROOT
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-geom (Nobody)
Depends on:
Reported: 2019-03-01 11:27 UTC by SimpleRezo
Modified: 2019-03-07 18:41 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description SimpleRezo 2019-03-01 11:27:43 UTC

Since probably this commit:

If you build world with WITHOUT_DYNAMICROOT=yes, g(tools) won't work anymore because they require loading of dynamic libraries (/lib/geom).

# gpart
gpart: Cannot open library: Service unavailable.

Comment WITHOUT_DYNAMICROOT in /etc/src.conf.
cd /usr/src/sbin/geom && make && make install clean

Comment 1 Brooks Davis freebsd_committer 2019-03-01 19:51:52 UTC
geom(8) is really not designed for static compilation.  We should probably at a minimum alter sbin/geom/Makefile to embed gpart and glabel in the binary when WITHOUT_DYNAMICROOT is defined.  That should be as simple as changing the line mentioning RESCUE to:

.if defined(RESCUE) || defined(RELEASE_CRUNCH) || ${MK_DYNAMICROOT} == "no"

and altering the LINKS value to in the MK_DYNAMICROOT=no case.
Comment 2 Brooks Davis freebsd_committer 2019-03-07 18:41:28 UTC
For a possible fix see: https://reviews.freebsd.org/D19497