From nobody Thu Aug 17 19:46:25 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 4RRb9b3twKz4q4Ly for ; Thu, 17 Aug 2023 19:46:43 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-24.consmr.mail.gq1.yahoo.com (sonic311-24.consmr.mail.gq1.yahoo.com [98.137.65.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRb9Y4s8cz4G0b for ; Thu, 17 Aug 2023 19:46:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=bhikjPiQ; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692301599; bh=sF9kwWkHqxye8KQUr174M9ElGzum7aaEfHn2czAEEHA=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=bhikjPiQsnSELj0R+kX+P6KzIAoW0lb4rQQPJJSUnp0OVH1LTWkrM+yY0flmcCphATSDwcLdPRGugq1w33oknL/O9+i8scJddbd667UmUkSnQ07Ud0CkRvZVs4iJy7mp2AnFN4IsgREgqQDhPsha6ymOx7lxeydJtaodqysrpdhyUB664ZoU2wbDgA3lCOVXS/xl56FIwtZPYnVO7Qn07N2GPSa6MoKy8H8yIYzB5+XOlLEPmMWfa8bSn7lwqm5vnHBa8HhSOoXp32XR6otpAd3uDjvJmRCiV1KiDVnO1HvAunO4mPmuyFpMQQZqhTgOeo21pd8JRjZ9TMvzQZ2URw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692301599; bh=ph/S5GDtFM1NH6KXhtbaxWUigEB9aald0K4s5pb5umX=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=CBBc7arIXBYEuVLDQx1Apy4JzL/OVOp/ckQCniwRid7IqZYSlweU1HlYEWZkhDwWRqXXQsSdDoeDspY6BenNOu7oBgdxOO+in6qWxy9CqKOaNuzs+6T1nCx/Jx9EnzHnJooGjPICY5LATO2tdJjFZolY0kuINh99PKKnhea5gNe13ivrPFVsBLvdvtGID0zr1FfqIPErXMBPWV+J2Jx6XcVUVbGZ/o5YY8aGJbCtbycY0ORtrrK5A7Y6s+VPLUiMyprk0ytWE4SQJ+uNX/v6XKV6S9HcKpI3BQb2UVuBYLUubmetC2t/rKfVpQZaeB6TYpdVWfTibSOUN1AIqjBodg== X-YMail-OSG: lBXipeIVM1lKaeY0cuKpxX9tzaakoRED6f1.2C1.uPqm3GLg2.62WNLrO0WT4wb WuY2wPFR4S0J9yT4NKYP4rce9pexKugpemJFNAnLkmMgJrKhYX8lfuYGn685zinJx8.Lka13nTWF 8RoKX0QJ3PNoDmDq6QXrpuna0VAyyFMOyoBzEqvg3_eCFRumTZwpk750a6FSS6IQPDhqLsHD68.h Yr3vpkLuFUD13.w.09Dl2wUn6yz4jMGZ9TsMihsauhg4ltGmsTMWDFBfDlgqXNRbbX0FKXXVAHhS qTuj6fX7PH8rP4f9c7ILwUorje9Jkz1wRA4QehplVsfRJkgBL2PG1Pqo21WaPyMTQkOVahhue7e2 1KGfDrBeVvpFxvX3A8K9uDLa6SXP.C9NVd8xRJ0eNczaO_LPlsTUOiZ21ponQ.c0hP40eMwLBozX Fou0m7rLf4Dr78h54g3o8MfHhmvSeZxqS4E5pOZK6yMyjWwjsq_7gvo_gkyRYtzz6YXnB6lt2TT7 _wZ_yLFFipuDhmvgt7JzQnFMVgFbxOMI_siH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BJ.L.U0.E6_KB3iXAnHByEzAnikCMGXbl bJIKfHC3GVnLCRaA4hJ_V6HUsGWcNWkXBb4Y.0F_Wa06gRfBwUbUhg1BISS19pO47tv6WMqY53nu tx0HN9WQs0LYK6k9VQHBix358SdeCgw0.idr8Ec1IjuZzMVmb8.GX7_.Yb96EE1VK5tOYNF_9T3E GH6kyr.THPPDKUuG3a6yHYEHkQp8Z2b1Fm45WA5fBAX1QV79mSuu_Fe0XADy9J0HCehnRzMxLEQ7 hOABYNkxYDxIsDJPFXni7yrtxgcX3Eu0hVuqZ.PrdFMe0W.70fCuFpgwt4CUcGSG2X9HVlg2XwpR VC5IXGvogOxgGirv9twdvqhrlaqyByal6RqaFJuixkztdvJzY1_8RyAeR17mkornwxGtA0RLZPns UdE3m4AnkXySlRleq1vdmuPq2PHM3ivPR1wxvGMYkuy3yvLQDbOe849C_l.ZAONWpqePi4WoEXsm G6HV18ZSzvHU4d6G8C6AdK8VbV07ZVNzDmW67UK6o0BoxhLx1vnMGGHw3LlYPd9pdZ0Uxq8_6G6i Yec9X.S99.GPJg1IH.evaZ6rH1Uvk65kye5Gy4HaSoW5uBB8dTfgoHlTjdrrQlA5_nl7_Vu9aVN0 VZ1aW4PDD6muYMbE837MiwiaNrQWau8LB0y3Ii1XeIYwB6KtGpg1f6lf2c_MAMXRylDlO7vukmuU iRQ-- X-Sonic-MF: X-Sonic-ID: b89b20e1-e302-46a7-a1b6-2f0cdec33268 Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Thu, 17 Aug 2023 19:46:39 +0000 Received: by hermes--production-gq1-6b7c87dcf5-wb6qb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 10fe418b02a94fc944a856818b9330fd; Thu, 17 Aug 2023 19:46:36 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: building with llvm16 pkg fails in tests Message-Id: Date: Thu, 17 Aug 2023 12:46:25 -0700 To: Ronald Klop , Current FreeBSD X-Mailer: Apple Mail (2.3731.700.6) References: X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.205:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.205:from]; DKIM_TRACE(0.00)[yahoo.com:+]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4RRb9Y4s8cz4G0b Ronald Klop wrote on Date: Thu, 17 Aug 2023 10:45:06 UTC : > To save time on my Raspberry Pi I would like to build FreeBSD using a = llvm 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 More normal would likely be something like (but expressed just in command line notation below): make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=3Dllvm16 = WITHOUT_TOOLCHAIN=3Dyes buildworld buildkernel The CROSS_TOOLCHAIN hook is already present and avoids needing the explicit assignments to LD, CC, CXX, CPP, and OBJCOPY . (Those presume the host is compatible with the target, by the way. See below for notation that does not presume such --but allows such.) For reference, CROSS_TOOLCHAIN=3Dllvm16 uses: # more /usr/local/share/toolchains/llvm16.mk XCC=3D/usr/local/bin/clang16 XCXX=3D/usr/local/bin/clang++16 XCPP=3D/usr/local/bin/clang-cpp16 XLD=3D/usr/local/bin/ld.lld16 CROSS_BINUTILS_PREFIX=3D/var/empty X_COMPILER_TYPE=3Dclang that is installed as part of devel/llvm16 . > This fails in: >=20 > /usr/local/llvm16/bin/clang++ -O2 -pipe -fno-common -fPIE = -Wno-format-zero-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-strings -Wswitch = -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wdate-time = -Wmissing-variable-declarations -Wno-empty-body -Wno-string-plus-int = -Wno-unused-const-variable -Wno-error=3Dunused-but-set-parameter -O0 -g0 = -Qunused-arguments = -I/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private = -I/usr/src/contrib/googletest/googlemock/include = -I/usr/src/contrib/googletest/googlemock = -I/usr/src/contrib/googletest/googletest/include = -I/usr/src/contrib/googletest/googletest = -I/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private = -DGTEST_HAS_POSIX_RE=3D1 -DGTEST_HAS_PTHREAD=3D1 = -DGTEST_HAS_STREAM_REDIRECTION=3D1 -frtti -Wno-deprecated-copy = -Wno-signed-unsigned-wchar -DGTEST_HAS_POSIX_RE=3D1 = -DGTEST_HAS_PTHREAD=3D1 -DGTEST_HAS_STREAM_REDIRECTION=3D1 -frtti = -Wno-deprecated-copy -Wno-signed-unsigned-wchar -fPIE -std=3Dc++14 = -Wno-deprecated-copy -Wno-error=3Dinconsistent-missing-override = -Wno-error=3Dmissing-variable-declarations -Wno-error=3Dsign-compare = -Wno-error=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 -lprivategmock_main -lprivategmock -lprivategtest > ld.lld: error: undefined symbol: = testing::internal::DeathTest::Create(char 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::Te= stBody()) > >>> referenced by gmock-actions_test.cc > >>> gmock-actions_test.o:(testing::(anonymous = namespace)::BuiltInDefaultValueDeathTest_IsUndefinedForReferences_Test::Te= stBody()) > >>> referenced by gmock-actions_test.cc > >>> gmock-actions_test.o:(testing::(anonymous = namespace)::BuiltInDefaultValueDeathTest_IsUndefinedForNonDefaultConstruct= ibleType_Test::TestBody()) > >>> referenced 4 more times >=20 > ld.lld: error: undefined symbol: = testing::Expectation::Expectation(std::__1::shared_ptr const&) I'm not making claims about the specifics of this error being produced vs. not the "more normal" way. But it would be worth a try. > Any thoughts on how to fix this? > Compiling with the in tree llvm does work properly. >=20 > NB: building 14-CURRENT in a 14-CURRENT jail on 13.2-RELEASE. And this = example is my test on amd64 to make it work before I will do this in the = slow RPI4. =3D=3D=3D Mark Millard marklmi at yahoo.com