pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56304: pkgsrc-2021Q2 lang/rust fails to build on NetBSD/i386 9.2



>Number:         56304
>Category:       pkg
>Synopsis:       pkgsrc-2021Q2 lang/rust fails to build on NetBSD/i386 9.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 11 17:50:00 +0000 2021
>Originator:     Izumi Tsutsui
>Release:        NetBSD 9.2 + pkgsrc-2021Q2
>Organization:
>Environment:
System: NetBSD mirage 9.2 NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
pkgsrc-2021Q2 lang/rust fails to build on NetBSD/i386 9.2:
---
 :

   Compiling getopts v0.2.21
   Compiling rustc_lexer v0.1.0 (/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/compiler/rustc_lexer)
   Compiling unicode-normalization v0.1.13
   Compiling rustc_llvm v0.0.0 (/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/compiler/rustc_llvm)
   Compiling unicode-security v0.0.5
The following warnings were emitted during compilation:

warning: llvm-wrapper/PassWrapper.cpp: In function 'void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef)':
warning: llvm-wrapper/PassWrapper.cpp:397:57: error: 'const class llvm::MCSubtargetInfo' has no member named 'getCPUTable'; did you mean 'getCPU'?
warning:    const ArrayRef<SubtargetSubTypeKV> CPUTable = MCInfo->getCPUTable();
warning:                                                          ^~~~~~~~~~~
warning:                                                          getCPU
warning: llvm-wrapper/PassWrapper.cpp: In function 'void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef)':
warning: llvm-wrapper/PassWrapper.cpp:414:58: error: 'const class llvm::MCSubtargetInfo' has no member named 'getFeatureTable'; did you mean 'getFeatureBits'?
warning:    const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getFeatureTable();
warning:                                                           ^~~~~~~~~~~~~~~
warning:                                                           getFeatureBits

error: failed to run custom build command for `rustc_llvm v0.0.0 (/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/compiler/rustc_llvm)`

Caused by:
  process didn't exit successfully: `/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/i586-unknown-netbsd/stage0-rustc/release/build/rustc_llvm-803e993867acaf16/build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=RUST_CHECK
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH
  cargo:rerun-if-env-changed=LLVM_CONFIG
  cargo:rerun-if-changed=/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/i586-unknown-netbsd/llvm/build/bin/llvm-config
  cargo:rustc-cfg=llvm_component="aarch64"
  cargo:rustc-cfg=llvm_component="arm"
  cargo:rustc-cfg=llvm_component="asmparser"
  cargo:rustc-cfg=llvm_component="avr"
  cargo:rustc-cfg=llvm_component="bitreader"
  cargo:rustc-cfg=llvm_component="bitwriter"
  cargo:rustc-cfg=llvm_component="coverage"
  cargo:rustc-cfg=llvm_component="hexagon"
  cargo:rustc-cfg=llvm_component="instrumentation"
  cargo:rustc-cfg=llvm_component="ipo"
  cargo:rustc-cfg=llvm_component="linker"
  cargo:rustc-cfg=llvm_component="lto"
  cargo:rustc-cfg=llvm_component="mips"
  cargo:rustc-cfg=llvm_component="msp430"
  cargo:rustc-cfg=llvm_component="nvptx"
  cargo:rustc-cfg=llvm_component="powerpc"
  cargo:rustc-cfg=llvm_component="riscv"
  cargo:rustc-cfg=llvm_component="sparc"
  cargo:rustc-cfg=llvm_component="systemz"
  cargo:rustc-cfg=llvm_component="webassembly"
  cargo:rustc-cfg=llvm_component="x86"
  cargo:rustc-cfg=llvm_has_msp430_asm_parser
  cargo:rerun-if-env-changed=LLVM_RUSTLLVM
  cargo:rerun-if-env-changed=LLVM_NDEBUG
  cargo:rerun-if-changed=llvm-wrapper/RustWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/PassWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/CoverageMappingWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/ArchiveWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/Linker.cpp
  cargo:rerun-if-changed=llvm-wrapper/LLVMWrapper.h
  cargo:rerun-if-changed=llvm-wrapper/.editorconfig
  cargo:rerun-if-changed=llvm-wrapper/README
  TARGET = Some("i586-unknown-netbsd")
  OPT_LEVEL = Some("3")
  HOST = Some("i586-unknown-netbsd")
  CXX_i586-unknown-netbsd = Some("c++")
  CXXFLAGS_i586-unknown-netbsd = Some("-O2 -ffunction-sections -fdata-sections -fPIC -m32 -O2 -march=i586 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/pkg/include/python3.8")
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = None
  running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-O2" "-march=i586" "-D_FORTIFY_SOURCE=2" "-I/usr/pkg/include" "-I/usr/include" "-I/usr/include/krb5" "-I/usr/pkg/include/python3.8" "-I/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/src/llvm-project/llvm/include" "-I/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/i586-unknown-netbsd/llvm/build/include" "-std=c++14" "-fno-exceptions" "-fno-rtti" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_AVR" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_COVERAGE" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MIPS" "-DLLVM_CO!
 MPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_RISCV" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DLLVM_RUSTLLVM" "-DNDEBUG" "-o" "/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/i586-unknown-netbsd/stage0-rustc/i586-unknown-netbsd/release/build/rustc_llvm-b7b88d246b31eeee/out/llvm-wrapper/PassWrapper.o" "-c" "llvm-wrapper/PassWrapper.cpp"
  cargo:warning=llvm-wrapper/PassWrapper.cpp: In function 'void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef)':
  cargo:warning=llvm-wrapper/PassWrapper.cpp:397:57: error: 'const class llvm::MCSubtargetInfo' has no member named 'getCPUTable'; did you mean 'getCPU'?
  cargo:warning=   const ArrayRef<SubtargetSubTypeKV> CPUTable = MCInfo->getCPUTable();
  cargo:warning=                                                         ^~~~~~~~~~~
  cargo:warning=                                                         getCPU
  cargo:warning=llvm-wrapper/PassWrapper.cpp: In function 'void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef)':
  cargo:warning=llvm-wrapper/PassWrapper.cpp:414:58: error: 'const class llvm::MCSubtargetInfo' has no member named 'getFeatureTable'; did you mean 'getFeatureBits'?
  cargo:warning=   const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getFeatureTable();
  cargo:warning=                                                          ^~~~~~~~~~~~~~~
  cargo:warning=                                                          getFeatureBits
  exit code: 1

  --- stderr


  error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-O2" "-march=i586" "-D_FORTIFY_SOURCE=2" "-I/usr/pkg/include" "-I/usr/include" "-I/usr/include/krb5" "-I/usr/pkg/include/python3.8" "-I/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/src/llvm-project/llvm/include" "-I/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/i586-unknown-netbsd/llvm/build/include" "-std=c++14" "-fno-exceptions" "-fno-rtti" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_AVR" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_COVERAGE" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_M!
 IPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_RISCV" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DLLVM_RUSTLLVM" "-DNDEBUG" "-o" "/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/i586-unknown-netbsd/stage0-rustc/i586-unknown-netbsd/release/build/rustc_llvm-b7b88d246b31eeee/out/llvm-wrapper/PassWrapper.o" "-c" "llvm-wrapper/PassWrapper.cpp" with args "c++" did not execute successfully (status code exit code: 1).


command did not execute successfully: "/s/obj.i386/pkgsrc/lang/rust/work.i386/rust-bootstrap/bin/cargo" "build" "--target" "i586-unknown-netbsd" "-Zbinary-dep-depinfo" "-j" "1" "--release" "--frozen" "--features" " llvm max_level_info" "--manifest-path" "/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "./x.py", line 27, in <module>
    bootstrap.main()
  File "/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1183, in main
    bootstrap(help_triggered)
  File "/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1169, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 153, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /s/obj.i386/pkgsrc/lang/rust/work.i386/rustc-1.52.1-src/build/bootstrap/debug/bootstrap -v build --stage 2 -j 1
*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/lang/rust
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/rust

---

Looks not build on official build either:
 http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/9.0_2021Q2/All/

Whole log is here:
 https://gist.github.com/tsutsui/00496e2a98128a049882c53e841692d6

It looks 'const class llvm::MCSubtargetInfo' doesn't have
getCPUTable() or >getFeatureTable():
 https://github.com/llvm/llvm-project/blob/release/11.x/llvm/include/llvm/MC/MCSubtargetInfo.h
but rust refers them?
 https://github.com/rust-lang/rust/blame/master/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp#L395

Note there is no problem on pkgsrc-2021Q1. 

>How-To-Repeat:
Just 'make package' on lang/rust on NetBSD/i386 + pkgsrc-2021Q2

>Fix:
Not sure.  Should check bootstrap binaries?

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index