ports/lang/rust
Piotr Kubaj c6547a4ed9 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 <module>
    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<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 2u> > >::operator=(llvm::SmallVectorImpl<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 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<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 2u> > >::operator=(llvm::SmallVectorImpl<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 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<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 2u> > >::operator=(llvm::SmallVectorImpl<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 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<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 2u> > >::operator=(llvm::SmallVectorImpl<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 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<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 2u> > >::operator=(llvm::SmallVectorImpl<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 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<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 2u> > >::operator=(llvm::SmallVectorImpl<std::__1::pair<llvm::BasicBlock*, llvm::SmallVector<std::__1::pair<llvm::ICmpInst*, unsigned int>, 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.
2022-03-23 16:55:55 +00:00
..
files lang/rust: Update to 1.59.0 2022-03-15 10:51:50 +01:00
distinfo lang/rust: Update to 1.59.0 2022-03-15 10:51:50 +01:00
Makefile lang/rust: fix build on powerpc on FreeBSD 13.1 and newer 2022-03-23 16:55:55 +00:00
pkg-descr
update.sh lang/rust*: Remove superfluous 'Changes' from commit log template 2022-02-03 15:02:32 +01:00