Closed Bug 1628567 Opened 4 years ago Closed 7 months ago

Fails to build with Clang on FreeBSD

Categories

(Firefox Build System :: General: Unsupported Platforms, defect)

Unspecified
FreeBSD
defect

Tracking

(firefox-esr68 unaffected, firefox74 unaffected, firefox75 unaffected, firefox76 wontfix, firefox77 wontfix)

RESOLVED WORKSFORME
Tracking Status
firefox-esr68 --- unaffected
firefox74 --- unaffected
firefox75 --- unaffected
firefox76 --- wontfix
firefox77 --- wontfix

People

(Reporter: jbeich, Unassigned)

References

Details

(Keywords: regression)

Regressed by https://hg.mozilla.org/mozilla-central/rev/83a01c8c31c7a7c3ffeaefee061611efb33951d5

Rust (or maybe bindgen) now invokes $(CXX) but passes --target=x86_64-unknown-freebsd (missing OS version) which makes Clang believe it's building for FreeBSD < 10 with libstdc++. However, libstdc++ is no longer shipped as part of base system and unlike ports version never supported C++11 due to being stuck with GPLv2.

$ c++ --version
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
Target: x86_64-unknown-freebsd12.1
Thread model: posix
InstalledDir: /usr/bin

$ ./mach bootstrap
$ ./mach build
[...]
error: failed to run custom build command for `mozglue-static v0.1.0 (mozglue/static/rust)`

Caused by:
  process didn't exit successfully: `objdir/release/build/mozglue-static-9235dda0152d02ae/build-script-build` (exit code: 1)
--- stdout
TARGET = Some("x86_64-unknown-freebsd")
OPT_LEVEL = Some("2")
HOST = Some("x86_64-unknown-freebsd")
CXX_x86_64-unknown-freebsd = None
CXX_x86_64_unknown_freebsd = Some(" /usr/bin/clang++ -std=gnu++17")
CXXFLAGS_x86_64-unknown-freebsd = None
CXXFLAGS_x86_64_unknown_freebsd = Some("-Iobjdir/dist/stl_wrappers -Iobjdir/dist/system_wrappers -include config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -Itoolkit/library/rust -Iobjdir/toolkit/library/rust -Iobjdir/dist/include -Iobjdir/dist/include/nspr -Iobjdir/dist/include/nss -fPIC -DMOZILLA_CLIENT -include objdir/mozilla-config.h -Qunused-arguments -I/usr/local/include -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pipe -O -fno-omit-frame-pointer -funwind-tables -DMOZILLA_CONFIG_H")
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "/usr/bin/clang++" "-std=gnu++17" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-freebsd" "-Iobjdir/dist/stl_wrappers" "-Iobjdir/dist/system_wrappers" "-include" "config/gcc_hidden.h" "-U_FORTIFY_SOURCE" "-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-DNDEBUG=1" "-DTRIMMED=1" "-Itoolkit/library/rust" "-Iobjdir/toolkit/library/rust" "-Iobjdir/dist/include" "-Iobjdir/dist/include/nspr" "-Iobjdir/dist/include/nss" "-fPIC" "-DMOZILLA_CLIENT" "-include" "objdir/mozilla-config.h" "-Qunused-arguments" "-I/usr/local/include" "-Qunused-arguments" "-Wall" "-Wbitfield-enum-conversion" "-Wempty-body" "-Wignored-qualifiers" "-Woverloaded-virtual" "-Wpointer-arith" "-Wshadow-field-in-constructor-modified" "-Wsign-compare" "-Wtype-limits" "-Wunreachable-code" "-Wunreachable-code-return" "-Wwrite-strings" "-Wno-invalid-offsetof" "-Wclass-varargs" "-Wempty-init-stmt" "-Wfloat-overflow-conversion" "-Wfloat-zero-conversion" "-Wloop-analysis" "-Wc++2a-compat" "-Wcomma" "-Wimplicit-fallthrough" "-Wunused-function" "-Wunused-variable" "-Wstring-conversion" "-Wtautological-overlap-compare" "-Wtautological-unsigned-enum-zero-compare" "-Wtautological-unsigned-zero-compare" "-Wno-error=tautological-type-limit-compare" "-Wno-inline-new-delete" "-Wno-error=deprecated-declarations" "-Wno-error=array-bounds" "-Wno-error=backend-plugin" "-Wno-error=return-std-move" "-Wno-error=atomic-alignment" "-Wformat" "-Wformat-security" "-Wno-gnu-zero-variadic-macro-arguments" "-Wno-unknown-warning-option" "-fno-sized-deallocation" "-fno-aligned-new" "-fno-exceptions" "-fno-strict-aliasing" "-fno-rtti" "-fno-exceptions" "-fno-math-errno" "-pipe" "-O" "-fno-omit-frame-pointer" "-funwind-tables" "-DMOZILLA_CONFIG_H" "-I" "objdir/js/src" "-I" "objdir/dist/include" "-DMOZ_HAS_MOZGLUE" "-o" "objdir/x86_64-unknown-freebsd/release/build/mozglue-static-2d733d2326a919a1/out/wrappers.o" "-c" "wrappers.cpp"
cargo:warning=In file included from wrappers.cpp:11:
cargo:warning=In file included from objdir/dist/include/mozilla/Assertions.h:418:
cargo:warning=In file included from objdir/dist/stl_wrappers/type_traits:52:
cargo:warning=objdir/dist/system_wrappers/type_traits:3:15: fatal error: 'type_traits' file not found
cargo:warning=#include_next <type_traits>
cargo:warning=              ^~~~~~~~~~~~~
cargo:warning=1 error generated.
exit code: 1
Flags: needinfo?(dimitry)

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (Backlog,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --

Looks like this has been fixed in LLVM 3 years ago, this shouldn't be a problem anymore.

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.