From nobody Thu Aug 17 20:00:10 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RRbT838FZz4q55P for ; Thu, 17 Aug 2023 20:00:12 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRbT70w3jz4L2X; Thu, 17 Aug 2023 20:00:11 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net; dmarc=none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id B12B93C0199; Thu, 17 Aug 2023 20:00:10 +0000 (UTC) Date: Thu, 17 Aug 2023 20:00:10 +0000 From: Brooks Davis To: Ronald Klop Cc: freebsd-current@freebsd.org Subject: Re: building with llvm16 pkg fails in tests Message-ID: References: <76ecade1-3f42-a314-825d-6f1ba0b2dcaa@FreeBSD.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Spamd-Result: default: False [-1.58 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.88)[-0.885]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; TO_DN_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[freebsd.org]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[brooks]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCVD_TLS_LAST(0.00)[] X-Spamd-Bar: - X-Rspamd-Queue-Id: 4RRbT70w3jz4L2X On Thu, Aug 17, 2023 at 07:33:33PM +0000, Brooks Davis wrote: > On Thu, Aug 17, 2023 at 12:45:06PM +0200, Ronald Klop wrote: > > Hi, > >=20 > > To save time on my Raspberry Pi I would like to build FreeBSD using a l= lvm pkg instead of llvm in the tree. > >=20 > > My /etc/make.conf: > > WITHOUT_TOOLCHAIN=3Dyes > > LD=3D/usr/local/llvm16/bin/ld.lld > > CC=3D/usr/local/llvm16/bin/clang > > CXX=3D/usr/local/llvm16/bin/clang++ > > CPP=3D/usr/local/llvm16/bin/clang-cpp > > OBJCOPY=3D/usr/local/llvm16/bin/llvm-objcopy > >=20 > > #WITHOUT_CLEAN=3Dyes > >=20 > >=20 > > This fails in: > >=20 > > /usr/local/llvm16/bin/clang++ -O2 -pipe -fno-common -fPIE -Wno-format-z= ero-length -nobuiltininc -idirafter /usr/local/llvm16/lib/clang/16/include = -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W = -Wno-unused-parameter -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-str= ings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -W= date-time -Wmissing-variable-declarations -Wno-empty-body -Wno-string-plus-= int -Wno-unused-const-variable -Wno-error=3Dunused-but-set-parameter -O0 -g= 0 -Qunused-arguments -I/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private= -I/usr/src/contrib/googletest/googlemock/include -I/usr/src/contrib/google= test/googlemock -I/usr/src/contrib/googletest/googletest/include -I/usr/src= /contrib/googletest/googletest -I/usr/obj/usr/src/amd64.amd64/tmp/usr/inclu= de/private -DGTEST_HAS_POSIX_RE=3D1 -DGTEST_HAS_PTHREAD=3D1 -DGTEST_HAS_STR= EAM_REDIRECTION=3D1 -frtti -Wno-deprecated-copy -Wno-signed-unsigned-wchar = -DGTEST_HAS_POSIX_RE=3D1 -DGTEST_HAS_PTHREAD=3D1 -DGTEST_HAS_STREAM_REDIREC= TION=3D1 -frtti -Wno-deprecated-copy -Wno-signed-unsigned-wchar -fPIE -std= =3Dc++14 -Wno-deprecated-copy -Wno-error=3Dinconsistent-missing-override -W= no-error=3Dmissing-variable-declarations -Wno-error=3Dsign-compare -Wno-err= or=3Dunused-parameter -Wno-c++11-extensions -Wl,-zrelro -pie --ld-path=3D= /usr/local/llvm16/bin/ld.lld -o gmock-actions_test gmock-actions_test.o -l= privategmock_main -lprivategmock -lprivategtest > > ld.lld: error: undefined symbol: testing::internal::DeathTest::Create(c= har const*, testing::Matcher, std::__1::allocator> const&>, char const*, int, testing::= internal::DeathTest**) > > >>> referenced by gmock-actions_test.cc > > >>> gmock-actions_test.o:(testing::(anonymous namespace):= :BuiltInDefaultValueDeathTest_IsUndefinedForReferences_Test::TestBody()) > > >>> referenced by gmock-actions_test.cc > > >>> gmock-actions_test.o:(testing::(anonymous namespace):= :BuiltInDefaultValueDeathTest_IsUndefinedForReferences_Test::TestBody()) > > >>> referenced by gmock-actions_test.cc > > >>> gmock-actions_test.o:(testing::(anonymous namespace):= :BuiltInDefaultValueDeathTest_IsUndefinedForNonDefaultConstructibleType_Tes= t::TestBody()) > > >>> referenced 4 more times > >=20 > > ld.lld: error: undefined symbol: testing::Expectation::Expectation(std:= :__1::shared_ptr const&) > >=20 > >=20 > > Any thoughts on how to fix this? > > Compiling with the in tree llvm does work properly. >=20 > Did it work with exactly this git revision? I suspect an issue with the > recent google test update rather than an llvm16 issue. Note that for > every sync to github we build the tree with the llvm16 port (all be it > on amd64 by default). >=20 > It's worth noting one difference between your configuration and the > CI one: We don't set CC and friends directly. Instead we use > CROSS_TOOLCHAIN=3Dllvm16. FYI, here's a build and boot of aarch64 with llvm16: https://cirrus-ci.com/task/6710148899536896 -- Brooks