[SERVER-32031] Scons Install Fails with Errors Created: 18/Nov/17  Updated: 07/Jan/18  Resolved: 01/Dec/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.10
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Robert Simmons Assignee: Mark Benvenuto
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-30711 Mongo build failure [-Werror=noexcept... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

This is using a clean 17.10 x64 with GCC 7.2.

Participants:

 Description   

After building, the install process using scons fails with a number of errors:

Compiling build/opt/mongo/platform/stack_locator_linux.o
In file included from src/mongo/platform/stack_locator_pthread_getattr_np.cpp:36:0,
                 from src/mongo/platform/stack_locator_linux.cpp:29:
src/mongo/util/scopeguard.h: In instantiation of 'mongo::ScopeGuardImpl1<F, P1> mongo::MakeGuard(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]':
src/mongo/platform/stack_locator_pthread_getattr_np.cpp:45:51:   required from here
src/mongo/util/scopeguard.h:154:7: error: mangled name for 'mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>::ScopeGuardImpl1(const mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>&)' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
 class ScopeGuardImpl1 : public ScopeGuardImplBase {
       ^~~~~~~~~~~~~~~
src/mongo/util/scopeguard.h:154:7: error: mangled name for 'mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>::ScopeGuardImpl1(const mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>&)' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
src/mongo/util/scopeguard.h:177:53: note: synthesized method 'mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>::ScopeGuardImpl1(const mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>&)' first required here
     return ScopeGuardImpl1<F, P1>::MakeGuard(fun, p1);
                                                     ^
src/mongo/util/scopeguard.h: In instantiation of 'mongo::ScopeGuardImpl1<F, P1>::~ScopeGuardImpl1() [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]':
src/mongo/platform/stack_locator_pthread_getattr_np.cpp:45:51:   required from here
src/mongo/util/scopeguard.h:160:5: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1>::~ScopeGuardImpl1() [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     ~ScopeGuardImpl1() throw() {
     ^
src/mongo/util/scopeguard.h:160:5: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1>::~ScopeGuardImpl1() [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
src/mongo/util/scopeguard.h: In instantiation of 'mongo::ScopeGuardImpl1<F, P1>::ScopeGuardImpl1(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]':
src/mongo/util/scopeguard.h:157:16:   required from 'static mongo::ScopeGuardImpl1<F, P1> mongo::ScopeGuardImpl1<F, P1>::MakeGuard(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]'
src/mongo/util/scopeguard.h:177:45:   required from 'mongo::ScopeGuardImpl1<F, P1> mongo::MakeGuard(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]'
src/mongo/platform/stack_locator_pthread_getattr_np.cpp:45:51:   required from here
src/mongo/util/scopeguard.h:169:5: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1>::ScopeGuardImpl1(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     ScopeGuardImpl1(F fun, P1 p1) : fun_(fun), p1_(p1) {}
     ^~~~~~~~~~~~~~~
src/mongo/util/scopeguard.h:169:5: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1>::ScopeGuardImpl1(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
src/mongo/util/scopeguard.h:164:10: error: mangled name for 'void mongo::ScopeGuardImpl1<F, P1>::Execute() [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     void Execute() {
          ^~~~~~~
src/mongo/util/scopeguard.h:169:5: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1>::ScopeGuardImpl1(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     ScopeGuardImpl1(F fun, P1 p1) : fun_(fun), p1_(p1) {}
     ^~~~~~~~~~~~~~~
src/mongo/util/scopeguard.h:96:17: error: mangled name for 'static void mongo::ScopeGuardImplBase::SafeExecute(J&) [with J = mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     static void SafeExecute(J& j) throw() {
                 ^~~~~~~~~~~
src/mongo/util/scopeguard.h:156:35: error: mangled name for 'static mongo::ScopeGuardImpl1<F, P1> mongo::ScopeGuardImpl1<F, P1>::MakeGuard(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     static ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1) {
                                   ^~~~~~~~~
src/mongo/util/scopeguard.h:160:5: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1>::~ScopeGuardImpl1() [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
     ~ScopeGuardImpl1() throw() {
     ^
src/mongo/util/scopeguard.h:176:31: error: mangled name for 'mongo::ScopeGuardImpl1<F, P1> mongo::MakeGuard(F, P1) [with F = int (*)(pthread_attr_t*) throw (); P1 = pthread_attr_t*]' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
 inline ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1) {
                               ^~~~~~~~~
src/mongo/util/scopeguard.h:154:7: error: mangled name for 'mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>::ScopeGuardImpl1(const mongo::ScopeGuardImpl1<int (*)(pthread_attr_t*) throw (), pthread_attr_t*>&)' will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
 class ScopeGuardImpl1 : public ScopeGuardImplBase {
       ^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
scons: *** [build/opt/mongo/platform/stack_locator_linux.o] Error 1
scons: building terminated because of errors.
build/opt/mongo/platform/stack_locator_linux.o failed: Error 1
 
****  Installation failed. Aborting package creation.
 
Restoring overwritten files from backup...OK
 
Cleaning up...OK

Bye.



 Comments   
Comment by Mark Benvenuto [ 20/Nov/17 ]

You must pass --disable-warnings-as-errors to scons in order to build MongoDB with GCC 7.

Generated at Thu Feb 08 04:28:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.