Hello Diego,

PKG_CONFIG=false should disable the optional blkid probe, but it also
disables the other pkg-config checks. You can use the build machine’s
pkg-config and point it at the target’s .pc files. For the guide’s --prefix=
layout, I’d set these before running Hurd’s configure in a fresh build
directory

unset PKG_CONFIG_PATH
export PKG_CONFIG_LIBDIR="$SYSROOT/lib/pkgconfig:$SYSROOT/share/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR="$SYSROOT"

If the sysroot has no blkid.pc, pkg-config --exists blkid should return a
nonzero status. In the Hurd configure.ac I checked, that leaves HAVE_BLKID
undefined and configuration continues. I haven’t tested the full build
locally.

Best regards,
Alperen ERKAN
<https://codegraph.jelmer.uk/hurd/1:0.9.git20260527-1/configure.ac>


On Mon, Nov 23, 2026 at 7:08 PM Diego Nieto Cid <[email protected]> wrote:

> Hello,
>
> I found some trouble building from a clean slate, besides what Alperen
> already noted.
>
> On Mon, Nov 23, 2026 at 10:46:17AM -0300, [email protected] wrote:
> > +
> > +#### Hurd
> > +
> > +    $ cd $DEV_DIR/src/hurd/build
> > +    $ make distclean
> > +    $ ../configure --prefix= \
> > +                   --host=$TARGET \
> > +                   --without-parted \
> > +                   --without-libcrypt \
> > +                   --without-libbz2 \
> > +                   --without-libz \
> > +                   --without-rump
> > +    $ make -j$(nproc)
> > +    $ fakeroot make install DESTDIR=$SYSROOT
>
> This step fails now because it's trying to use the hosts pkg-config
> to find libraries. I'm not sure why it wasn't triggered before
> but, doing a clean pass over the tutorial, it now fails to build the
> mount utility.
>
>     make mount prof-depend=t make[2]: Entering directory
> '/home/demo/hurd/cross-gnu/src/hurd/build/utils'
>     ../../Makeconf:314: warning: overriding recipe for target
> '/home/demo/hurd/cross-gnu/sysroot/bin'
>     ../../Makeconf:250: warning: ignoring old recipe for target
> '/home/demo/hurd/cross-gnu/sysroot/bin'
>     make[2]: *** No rule to make target 'blkid/blkid.h', needed by
> 'mount.o'. Stop.
>     make[2]: Leaving directory
> '/home/demo/hurd/cross-gnu/src/hurd/build/utils'
>     make[1]: *** No rule to make target 'blkid/blkid.h', needed by
> 'mount.o'. Stop.
>     make[1]: Leaving directory
> '/home/demo/hurd/cross-gnu/src/hurd/build/utils'
>     make: *** [../Makefile:277: utils-install] Error 2
>
> config.status says:
>
>     S["libblkid_LIBS"]="-lblkid "
>     S["libblkid_CFLAGS"]="-I/usr/include/blkid "
>
> I'm not sure how to disable this feature. Is it ok to set
> PKG_CONFIG=false during the configure step?
>
> I guess a proper cross-compiled pkg-config is needed, otherwise.
>
> Thanks,
> Diego
>
>

Reply via email to