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 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-01 11:27 UTC by SimpleRezo
Modified: 2019-03-07 18:41 UTC (History)
1 user (show)

See Also:


Attachments

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
Hi

Since probably this commit:
https://svnweb.freebsd.org/base?view=revision&revision=335645

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.

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

Regards
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