From nobody Wed Mar 23 17:05:08 2022 X-Original-To: dev-commits-ports-main@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 A7A9A1A35176; Wed, 23 Mar 2022 17:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KNvqT0hSLz3H79; Wed, 23 Mar 2022 17:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648055109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O+mMmaYT0Q0CPDbA0a7byBNHOamfsHf0rV1S5/Br5fc=; b=nvnMaJIrUx9QX5eJoOaoPm5vMn8fUxpwunGrkBH0pVwV2AfIsdnFn/43KAyo+pW8FaasUC wyrIt8fPGvBhyXq5Ju+V2PoOe64+s2dsURg11LJ+U/nk96ClovMt41B6ctrckIqdguB4uX pT4vZUjP2eAUkKfhF2Ziz/u+SGOV0Tt3I3f3bjDNmHxNxBo35XHOXEMYUvEq0/HfsTKJNS 0k7iQeA6z/UQPhA03RxvVXc94Vbo7mv8AQQLSn592PP358Dll4JuUPeFSIvNJ92YS4vq2F 2orQ0chAMH3EitiMGx9DRqt6vqaS0fCgwOBfMaCnVX4AEK71g3LOFlRnWaN0Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7D2827553; Wed, 23 Mar 2022 17:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22NH58IM090902; Wed, 23 Mar 2022 17:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22NH58qW090901; Wed, 23 Mar 2022 17:05:08 GMT (envelope-from git) Date: Wed, 23 Mar 2022 17:05:08 GMT Message-Id: <202203231705.22NH58qW090901@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: c6547a4ed92a - main - lang/rust: fix build on powerpc on FreeBSD 13.1 and newer List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6547a4ed92a9dbafd26a8ff3f758c3e60bc1959 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648055109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O+mMmaYT0Q0CPDbA0a7byBNHOamfsHf0rV1S5/Br5fc=; b=pUiXsF6U8iZ7j2Hr4fLw460JbFHIuVqBid/Z8TUNdPA9avfMGAqxVfuA0lnMlQXzkUiuIp 2XSZ+xG0qBOaripYk2sczhLvBvknV0ryc4o+FiHpAW5fAgpMmNjkOEs/lZ3TR++6BiiW56 ctKVnANX0TJJaqcLVas3Nm0z1G03olX8K2xLzCl5YD6QNSBGvPkW4f1pI1MOLNFsvjfimh bpoeSRf7SIXuSp0eJNVQA4VNkXYodI2yYI5T/U/VGkwwpM4+LbBfeggcngNSn4rr8CweWE QMMEKvXq1CHFC4SuTLrQ51FNzmH6daIIps6AMMMWhFtWVnPwaXMu1gkxFJ8/hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648055109; a=rsa-sha256; cv=none; b=ilHWYtA24a2uIaDrJqoiKh27My/JgcG5heKhU9bWSSkZlaLxDpiuYvJIw26J6RXgMkfTlB HUF6d0fe7XDMvckKCqkhTrEdalcOaYGQZnBGDz+mHcIKrMiqhbxRMqTHr1corQdK0GgwHh hCMiaPrPw1fKQYk9uh0fDafTBcdIB8mfQBKzIAahJyrfgm6IbO39fe3j3gx0a6nBLDoXRJ Xp8w2bcZi9qWuoQhMrZuKbZ2OdNCofQFmII8LDpoVZMU+6LPVgZgukhWLjZg8neI4fiYXL ykeELmBRyMcsvE8uTo0ayX2o562+f753N6phSanT5wGQoPD1gG0LCzNjJQwJYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=c6547a4ed92a9dbafd26a8ff3f758c3e60bc1959 commit c6547a4ed92a9dbafd26a8ff3f758c3e60bc1959 Author: Piotr Kubaj AuthorDate: 2022-03-23 16:55:55 +0000 Commit: Piotr Kubaj CommitDate: 2022-03-23 16:55:55 +0000 lang/rust: fix build on powerpc on FreeBSD 13.1 and newer 1. When building with RUST_BACKTRACE=1, cargo segfaults: pre-installed rustc not detected: [Errno 2] No such file or directory: 'rustc' falling back to auto-detect warning: sqlite3 not available in python, skipping build directory lock please file an issue on rust-lang/rust this is not a problem for non-concurrent x.py invocations Building rustbuild running: /wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/cargo build --manifest-path /wrkdirs/usr/ports/lang/rust/work/rustc-1.59.0-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen Traceback (most recent call last): File "x.py", line 27, in bootstrap.main() File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.59.0-src/src/bootstrap/bootstrap.py", line 1313, in main bootstrap(help_triggered) File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.59.0-src/src/bootstrap/bootstrap.py", line 1284, in bootstrap build.build_bootstrap() File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.59.0-src/src/bootstrap/bootstrap.py", line 1031, in build_bootstrap run(args, env=env, verbose=self.verbose) File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.59.0-src/src/bootstrap/bootstrap.py", line 182, in run raise RuntimeError(err) RuntimeError: failed to run: /wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/cargo build --manifest-path /wrkdirs/usr/ports/lang/rust/work/rustc-1.59.0-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen From dmesg: pid 27701 (cargo), jid 198, uid 0: exited on signal 11 2. Builds with the base LLVM 13 fail: ld: error: CallSiteSplitting.cpp:(function llvm::SmallVectorImpl, 2u> > >::operator=(llvm::SmallVectorImpl, 2u> > >&&): .text._ZN4llvm15SmallVectorImplINSt3__14pairIPNS_10BasicBlockENS_11SmallVectorINS2_IPNS_8ICmpInstEjEELj2EEEEEEaSEOSB_+0xB0): relocation R_PPC_PLTREL24 out of range: -33582208 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function llvm::SmallVectorImpl, 2u> > >::operator=(llvm::SmallVectorImpl, 2u> > >&&): .text._ZN4llvm15SmallVectorImplINSt3__14pairIPNS_10BasicBlockENS_11SmallVectorINS2_IPNS_8ICmpInstEjEELj2EEEEEEaSEOSB_+0xC8): relocation R_PPC_PLTREL24 out of range: -33582232 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function llvm::SmallVectorImpl, 2u> > >::operator=(llvm::SmallVectorImpl, 2u> > >&&): .text._ZN4llvm15SmallVectorImplINSt3__14pairIPNS_10BasicBlockENS_11SmallVectorINS2_IPNS_8ICmpInstEjEELj2EEEEEEaSEOSB_+0x1A0): relocation R_PPC_PLTREL24 out of range: -33582448 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function llvm::SmallVectorImpl, 2u> > >::operator=(llvm::SmallVectorImpl, 2u> > >&&): .text._ZN4llvm15SmallVectorImplINSt3__14pairIPNS_10BasicBlockENS_11SmallVectorINS2_IPNS_8ICmpInstEjEELj2EEEEEEaSEOSB_+0x2B8): relocation R_PPC_PLTREL24 out of range: -33582728 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function llvm::SmallVectorImpl, 2u> > >::operator=(llvm::SmallVectorImpl, 2u> > >&&): .text._ZN4llvm15SmallVectorImplINSt3__14pairIPNS_10BasicBlockENS_11SmallVectorINS2_IPNS_8ICmpInstEjEELj2EEEEEEaSEOSB_+0x2FC): relocation R_PPC_PLTREL24 out of range: -33582796 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function llvm::SmallVectorImpl, 2u> > >::operator=(llvm::SmallVectorImpl, 2u> > >&&): .text._ZN4llvm15SmallVectorImplINSt3__14pairIPNS_10BasicBlockENS_11SmallVectorINS2_IPNS_8ICmpInstEjEELj2EEEEEEaSEOSB_+0x348): relocation R_PPC_PLTREL24 out of range: -33582872 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function _GLOBAL__sub_I_CallSiteSplitting.cpp: .text._GLOBAL__sub_I_CallSiteSplitting.cpp+0x80): relocation R_PPC_PLTREL24 out of range: -33583000 is not in [-33554432, 33554431] ld: error: CallSiteSplitting.cpp:(function _GLOBAL__sub_I_CallSiteSplitting.cpp: .text._GLOBAL__sub_I_CallSiteSplitting.cpp+0xB0): relocation R_PPC_PLTREL24 out of range: -33583208 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::initializeConstantHoistingLegacyPassPass(llvm::PassRegistry&): .text._ZN4llvm40initializeConstantHoistingLegacyPassPassERNS_12PassRegistryE+0x94): relocation R_PPC_PLTREL24 out of range: -33583360 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function initializeConstantHoistingLegacyPassPassOnce(llvm::PassRegistry&): .text._ZL44initializeConstantHoistingLegacyPassPassOnceRN4llvm12PassRegistryE+0x50): relocation R_PPC_PLTREL24 out of range: -33583396 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::createConstantHoistingPass(): .text._ZN4llvm26createConstantHoistingPassEv+0x3C): relocation R_PPC_PLTREL24 out of range: -33583584 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::createConstantHoistingPass(): .text._ZN4llvm26createConstantHoistingPassEv+0x78): relocation R_PPC_PLTREL24 out of range: -33583548 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::createConstantHoistingPass(): .text._ZN4llvm26createConstantHoistingPassEv+0x98): relocation R_PPC_PLTREL24 out of range: -33583580 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::createConstantHoistingPass(): .text._ZN4llvm26createConstantHoistingPassEv+0x118): relocation R_PPC_PLTREL24 out of range: -33583852 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo const&) const: .text._ZNK4llvm20ConstantHoistingPass26findConstantInsertionPointERKNS_10consthoist12ConstantInfoE+0x240): relocation R_PPC_PLTREL24 out of range: -33584892 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo const&) const: .text._ZNK4llvm20ConstantHoistingPass26findConstantInsertionPointERKNS_10consthoist12ConstantInfoE+0x270): relocation R_PPC_PLTREL24 out of range: -33584924 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo const&) const: .text._ZNK4llvm20ConstantHoistingPass26findConstantInsertionPointERKNS_10consthoist12ConstantInfoE+0x294): relocation R_PPC_PLTREL24 out of range: -33584944 is not in [-33554432, 33554431] ld: error: ConstantHoisting.cpp:(function llvm::ConstantHoistingPass::findConstantInsertionPoint(llvm::consthoist::ConstantInfo const&) const: .text._ZNK4llvm20ConstantHoistingPass26findConstantInsertionPointERKNS_10consthoist12ConstantInfoE+0x90C): relocation R_PPC_PLTREL24 out of range: -33586536 is not in [-33554432, 33554431] Use LLVM 12 to build. --- lang/rust/Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lang/rust/Makefile b/lang/rust/Makefile index b6044d2effb4..8d4d53160eb2 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -38,8 +38,7 @@ CPE_VENDOR= rust-lang MAKE_ENV= DESTDIR=${STAGEDIR} \ LIBGIT2_NO_PKG_CONFIG=1 \ - OPENSSL_DIR="${OPENSSLBASE}" \ - RUST_BACKTRACE=1 + OPENSSL_DIR="${OPENSSLBASE}" TEST_ENV= ${MAKE_ENV} \ ALLOW_NONZERO_RLIMIT_CORE=1 @@ -96,8 +95,16 @@ IGNORE= is only for FreeBSD .if ${ARCH} == powerpc # bfd to link rustc_driver; lld currently can't -BUILD_DEPENDS+= ld.bfd:devel/binutils +BUILD_DEPENDS+= ld.bfd:devel/binutils \ + clang12:devel/llvm12 +BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp12 \ + cc=${LOCALBASE}/bin/clang12 \ + c++=${LOCALBASE}/bin/clang++12 \ + ar=${LOCALBASE}/bin/llvm-ar12 \ + nm=${LOCALBASE}/bin/llvm-nm12 \ + ld=${LOCALBASE}/bin/ld.lld12 .else +MAKE_ENV+= RUST_BACKTRACE=1 # rls needs 64-bit atomics _RUST_TOOLS+= rls .endif