Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2022 23:38:12 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Example "tools/build/make.py --bootstrap-toolchain" failure under macOS 13.0.1: libcrypt related not-founds
Message-ID:  <4BD55079-7C73-491B-906A-7260175F2DE2@yahoo.com>
References:  <4BD55079-7C73-491B-906A-7260175F2DE2.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
My first ever attempt to build a FreeBSD outside of FreeBSD (macOS =
13.0.1)
looked like:

# env MAKEOBJDIRPREFIX=3D/Users/markmi/obj tools/build/make.py =
--bootstrap-toolchain buildworld buildkernel TARGET=3Damd64 =
TARGET_ARCH=3Damd64

It got:

. . .
mkdir -p =
"/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/legacy//usr/inclu=
de/x86"
cd /Users/markmi/main-src/tools/build;  =
/Users/markmi/obj/bmake-install/bin/bmake DIRPRFX=3Dtools/build/ =
DESTDIR=3D/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/legacy =
host-symlinks
Linking host tools into =
/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/legacy/bin
Cannot find host tool 'unxz' in PATH =
(/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin).
*** Error code 1


So it looks like I needed to do the likes of:

# /bin/bash -c "$(curl -fsSL =
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# brew install libarchive

after that, retrying:

# env MAKEOBJDIRPREFIX=3D/Users/markmi/obj tools/build/make.py =
--bootstrap-toolchain buildworld buildkernel TARGET=3Damd64 =
TARGET_ARCH=3Damd64

progressed until:

cc -O2 -pipe -fno-common -I. -I/Users/markmi/main-src/contrib/com_err =
-std=3Dgnu99 -Wno-format-zero-length -Wno-pointer-sign =
-Wno-system-headers -Wno-empty-body -Wno-string-plus-int =
-Wno-unused-const-variable -Wno-error=3Dunused-but-set-variable =
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality =
-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef =
-Wno-address-of-packed-member -Wno-switch -Wno-switch-enum =
-Wno-knr-promoted-parameter -Wno-parentheses -Wno-typedef-redefinition =
-Werror=3Dincompatible-pointer-types-discards-qualifiers =
-Qunused-arguments =
-I/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/legacy/usr/inclu=
de -Werror=3Dimplicit-function-declaration -Werror=3Dimplicit-int =
-Werror=3Dreturn-type -Wundef -DHAVE_NBTOOL_CONFIG_H=3D1 =
-I/Users/markmi/main-src/tools/build/cross-build/include/common =
-D_DARWIN_C_SOURCE=3D1 =
-I/Users/markmi/main-src/tools/build/cross-build/include/mac -idirafter =
/Users/markmi/main-src/contrib/libarchive/libarchive    =
-L/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/legacy/usr/lib =
-o compile_et compile_et.o parse.o lex.o  =
-L/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/obj-tools/kerber=
os5/lib/libroken -lroken =
-L/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/obj-tools/lib/li=
bcrypt -lcrypt =
-L/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/obj-tools/kerber=
os5/lib/libvers -lvers  -legacy -lresolv
ld: warning: directory not found for option =
'-L/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/obj-tools/lib/l=
ibcrypt'
ld: library not found for -lcrypt
clang: error: linker command failed with exit code 1 (use -v to see =
invocation)
*** Error code 1


Looking, I found a prior line in the output that started with:

echo compile_et:  =
/Users/markmi/obj/Users/markmi/main-src/amd64.amd64/tmp/legacy/usr/lib/lib=
roken.a /usr/lib/libcrypt.a

But:

% ls -Tld /usr/lib/libcrypt.a
ls: /usr/lib/libcrypt.a: No such file or directory


For reference, the source tree was based on:

f83db6441a2f (HEAD -> main, freebsd/main, freebsd/HEAD) sctp: minor =
changes due to upstreaming of Glebs recent changes
branch: main
merge-base: f83db6441a2f4f925a169c7ddf844589cb73c9b5
merge-base: CommitDate: 2022-11-06 22:06:40 +0000
n259064 (--first-parent --count for merge-base)

It was a copy I made of the directory tree I used for the
ThreadRipper 1950X's most recent update to its FreeBSD.
The macOS machine is a 2018 macMini (so: Intel).
=20
=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BD55079-7C73-491B-906A-7260175F2DE2>