Bug#914838: llvm-7: llvm-config-7 emits unsupported compiler option

Samuel Thibault sthibault at debian.org
Tue Nov 27 20:32:09 GMT 2018


Package: llvm-7
Version: 1:7.0.1~+rc2-7
Severity: serious
Justification: FTBFS
Affects: rustc

Hello,

Building rustc in a freshly-built sid chroot yields to:

error: failed to run custom build command for `rustc_llvm v0.0.0 (/build/rustc-1.30.0+dfsg1/src/librustc_llvm)`
process didn't exit successfully: `/build/rustc-1.30.0+dfsg1/build/x86_64-unknown-linux-gnu/stage0-codegen/release/build/rustc_llvm-e98300cde06157a6/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=/usr/lib/llvm-7/bin/llvm-config
cargo:rerun-if-env-changed=LLVM_CONFIG
cargo:rustc-cfg=llvm_component="aarch64"
cargo:rustc-cfg=llvm_component="amdgpu"
cargo:rustc-cfg=llvm_component="arm"
cargo:rustc-cfg=llvm_component="asmparser"
cargo:rustc-cfg=llvm_component="bitreader"
cargo:rustc-cfg=llvm_component="bitwriter"
cargo:rustc-cfg=llvm_component="hexagon"
cargo:rustc-cfg=llvm_component="instrumentation"
cargo:rustc-cfg=llvm_component="interpreter"
cargo:rustc-cfg=llvm_component="ipo"
cargo:rustc-cfg=llvm_component="linker"
cargo:rustc-cfg=llvm_component="lto"
cargo:rustc-cfg=llvm_component="mcjit"
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="sparc"
cargo:rustc-cfg=llvm_component="systemz"
cargo:rustc-cfg=llvm_component="webassembly"
cargo:rustc-cfg=llvm_component="x86"
cargo:rerun-if-changed-env=LLVM_RUSTLLVM
cargo:rerun-if-changed=../rustllvm/RustWrapper.cpp
cargo:rerun-if-changed=../rustllvm/llvm-rebuild-trigger
cargo:rerun-if-changed=../rustllvm/README
cargo:rerun-if-changed=../rustllvm/Linker.cpp
cargo:rerun-if-changed=../rustllvm/rustllvm.h
cargo:rerun-if-changed=../rustllvm/.editorconfig
cargo:rerun-if-changed=../rustllvm/ArchiveWrapper.cpp
cargo:rerun-if-changed=../rustllvm/PassWrapper.cpp
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("2")
HOST = Some("x86_64-unknown-linux-gnu")
CXX_x86_64-unknown-linux-gnu = Some("c++")
CXXFLAGS_x86_64-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -g -fdebug-prefix-map=/build/rustc-1.30.0+dfsg1=. -fstack-protector-strong -Wformat -Werror=format-security -m64")
DEBUG = Some("false")
running: "c++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fdebug-prefix-map=/build/rustc-1.30.0+dfsg1=." "-fstack-protector-strong" "-Wformat" "-Werror=format-security" "-m64" "-m64" "-I/usr/lib/llvm-7/include" "-fuse-ld=gold" "-fPIC" "-Wno-unused-command-line-argument" "-Wno-unknown-warning-option" "-fPIC" "-fvisibility-inlines-hidden" "-Werror=date-time" "-std=c++11" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual" "-Wno-missing-field-initializers" "-pedantic" "-Wno-long-long" "-Wno-maybe-uninitialized" "-Wno-class-memaccess" "-Wdelete-non-virtual-dtor" "-Wno-comment" "-ffunction-sections" "-fdata-sections" "-fno-common" "-Woverloaded-virtual" "-fno-strict-aliasing" "-fPIC" "-fvisibility-inlines-hidden" "-Werror=date-time" "-Werror=unguarded-availability-new" "-std=c++11" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual" "-Wmissing-field-initializers" "-pedantic" "-Wno-long-long" "-Wcovered-switch-default" "-Wno-class-memaccess" "-Wnon-virtual-dtor" "-Wdelete-non-virtual-dtor" "-Wstring-conversion" "-ffunction-sections" "-fdata-sections" "-O2" "-DNDEBUG" "-fno-exceptions" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_INTERPRETER" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MCJIT" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-o" "/build/rustc-1.30.0+dfsg1/build/x86_64-unknown-linux-gnu/stage0-codegen/x86_64-unknown-linux-gnu/release/build/rustc_llvm-1d83c744fe0bbb01/out/../rustllvm/PassWrapper.o" "-c" "../rustllvm/PassWrapper.cpp"
cargo:warning=c++: error: unrecognized command line option '-Wcovered-switch-default'; did you mean '-Wno-switch-default'?
cargo:warning=c++: error: unrecognized command line option '-Wstring-conversion'; did you mean '-Wint-conversion'?

These option seem to be coming from llvm-config-7 --cxxflags:

-I/usr/lib/llvm-7/include  -fuse-ld=gold -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-class-memaccess -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wno-class-memaccess -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -ffunction-sections -fdata-sections -O2 -DNDEBUG  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

AIUI these shouldn't have been put there if the c++ compiler doesn't
support them?

(Replacing them with spaces by hand in the llvm-config-7 binary seems to
be avoiding the issue)

Samuel

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages llvm-7 depends on:
ii  libc6           2.27-8
ii  libgcc1         1:8.2.0-9
ii  libllvm7        1:7-6
ii  libstdc++6      8.2.0-9
ii  libtinfo6       6.1+20181013-1
ii  llvm-7-runtime  1:7-6
ii  zlib1g          1:1.2.11.dfsg-1

Versions of packages llvm-7 recommends:
ii  llvm-7-dev  1:7-6

Versions of packages llvm-7 suggests:
pn  llvm-7-doc  <none>

-- no debconf information

-- 
Samuel
c> [ ] morning [ ] afternoon [ ] evening [ ] night , everyone (choose as applicable)



More information about the Pkg-llvm-team mailing list