[SERVER-20329] MongoDB 3.0.5 and newer not compiling on CentOS7/RHEL7 anymore Created: 09/Sep/15  Updated: 22/Sep/15  Resolved: 22/Sep/15

Status: Closed
Project: Core Server
Component/s: Build, Packaging, Portability
Affects Version/s: 3.0.5, 3.0.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Stream PP Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-19746 3.0.5 fails to build without c++11 Closed
duplicates SERVER-19755 scons should require c++11 on 3.0 Closed
Operating System: ALL
Steps To Reproduce:

1.)

scons all \
        %{?_smp_mflags} \
        --use-system-all  \
        --variant-dir=build%{?dist} \
        --ssl \
        --disable-warnings-as-errors \
        --wiredtiger=on

2)

g++ -o build/build.el7/mongo/shell/shell_utils_launcher.o -c -Wnon-virtual-dtor -Woverloaded-virtual -O2 -g1 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -D_SCONS -DMONGO_EXPOSE_MACROS -DPCRE_STATIC -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DMONGO_HAVE_GCC_ATOMIC_BUILTINS -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_VERSION=2 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -DMONGO_HAVE_FIPS_MODE_SET -Isrc/third_party/s2 -Ibuild/build.el7 -Isrc src/mongo/shell/shell_utils_launcher.cpp
src/mongo/shell/bench.cpp: In member function 'void mongo::BenchRunWorker::generateLoadOnConnection(mongo::DBClientBase*)':
src/mongo/shell/bench.cpp:379:17: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
                 auto& stats = shouldCollectStats() ? _stats : _statsBlackHole;
                 ^
src/mongo/shell/bench.cpp:379:23: error: ISO C++ forbids declaration of 'stats' with no type [-fpermissive]
                 auto& stats = shouldCollectStats() ? _stats : _statsBlackHole;
                       ^
src/mongo/shell/bench.cpp:379:63: error: invalid initialization of reference of type 'int&' from expression of type 'mongo::BenchRunStats'
                 auto& stats = shouldCollectStats() ? _stats : _statsBlackHole;
                                                               ^
src/mongo/shell/bench.cpp:429:61: error: request for member 'findOneCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.findOneCounter);
                                                             ^
src/mongo/shell/bench.cpp:439:39: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                                 stats.errCount++;
                                       ^
src/mongo/shell/bench.cpp:453:61: error: request for member 'commandCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.commandCounter);
                                                             ^
src/mongo/shell/bench.cpp:461:35: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                             stats.errCount++;
                                   ^
src/mongo/shell/bench.cpp:468:39: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                                 stats.errCount++;
                                       ^
src/mongo/shell/bench.cpp:493:61: error: request for member 'queryCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.queryCounter);
                                                             ^
src/mongo/shell/bench.cpp:498:61: error: request for member 'queryCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.queryCounter);
                                                             ^
src/mongo/shell/bench.cpp:515:39: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                                 stats.errCount++;
                                       ^
src/mongo/shell/bench.cpp:534:61: error: request for member 'updateCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.updateCounter);
                                                             ^
src/mongo/shell/bench.cpp:568:43: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                                     stats.errCount++;
                                           ^
src/mongo/shell/bench.cpp:586:61: error: request for member 'insertCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.insertCounter);
                                                             ^
src/mongo/shell/bench.cpp:615:43: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                                     stats.errCount++;
                                           ^
src/mongo/shell/bench.cpp:635:61: error: request for member 'deleteCounter' in 'stats', which is of non-class type 'int'
                             BenchRunEventTrace _bret(&stats.deleteCounter);
                                                             ^
src/mongo/shell/bench.cpp:667:43: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                                     stats.errCount++;
                                           ^
src/mongo/shell/bench.cpp:697:31: error: request for member 'error' in 'stats', which is of non-class type 'int'
                         stats.error = true;
                               ^
src/mongo/shell/bench.cpp:701:27: error: request for member 'opCount' in 'stats', which is of non-class type 'int'
                     stats.opCount++;
                           ^
src/mongo/shell/bench.cpp:722:35: error: request for member 'trappedErrors' in 'stats', which is of non-class type 'int'
                             stats.trappedErrors.push_back( BSON( "error" << ex.what() << "op" << e << "count" << count ) );
                                   ^
src/mongo/shell/bench.cpp:728:27: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                     stats.errCount++;
                           ^
src/mongo/shell/bench.cpp:734:27: error: request for member 'errCount' in 'stats', which is of non-class type 'int'
                     stats.errCount++;
                           ^
src/mongo/shell/bench.cpp: In static member function 'static mongo::BSONObj mongo::BenchRunner::finish(mongo::BenchRunner*)':
src/mongo/shell/bench.cpp:914:10: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
          auto appendPerSec = [&buf, runner](StringData name, double total) {
          ^
src/mongo/shell/bench.cpp:914:15: error: 'appendPerSec' does not name a type
          auto appendPerSec = [&buf, runner](StringData name, double total) {
               ^
src/mongo/shell/bench.cpp:918:50: error: 'appendPerSec' was not declared in this scope
          appendPerSec("totalOps/s", stats.opCount);
                                                  ^
scons: *** [build/build.el7/mongo/shell/bench.o] Error 1
scons: building terminated because of errors.

Participants:

 Description   

MongoDB 3.0.5 and newer not compiling on CentOS7/RHEL7 anymore.
CentOS 7.1 with latest updates.

3.0.4 builds just fine, 3.0.5 and 3.0.6 - not.

scons-2.3.1-2.el7.noarch

v8-devel-3.14.5.10-3.el7.x86_64
v8-3.14.5.10-3.el7.x86_64

boost-serialization-1.53.0-23.el7.x86_64
boost-math-1.53.0-23.el7.x86_64
boost-timer-1.53.0-23.el7.x86_64
boost-atomic-1.53.0-23.el7.x86_64
boost-system-1.53.0-23.el7.x86_64
boost-chrono-1.53.0-23.el7.x86_64
boost-regex-1.53.0-23.el7.x86_64
boost-thread-1.53.0-23.el7.x86_64
boost-wave-1.53.0-23.el7.x86_64
boost-test-1.53.0-23.el7.x86_64
boost-locale-1.53.0-23.el7.x86_64
boost-signals-1.53.0-23.el7.x86_64
boost-python-1.53.0-23.el7.x86_64
boost-program-options-1.53.0-23.el7.x86_64
boost-random-1.53.0-23.el7.x86_64
boost-devel-1.53.0-23.el7.x86_64
boost-date-time-1.53.0-23.el7.x86_64
boost-graph-1.53.0-23.el7.x86_64
boost-iostreams-1.53.0-23.el7.x86_64
boost-context-1.53.0-23.el7.x86_64
boost-1.53.0-23.el7.x86_64
boost-filesystem-1.53.0-23.el7.x86_64

glibc-devel-2.17-78.el7.x86_64
glibc-common-2.17-78.el7.x86_64
glibc-2.17-78.el7.x86_64
glibc-headers-2.17-78.el7.x86_64

libgcc-4.8.3-9.el7.x86_64
gcc-4.8.3-9.el7.x86_64
gcc-c++-4.8.3-9.el7.x86_64



 Comments   
Comment by Ramon Fernandez Marina [ 22/Sep/15 ]

Thanks for the additional information streampp, I'm going to mark this ticket as a duplicate as there's already two other tickets that are being used to deal with building 3.0.5+.

Regards,
Ramón.

Comment by Matthias Saou [ 22/Sep/15 ]

See my https://jira.mongodb.org/browse/SERVER-19746?focusedCommentId=1039406&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1039406 comment. I have built 3.0.6 on RHEL7, but I did have to update boost in the process.

Comment by Ramon Fernandez Marina [ 09/Sep/15 ]

streampp, I think this is the same issue reported in SERVER-19746.

Generated at Thu Feb 08 03:53:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.