System wrappers break build with libc++ 9
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr68 wontfix, firefox70 wontfix, firefox71 wontfix, firefox72 wontfix, firefox75 fixed)
People
(Reporter: jbeich, Assigned: val)
References
Details
Attachments
(1 file)
Regressed by https://github.com/llvm/llvm-project/commit/1670772adc0e
$ c++ --version
FreeBSD clang version 9.0.0 (tags/RELEASE_900/final 372316) (based on LLVM 9.0.0)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
$ ./mach bootstrap
$ ./mach build
[...]
c++ -o Unified_cpp_gfx_graphite2_src1.o -c -Iobjdir/dist/stl_wrappers -Iobjdir/dist/system_wrappers -include config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DGRAPHITE2_STATIC '-DPACKAGE_VERSION="moz"' '-DPACKAGE_BUGREPORT="http://bugzilla.mozilla.org/"' -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE '-DGRAPHITE2_CUSTOM_HEADER="MozGrMalloc.h"' -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -Igfx/graphite2/src -Iobjdir/gfx/graphite2/src -Iobjdir/dist/include -Iobjdir/dist/include/nspr -Iobjdir/dist/include/nss -fPIC -DMOZILLA_CLIENT -include objdir/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -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 -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -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 -Wno-return-type-c-linkage -fno-sized-deallocation -fno-aligned-new -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pipe -O -fno-omit-frame-pointer -funwind-tables -MD -MP -MF .deps/Unified_cpp_gfx_graphite2_src1.o.pp Unified_cpp_gfx_graphite2_src1.cpp
In file included from Unified_cpp_gfx_graphite2_src1.cpp:2:
In file included from gfx/graphite2/src/Segment.cpp:27:
In file included from gfx/graphite2/src/inc/UtfCodec.h:29:
In file included from objdir/dist/stl_wrappers/cstdlib:44:
In file included from objdir/dist/system_wrappers/cstdlib:3:
In file included from /usr/include/c++/v1/cstdlib:85:
In file included from objdir/dist/system_wrappers/stdlib.h:3:
In file included from /usr/include/c++/v1/stdlib.h:100:
In file included from objdir/dist/system_wrappers/math.h:3:
In file included from /usr/include/c++/v1/math.h:311:
In file included from objdir/dist/stl_wrappers/type_traits:50:
In file included from objdir/dist/include/mozilla/mozalloc.h:31:
In file included from objdir/dist/stl_wrappers/new:44:
In file included from objdir/dist/system_wrappers/new:3:
In file included from /usr/include/c++/v1/new:90:
In file included from objdir/dist/system_wrappers/exception:3:
/usr/include/c++/v1/exception:180:5: error: no member named 'abort' in namespace 'std::__1'; did you mean simply
'abort'?
_VSTD::abort();
^~~~~~~
/usr/include/c++/v1/__config:759:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
^
/usr/include/stdlib.h:86:17: note: 'abort' declared here
_Noreturn void abort(void);
^
1 error generated.
Comment 1•6 years ago
|
||
Fwiw, with the LLVM licence change it's unlikely OpenBSD will get libc++9 in base, but at some point maybe llvm 9 in ports. I'll keep that bug # in mind may that happen...
Comment 2•6 years ago
|
||
Oh, I had the same issue, I thought it was me :)
Do you have a pointer about the license issue?
Comment 3•6 years ago
|
||
The relicencing to apache 2.0 in branch 9 is deemed unacceptable by OpenBSD (cant find a recent link right now about why, but you get the idea..)
Comment 4•6 years ago
|
||
https://lists.llvm.org/pipermail/llvm-dev/2017-April/112300.html has explanations about why OpenBSD developers consider this llvm licence change bad.
Comment 5•6 years ago
|
||
Note that this doesn't only affect BSDs but any system using libc++9
Comment 6•6 years ago
|
||
The system_wrappers are not causing it, the stl_wrappers are.
In libc++9 cstdlib includes stdlib.h before defining std::__1::abort, stdlib.h includes math.h which includes type_traits. firefox stl_wrappers ovverride this include and make it use mozalloc.h which includes new which includes exception which uses std::__1::abort which hasn't been defined yet. exception includes cstdlib but we're already in cstdlib as per the first step.
Comment 8•6 years ago
|
||
Defining _LIBCPP_NO_EXCEPTIONS should make it work
Assignee | ||
Comment 10•6 years ago
|
||
#define moz_dont_include_mozalloc_for_type_traits
in config/gcc-stl-wrapper.template.h
(and removing the generated dist/stl_wrappers
) helps
Assignee | ||
Comment 11•6 years ago
|
||
actually now ...for_limits
is also required
Assignee | ||
Comment 12•5 years ago
|
||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•