From owner-freebsd-current@freebsd.org Sun Feb 18 17:17:19 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7808F1999C for ; Sun, 18 Feb 2018 17:17:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86249808BA for ; Sun, 18 Feb 2018 17:17:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1850E1E585; Sun, 18 Feb 2018 18:17:11 +0100 (CET) From: Dimitry Andric Message-Id: <7EECF1BF-CC59-48A4-BE54-B8425AE0545F@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_106C2E11-3C8A-4B8C-A057-C94C46140F1D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Buildworld failing during llvm Date: Sun, 18 Feb 2018 18:17:10 +0100 In-Reply-To: Cc: FreeBSD Current To: Ben Woods References: X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Feb 2018 17:17:19 -0000 --Apple-Mail=_106C2E11-3C8A-4B8C-A057-C94C46140F1D Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 18 Feb 2018, at 02:52, Ben Woods wrote: > > My attempts to build FreeBSD 12-current have been failing as of yesterday > with the error below. This problem persists with current at the time of > writing this email (r329497). > > Given llvm was updated to 6.0 around that time, I suspect it is related: > https://svnweb.freebsd.org/base?view=revision&revision=329410 > > > --- clang.full --- > c++ -O2 -pipe > -I/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/clang/libclang > -I/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/clang/libllvm > -I/usr/src/contrib/llvm/tools/clang/include -I/usr/src/lib/clang/include > -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL > -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS > -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd12.0\" > -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd12.0\" > -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/amd64.amd64/tmp\" -ffunction-sections > -fdata-sections -g -O0 -Qunused-arguments > -I/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/include -std=c++11 > -fno-exceptions -fno-rtti -g -O0 -stdlib=libc++ -Wno-c++11-extensions > -Wl,--gc-sections -static -L/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib > -o clang.full cc1_main.o cc1as_main.o driver.o > /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/clang/libclang/libclang.a > /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/clang/libllvm/libllvm.a > -L/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/libz -lz > -L/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/ncurses/ncursesw > -lncursesw -L/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/libthr > -lpthread -legacy > /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/lib/clang/libllvm/libllvm.a: > could not read symbols: Malformed archive Hi Ben, This is most likely because you are setting CFLAGS to "-g -O0", which causes libllvm.a and libclang.a to become too big (>2GiB) for ar to handle. Then the linker finds the archive malformed. John Baldwin added some special handling for libraries under lib/clang, so they emit smaller debug information, so just leave out -g from your CFLAGS, buildworld will automatically take care of applying the right -g flags in all the various places. -Dimitry --Apple-Mail=_106C2E11-3C8A-4B8C-A057-C94C46140F1D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWom1FgAKCRCwXqMKLiCW o5gLAKCH4U8h/cdH8qWoWeYJgKswIe/GdgCeKwBMlFY/vQMTQI40QIn/GNiW630= =dQmj -----END PGP SIGNATURE----- --Apple-Mail=_106C2E11-3C8A-4B8C-A057-C94C46140F1D--