Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2022 15:46:21 +0930
From:      "Daniel O'Connor" <darius@dons.net.au>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Cross build 13.1 from OSX
Message-ID:  <80925A7C-D6E6-401A-A2F5-9267B0644C72@dons.net.au>

next in thread | raw e-mail | index | archive | help
Hi,
I'm trying to cross build from OSX (with stuff built from Macports). I =
modified make.py to add /opt/local/bin to the path then ran:

env XCC=3D/opt/local/bin/clang-mp-14 XCXX=3D/opt/local/bin/clang++-mp-14 =
XCPP=3D/opt/local/bin/clang-cpp-mp-14 XLD=3D/opt/local/bin/ld.lld-mp-14 =
MAKEOBJDIRPREFIX=3D/tmp/freebsdobj --host-bindir=3D/opt/local/bin =
tools/build/make.py TARGET=3Damd64 TARGET_ARCH=3Damd64 kernel-toolchain

However it bombs out trying to build compile_et:
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /Users/oconnd1/projects/freebsd; INSTALL=3D"sh =
/Users/oconnd1/projects/freebsd/tools/install.sh"  =
TOOLS_PREFIX=3D/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd6=
4.amd64/tmp  =
PATH=3D/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/=
tmp/legacy/usr/sbin:/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd=
/amd64.amd64/tmp/legacy/usr/bin:/private/tmp/freebsdobj/Users/oconnd1/proj=
ects/freebsd/amd64.amd64/tmp/legacy/bin:/private/tmp/freebsdobj/Users/ocon=
nd1/projects/freebsd/amd64.amd64/tmp/legacy/usr/libexec:/sbin:/bin:/usr/sb=
in:/usr/bin  =
WORLDTMP=3D/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.am=
d64/tmp  MAKEFLAGS=3D"-m /Users/oconnd1/projects/freebsd/tools/build/mk  =
-D WITH_AUTO_OBJ -D WITHOUT_CLEAN -m =
/Users/oconnd1/projects/freebsd/share/mk" =
/tmp/freebsdobj/bmake-install/bin/bmake  -f Makefile.inc1  DESTDIR=3D  =
OBJTOP=3D'/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd=
64/tmp/obj-tools'  OBJROOT=3D'${OBJTOP}/'  MAKEOBJDIRPREFIX=3D  =
BOOTSTRAPPING=3D0  BWPHASE=3Dbootstrap-tools  -DNO_CPU_CFLAGS  -DNO_LINT =
 -DNO_PIC  -DNO_SHARED  MK_CTF=3Dno  MK_CLANG_EXTRAS=3Dno  =
MK_CLANG_FORMAT=3Dno  MK_CLANG_FULL=3Dno  MK_HTML=3Dno  MK_MAN=3Dno  =
MK_PROFILE=3Dno  MK_RETPOLINE=3Dno  MK_SSP=3Dno  MK_TESTS=3Dno  =
MK_WERROR=3Dno  MK_INCLUDES=3Dyes  MK_MAN_UTILS=3Dyes =
MK_LLVM_TARGET_ALL=3Dno bootstrap-tools
<snip>
=3D=3D=3D> usr.bin/compile_et (obj,all,install)
[Creating objdir =
/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/obj=
-tools/usr.bin/compile_et...]
yacc -d  -o parse.c =
/Users/oconnd1/projects/freebsd/contrib/com_err/parse.y
lex   -olex.c /Users/oconnd1/projects/freebsd/contrib/com_err/lex.l
echo compile_et:  =
/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/leg=
acy/usr/lib/libroken.a /usr/lib/libcrypt.a =
/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/obj=
-tools/kerberos5/lib/libvers/libvers.a =
/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/leg=
acy/usr/lib/libegacy.a >> .depend
/usr/bin/cc  -O2 -pipe -fno-common -I. =
-I/Users/oconnd1/projects/freebsd/contrib/com_err  -MD  =
-MF.depend.compile_et.o -MTcompile_et.o -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/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/l=
egacy/usr/include -Werror=3Dimplicit-function-declaration =
-Werror=3Dimplicit-int  -Werror=3Dreturn-type -Wundef =
-DHAVE_NBTOOL_CONFIG_H=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/common =
-D_DARWIN_C_SOURCE=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/mac =
-idirafter /Users/oconnd1/projects/freebsd/contrib/libarchive/libarchive =
-c /Users/oconnd1/projects/freebsd/contrib/com_err/compile_et.c -o =
compile_et.o
/usr/bin/cc  -O2 -pipe -fno-common -I. =
-I/Users/oconnd1/projects/freebsd/contrib/com_err  -MD  =
-MF.depend.parse.o -MTparse.o -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/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/l=
egacy/usr/include -Werror=3Dimplicit-function-declaration =
-Werror=3Dimplicit-int  -Werror=3Dreturn-type -Wundef =
-DHAVE_NBTOOL_CONFIG_H=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/common =
-D_DARWIN_C_SOURCE=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/mac =
-idirafter /Users/oconnd1/projects/freebsd/contrib/libarchive/libarchive =
-c parse.c -o parse.o
/usr/bin/cc  -O2 -pipe -fno-common -I. =
-I/Users/oconnd1/projects/freebsd/contrib/com_err  -MD  -MF.depend.lex.o =
-MTlex.o -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/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/l=
egacy/usr/include -Werror=3Dimplicit-function-declaration =
-Werror=3Dimplicit-int  -Werror=3Dreturn-type -Wundef =
-DHAVE_NBTOOL_CONFIG_H=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/common =
-D_DARWIN_C_SOURCE=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/mac =
-idirafter /Users/oconnd1/projects/freebsd/contrib/libarchive/libarchive =
-c lex.c -o lex.o
/usr/bin/cc -O2 -pipe -fno-common -I. =
-I/Users/oconnd1/projects/freebsd/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/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/l=
egacy/usr/include -Werror=3Dimplicit-function-declaration =
-Werror=3Dimplicit-int -Werror=3Dreturn-type -Wundef =
-DHAVE_NBTOOL_CONFIG_H=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/common =
-D_DARWIN_C_SOURCE=3D1 =
-I/Users/oconnd1/projects/freebsd/tools/build/cross-build/include/mac =
-idirafter /Users/oconnd1/projects/freebsd/contrib/libarchive/libarchive =
   =
-L/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/l=
egacy/usr/lib -o compile_et compile_et.o parse.o lex.o  =
-L/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/o=
bj-tools/kerberos5/lib/libroken -lroken =
-L/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/o=
bj-tools/lib/libcrypt -lcrypt =
-L/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/o=
bj-tools/kerberos5/lib/libvers -lvers  -legacy -lresolv
ld: warning: directory not found for option =
'-L/private/tmp/freebsdobj/Users/oconnd1/projects/freebsd/amd64.amd64/tmp/=
obj-tools/lib/libcrypt'
ld: library not found for -lcrypt
clang: error: linker command failed with exit code 1 (use -v to see =
invocation)
*** Error code 1

Stop.
bmake[3]: stopped in /Users/oconnd1/projects/freebsd/usr.bin/compile_et
*** Error code 1

My tree is a (slightly modified) clone of =
fc952ac2212b121aa6eefc273f5960ec3e0a466d

I see usr.bin/compile_et/Makefile.depend has libcrypt but not sure why =
it doesn't get built.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80925A7C-D6E6-401A-A2F5-9267B0644C72>