Open Bug 1571853 Opened 6 years ago Updated 3 years ago

Firefox build error: exception specification in declaration does not match previous declaration

Categories

(Firefox Build System :: General, defect)

68 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: treinz, Unassigned)

Details

Attachments

(1 file)

Attached file buildlog

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

  1. Download and untar firefox-68.0.1.source.tar.xz
  2. Use the following option to run ./mach build
#Set up the config options
export MOZCONFIG=`pwd`/mozconfig
cat > mozconfig << EOF
# If you have a multicore machine, all cores will be used by default.
# You can change the number of non-rust jobs by setting a valid number
# of cores in this option, but when rust crates are being compiled
# jobs will be scheduled for all the available CPU cores.
mk_add_options MOZ_MAKE_FLAGS="-j4"

# If you have installed dbus-glib, comment out this line:
# ac_add_options --disable-dbus

# If you have installed dbus-glib, and you have installed (or will install)
# wireless-tools, and you wish to use geolocation web services, comment out
# this line
ac_add_options --disable-necko-wifi

# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
# Uncomment the following line if you wish to use Mozilla Location Service
#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key

# Uncomment the following line if you wish to use Google's geolocaton API
# (needed for use with saved maps with Google Maps)
#ac_add_options --with-google-api-keyfile=$PWD/google-key

# Uncomment this line if you have installed startup-notification:
#ac_add_options --enable-startup-notification

# Uncomment the following option if you have not installed PulseAudio
ac_add_options --disable-pulseaudio
# and uncomment this if you installed alsa-lib instead of PulseAudio
ac_add_options --enable-alsa

# If you have installed GConf, comment out this line
ac_add_options --disable-gconf

# The BLFS editors recommend not changing anything below this line:
ac_add_options --prefix=/scratch/local/firefox-68.0.1
ac_add_options --enable-application=browser

ac_add_options --disable-crashreporter
ac_add_options --disable-updater
# enabling the tests will use a lot more space and significantly
# increase the build time, for no obvious benefit.
ac_add_options --disable-tests

# Optimization for size is broken with gcc7 and later
ac_add_options --enable-optimize="-O2"

ac_add_options --enable-official-branding

# From firefox-61 system cairo is not supported

ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman

# From firefox-62 --with-pthreads is not recognized

ac_add_options --with-system-bz2
#ac_add_options --with-system-jpeg
#ac_add_options --with-system-png
ac_add_options --with-system-zlib

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir
EOF

Actual results:

The build failed with the error:

11:29.42 /home/linuxbrew/.linuxbrew/bin/clang++ -o Unified_cpp_js_src_jit7.o -c  -I/scratch/Downloads/firefox-68.0/firefox-build-dir/dist/system_wrappers -include /scratch/Downloads/firefox-68.0/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DWASM_HUGE_MEMORY -DJS_HAS_CTYPES -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/scratch/Downloads/firefox-68.0/js/src/jit -I/scratch/Downloads/firefox-68.0/firefox-build-dir/js/src/jit -I/scratch/Downloads/firefox-68.0/firefox-build-dir/js/src -I/scratch/Downloads/firefox-68.0/js/src -I/scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include -I/scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /scratch/Downloads/firefox-68.0/firefox-build-dir/js/src/js-confdefs.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -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-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-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -O2 -fomit-frame-pointer -funwind-tables -fno-strict-aliasing -Werror=format -Wno-shadow  -MD -MP -MF .deps/Unified_cpp_js_src_jit7.o.pp   /scratch/Downloads/firefox-68.0/firefox-build-dir/js/src/jit/Unified_cpp_js_src_jit7.cpp
11:30.32 [style 0.0.1] cargo:rerun-if-changed=build_gecko.rs
11:30.32 [style 0.0.1] cargo:rerun-if-changed=/scratch/Downloads/firefox-68.0/firefox-build-dir/layout/style/bindgen.toml
11:30.32 [style 0.0.1] cargo:rerun-if-changed=/scratch/Downloads/firefox-68.0/layout/style/ServoBindings.toml
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:127:1: warning: replacement function 'operator new' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:130:5: error: exception specification in declaration does not match previous declaration
11:32.51 [style 0.0.1] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new:91:7: note: previous declaration is here
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:134:21: warning: replacement function 'operator new' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:139:21: warning: replacement function 'operator new[]' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:139:56: error: exception specification in declaration does not match previous declaration
11:32.51 [style 0.0.1] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new:92:7: note: previous declaration is here
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:144:21: warning: replacement function 'operator new[]' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:149:21: warning: replacement function 'operator delete' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:154:21: warning: replacement function 'operator delete' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:159:21: warning: replacement function 'operator delete[]' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/mozalloc.h:164:21: warning: replacement function 'operator delete[]' cannot be declared 'inline' [-Winline-new-delete]
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:49:22: error: no member named 'is_trivial' in namespace 'std'
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:49:33: error: 'From' does not refer to a value
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:42:33: note: declared here
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:49:40: error: no member named 'value' in the global namespace
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:52:22: error: no member named 'is_trivial' in namespace 'std'
11:32.51 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:52:33: error: 'To' does not refer to a value
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:42:20: note: declared here
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Casting.h:52:38: error: no member named 'value' in the global namespace
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Span.h:416:36: error: no type named 'nullptr_t' in namespace 'std'
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Span.h:64:25: error: no matching function for call to 'forward'
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/Span.h:663:21: note: in instantiation of function template specialization 'mozilla::narrow_cast<unsigned long, unsigned long>' requested here
11:32.52 [style 0.0.1] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:51:5: note: candidate function template not viable: no known conversion from 'unsigned long' to 'typename std::identity<unsigned long>::type &&' (aka 'unsigned long &&') for 1st argument
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:30:48: error: no member named 'declval' in namespace 'std'
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:30:68: error: expected '(' for function-style cast or type construction
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:30:69: error: expected expression
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:30:71: error: expected expression
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:31:51: error: no member named 'declval' in namespace 'std'
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:31:59: error: 'T' does not refer to a value
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:30:20: note: declared here
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:31:62: error: expected expression
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:36:52: error: no member named 'declval' in namespace 'std'
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:36:60: error: 'T' does not refer to a value
11:32.52 [style 0.0.1] /scratch/Downloads/firefox-68.0/firefox-build-dir/dist/include/mozilla/DbgMacro.h:35:20: note: declared here
11:32.52 [style 0.0.1] fatal error: too many errors emitted, stopping now [-ferror-limit=]
...

Expected results:

Build successfully. Note that my compile toolchain is in /home/linuxbrew/.linuxbrew where I have all the dependecies installed. The build system somehow still looks into /usr/lib for dependency, which shouldn't happen. I managed to build firefox 64.0 with the same setting.

The same error happens with firefox versions 67.0 and 66.0

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → General
Product: Firefox → Firefox Build System

You are trying to build with a too-old libstdc++. That's not going to work very well. Try using a newer libstdc++ by installing a newer version of GCC (6.x or better) on your system.

(In reply to Nathan Froyd [:froydnj] from comment #3)

You are trying to build with a too-old libstdc++. That's not going to work very well. Try using a newer libstdc++ by installing a newer version of GCC (6.x or better) on your system.

No, I am afraid you miss my point. I was using llvm 8 from linuxbrew (in /home/linuxbrew/.linuxbrew/bin/clang++ as shown above) and it ended up with the error

11:32.51 [style 0.0.1] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new:91:7: note: previous declaration is here

which means the build system is looking at the wrong place for dependency -- it should only look into /home/linuxbrew/.linuxbrew/lib as llvm and clang was setup that way)

Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: