tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

problems using an add-on compiler to bootstrap on FreeBSD



My working pkgsrc source tree is somewhat out of date, but I thought I'd
try bootstrapping it on a FreeBSD VM, as I'm also using it on macos.

I also thought I'd try gcc-14, as I'm already using clang-16 on macos.

However it seems something odd happens:

===> Installing dependencies for cwrappers-20180325
=> Build dependency gcc6>=6.1: NOT found
=> Verifying reinstall for ../../lang/gcc6
=> Bootstrap dependency digest>=20211023: NOT found
=> Verifying reinstall for ../../pkgtools/digest
===> Installing dependencies for digest-20220214
=> Build dependency cwrappers>=20150314: NOT found
=> Verifying reinstall for ../../pkgtools/cwrappers
ERROR: This package has set PKG_FAIL_REASON:
ERROR: Circular dependency detected


Note that on FreeBSD the "gcc14" package installs only
/usr/local/bin/gcc14, and unfortunately pkgsrc doesn't recognize "gcc14"
as a valid compiler, so I manually created a symlink to "gcc", and just
used "--compiler=gcc" as the bootstrap argument.

Looking at mk/compiler/gcc.mk it seems that PKGSRC_COMPILER isn't well
supported for a compiler that's not in /usr/bin unless GCCBASE is also
set, making "--compiler" more or less useless for an add-on compiler,
especially if it is "gcc"?

Luckily it seems setting GCCBASE gets around at least this hurdle.

Here's my bootstrap command:

GCCBASE=/usr/local PATH=/bin:/usr/bin:/usr/local/bin \
	./bootstrap \
	--unprivileged \
	--compiler=gcc
	--full \
	--make-jobs=4 \
	--sysconfdir=$HOME/pkg-TEST \
	--pkgdbdir=$HOME/pkg/.pkgdb \
	--pkginfodir=share/info \
	--pkgmandir=share/man \
	--varbase=$HOME/pkg-TEST/var \
	--workdir=/var/tmp/package-obj/woods

And on a relatively poorly provisioned Xen VM:

===> bootstrap started: Wed Jan  8 12:58:12 PST 2025
===> bootstrap ended:   Wed Jan  8 13:43:41 PST 2025

BTW, it is very dismaying how many times libnbcompat is configured and
built by the bootstrap, and, to "add insult to injury", without even any
configure cache!

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpEeuIZd8DdJ.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index