Date: Tue, 7 Dec 2021 15:43:32 +0000 From: Jessica Clarke <jrtc27@freebsd.org> To: Mitchell Horne <mhorne@freebsd.org> Cc: tuexen@freebsd.org, freebsd-riscv <freebsd-riscv@freebsd.org> Subject: Re: Problem building world Message-ID: <825F61F0-5C23-492C-92F5-C08215C7BDA1@freebsd.org> In-Reply-To: <316c505a-5f92-d216-849c-af94e3340284@freebsd.org> References: <BEFB9C2A-B33B-4222-A6A3-D05DF017EC81@freebsd.org> <316c505a-5f92-d216-849c-af94e3340284@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7 Dec 2021, at 15:34, Mitchell Horne <mhorne@freebsd.org> wrote: > On 11/28/21 10:52, tuexen@freebsd.org wrote: >> Dear all, >>=20 >> when trying to build world as of today, the following happens: >>=20 >>>>> stage 3: cross tools >> -------------------------------------------------------------- >> cd /usr/home/tuexen/freebsd-src; time env INSTALL=3D"sh = /usr/home/tuexen/freebsd-src/tools/install.sh" = TOOLS_PREFIX=3D/usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp = PATH=3D/usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/legacy/usr/s= bin:/usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/legacy/usr/bin:= /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/legacy/bin:/usr/obj= /usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/legacy/usr/libexec:/sbin:/b= in:/usr/sbin:/usr/bin = WORLDTMP=3D/usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp = MAKEFLAGS=3D"-m /usr/home/tuexen/freebsd-src/tools/build/mk -j 4 -J = 15,16 -m /usr/home/tuexen/freebsd-src/share/mk" make -f Makefile.inc1 = DESTDIR=3D = OBJTOP=3D'/usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools= ' OBJROOT=3D'${OBJTOP}/' MAKEOBJDIRPREFIX=3D BOOTSTRAPPING=3D1400029 = BWPHASE=3Dcross-tools -DNO_CPU_CFLAGS -DNO_LINT -DNO_PIC -DNO_SHARED = MK_ASAN=3Dno 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_UBSAN=3Dno = MK_WERROR=3Dno MK_INCLUDES=3Dyes MK_MAN_UTILS=3Dyes = MK_LLVM_TARGET_ALL=3Dno TARGET=3Driscv TARGET_ARCH=3Driscv64 = MK_CLANG_IS_CC=3Dyes MK_LLDB=3Dno MK_LLVM_BINUTILS=3Dno MK_TESTS=3Dno = cross-tools >> --- cross-tools --- >> =3D=3D=3D> lib/clang (obj,all,install) >> --- all_subdir_lib/clang/libllvm --- >> =3D=3D=3D> lib/clang/libllvm (all) >> [Creating objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Analysis...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/AsmParser...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/BinaryFormat...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Bitcode/Reader...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Bitcode/Writer...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Bitstream/Reader...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/CodeGen...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/CodeGen/AsmPrinter...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/CodeGen/GlobalISel...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/CodeGen/LiveDebugValues...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/CodeGen/SelectionDAG...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/DebugInfo/CodeView...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/DebugInfo/DWARF...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/DebugInfo/MSF...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/DebugInfo/Symbolize...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Demangle...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Frontend/OpenMP...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/IR...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/IRReader...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/LTO...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Linker...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/MC...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/MC/MCDisassembler...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/MC/MCParser...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Object...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/ObjectYAML...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Option...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Passes...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/ProfileData...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/ProfileData/Coverage...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Remarks...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Support...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/TableGen...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Target...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Target/RISCV...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Target/RISCV/AsmParser...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Target/RISCV/Disassembler...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Target/RISCV/MCTargetDesc...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Target/RISCV/TargetInfo...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/TextAPI...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/ToolDrivers/llvm-dlltool...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/ToolDrivers/llvm-lib...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/AggressiveInstCombine...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/CFGuard...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/Coroutines...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/IPO...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/InstCombine...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/Instrumentation...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/ObjCARC...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/Scalar...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/Utils...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/Transforms/Vectorize...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/llvm-dlltool...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/llvm-lib...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/llvm/Frontend/OpenMP...] >> [Creating nested objdir = /usr/obj/usr/home/tuexen/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang= /libllvm/llvm/IR...] >> --- llvm/Frontend/OpenMP/OMP.h.inc --- >> --- llvm/Frontend/OpenMP/OMP.inc --- >> --- llvm/IR/IntrinsicImpl.inc --- >> --- llvm/IR/IntrinsicsAArch64.h --- >> --- llvm/Frontend/OpenMP/OMP.h.inc --- >> llvm-tblgen --gen-directive-decl -I = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include -d = llvm/Frontend/OpenMP/OMP.h.inc.d -o llvm/Frontend/OpenMP/OMP.h.inc = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include/llvm/Fronte= nd/OpenMP/OMP.td >> ELF binary type "0" not known. >> --- llvm/Frontend/OpenMP/OMP.inc --- >> llvm-tblgen --gen-directive-impl -I = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include -d = llvm/Frontend/OpenMP/OMP.inc.d -o llvm/Frontend/OpenMP/OMP.inc = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include/llvm/Fronte= nd/OpenMP/OMP.td >> --- llvm/IR/IntrinsicImpl.inc --- >> llvm-tblgen -gen-intrinsic-impl -I = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include -d = llvm/IR/IntrinsicImpl.inc.d -o llvm/IR/IntrinsicImpl.inc = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include/llvm/IR/Int= rinsics.td >> --- llvm/IR/IntrinsicsAArch64.h --- >> llvm-tblgen -gen-intrinsic-enums -intrinsic-prefix=3Daarch64 -I = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include -d = llvm/IR/IntrinsicsAArch64.h.d -o llvm/IR/IntrinsicsAArch64.h = /usr/home/tuexen/freebsd-src/contrib/llvm-project/llvm/include/llvm/IR/Int= rinsics.td >> ELF binary type "0" not known. >> --- llvm/IR/IntrinsicImpl.inc --- >> sh: llvm-tblgen: Exec format error >> ELF binary type "0" not known. >> --- llvm/Frontend/OpenMP/OMP.inc --- >> sh: llvm-tblgen: Exec format error >> --- llvm/IR/IntrinsicsAArch64.h --- >> sh: llvm-tblgen: Exec format error >> ELF binary type "0" not known. >> --- llvm/IR/IntrinsicImpl.inc --- >> *** [llvm/IR/IntrinsicImpl.inc] Error code 126 >>=20 >> make[4]: stopped in /usr/home/tuexen/freebsd-src/lib/clang/libllvm >> --- llvm/Frontend/OpenMP/OMP.inc --- >> *** [llvm/Frontend/OpenMP/OMP.inc] Error code 126 >>=20 >> make[4]: stopped in /usr/home/tuexen/freebsd-src/lib/clang/libllvm >> --- llvm/IR/IntrinsicsAArch64.h --- >> *** [llvm/IR/IntrinsicsAArch64.h] Error code 126 >>=20 >> make[4]: stopped in /usr/home/tuexen/freebsd-src/lib/clang/libllvm >> --- llvm/Frontend/OpenMP/OMP.h.inc --- >> sh: llvm-tblgen: Exec format error >> *** [llvm/Frontend/OpenMP/OMP.h.inc] Error code 126 >>=20 >> make[4]: stopped in /usr/home/tuexen/freebsd-src/lib/clang/libllvm >> 4 errors >>=20 >> make[4]: stopped in /usr/home/tuexen/freebsd-src/lib/clang/libllvm >>=20 >> make[3]: stopped in /usr/home/tuexen/freebsd-src/lib/clang >>=20 >> make[2]: stopped in /usr/home/tuexen/freebsd-src >> 12.89 real 11.86 user 1.14 sys >>=20 >> make[1]: stopped in /usr/home/tuexen/freebsd-src >>=20 >> Any idea what is going wrong? > Hi Michael, >=20 > I believe the following diff will function as a workaround for this = issue (untested by me): >=20 > diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk > index 5aff7081fb76..730b1131068e 100644 > --- a/lib/clang/llvm.build.mk > +++ b/lib/clang/llvm.build.mk > @@ -104,7 +104,7 @@ CFLAGS+=3D -fdata-sections > .if ${LINKER_TYPE} =3D=3D "mac" > LDFLAGS+=3D -Wl,-dead_strip > .else > -LDFLAGS+=3D -Wl,--gc-sections > +LDFLAGS+=3D -Wl,--gc-sections,-m,elf64lriscv_fbsd > .endif >=20 > CXXSTD?=3D c++14 >=20 > CC'ing Jess, who knows the full story here. Yes; see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258358#c4 Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?825F61F0-5C23-492C-92F5-C08215C7BDA1>