Date: Wed, 29 Dec 2021 12:28:39 -0800 From: Mark Millard via freebsd-current <freebsd-current@freebsd.org> To: "arichardson@freebsd.org" <arichardson@FreeBSD.org>, "emaste@freebsd.org" <emaste@FreeBSD.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Is amd64 buildworld supposed to be working for WITH_ASAN= WITH_UBSAN= (both used)? [It fails to link various things.] Message-ID: <2034FBE8-FD43-499B-B400-16F03BAE3D54@yahoo.com> References: <2034FBE8-FD43-499B-B400-16F03BAE3D54.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In order to avoid the following for WITH_ASAN=3D WITH_UBSAN=3D (both = used), so also WITH_LLVM_BINUTILS=3D in use: --- all_subdir_usr.bin/clang --- --- llvm-as.full --- ld: error: undefined symbol: compressBound >>> referenced by Compression.cpp:51 = (/usr/main-src/contrib/llvm-project/llvm/lib/Support/Compression.cpp:51) >>> Compression.o:(llvm::zlib::compress(llvm::StringRef, = llvm::SmallVectorImpl<char>&, int)) in archive = /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/lib/cl= ang/libllvm/libllvm.a . . . ld: error: undefined symbol: compress2 . . . ld: error: undefined symbol: uncompress . . . ld: error: undefined symbol: crc32 >>> referenced by Compression.cpp:85 = (/usr/main-src/contrib/llvm-project/llvm/lib/Support/Compression.cpp:85) >>> Compression.o:(llvm::zlib::crc32(llvm::StringRef)) in = archive = /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/lib/cl= ang/libllvm/libllvm.a I hacked in: # git -C /usr/main-src/ diff /usr/main-src/usr.bin/clang/ diff --git a/usr.bin/clang/llvm.prog.mk b/usr.bin/clang/llvm.prog.mk index 3a708805d3ea..74bed2ecd314 100644 --- a/usr.bin/clang/llvm.prog.mk +++ b/usr.bin/clang/llvm.prog.mk @@ -25,6 +25,7 @@ PACKAGE=3D clang .if ${.MAKE.OS} =3D=3D "FreeBSD" || !defined(BOOTSTRAPPING) LIBADD+=3D execinfo LIBADD+=3D tinfow +LIBADD+=3D z .endif LIBADD+=3D pthread which avoided the specific problem. But the next build attempt then got for missing Apple ObjC stuff and something involving the name renderscript : --- lldb.full --- ld: error: undefined symbol: = lldb_private::formatters::CMTimeSummaryProvider(lldb_private::ValueObject&= , lldb_private::Stream&, lldb_private::TypeSummaryOptions const&) >>> referenced by compressed_pair.h:61 = (/usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/tmp/u= sr/include/c++/v1/__memory/compressed_pair.h:61) >>> ObjCLanguage.o:(void = std::__1::__call_once_proxy<std::__1::tuple<lldb_private::ObjCLanguage::Ge= tFormatters()::$_0&&> >(void*)) in archive = /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/lib/cl= ang/liblldb/liblldb.a ld: error: undefined symbol: = lldb_private::AppleObjCRuntimeV2::Initialize() . . . ld: error: undefined symbol: lldb_private::CFBasicHash::IsValid() const >>> referenced by NSDictionary.cpp:715 = (/usr/main-src/contrib/llvm-project/lldb/source/Plugins/Language/ObjC/NSDi= ctionary.cpp:715) >>> = NSDictionary.o:(lldb_private::formatters::NSCFDictionarySyntheticFrontEnd:= :CalculateNumChildren()) in archive = /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/lib/cl= ang/liblldb/liblldb.a >>> referenced by NSSet.cpp:564 = (/usr/main-src/contrib/llvm-project/lldb/source/Plugins/Language/ObjC/NSSe= t.cpp:564) >>> = NSSet.o:(lldb_private::formatters::NSCFSetSyntheticFrontEnd::CalculateNumC= hildren()) in archive = /usr/obj/BUILDs/main-amd64-nodbg-clang-alt/usr/main-src/amd64.amd64/lib/cl= ang/liblldb/liblldb.a . . . ld: error: undefined symbol: = lldb_private::lldb_renderscript::fixupX86FunctionCalls(llvm::Module&) . . . Is the "ObjC" related material and the "renderscript" related material even supposed to be referenced or linked in? If yes, what is missing to allow the links to complete. I've not tried to get past this. There could be more that fails to build after lldb. I'm not sure if WITH_ASAN=3D WITH_UBSAN=3D is supposed to do anything for buildkernel but I've not managed to get a buildworld to finish everything yet. May be src.conf is just ahead of what the build environment is set up for? For reference, at the time I was having the following build itself with the WITH_ASAN=3D WITH_UBSAN=3D added (manually line-split for readability): # uname -apKU FreeBSD amd64_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #21 main-n252010-254e4e5b77d7-dirty: Tue Dec 28 15:54:08 PST 2021 = root@amd64_ZFS:/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.a= md64/sys/GENERIC-NODBG amd64 amd64 1400045 1400045 =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?2034FBE8-FD43-499B-B400-16F03BAE3D54>