[SERVER-15940] doesn't build with boost 1.57.0 Created: 04/Nov/14  Updated: 04/Nov/14  Resolved: 04/Nov/14

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

Type: Bug Priority: Major - P3
Reporter: Felix Yan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I am getting the following errors when building mongodb 2.6.5 with boost 1.57.0:

clang++ -o build/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/mongo/shell/linenoise.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -fno-builtin-memcmp -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DBOOST_THREAD_VERSION=2 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc -Isrc -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/mongo -Isrc/mongo -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/v8/include -Isrc/third_party/v8/include -Ibuild/linux2/cc_clang/cxx_clang++/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/yaml-cpp-0.5.1/include -Isrc/third_party/yaml-cpp-0.5.1/include src/mongo/shell/linenoise.cpp
In file included from src/mongo/shell/linenoise.cpp:116:
src/mongo/shell/linenoise_utf8.h:145:9: error: no member named 'swap' in namespace 'std'; did you mean simply 'swap'?
        std::swap( _len, other._len );
        ^~~~~~~~~
        swap
src/mongo/shell/linenoise_utf8.h:144:10: note: 'swap' declared here
    void swap( UtfStringMixin& other ) {
         ^
src/mongo/shell/linenoise_utf8.h:146:9: error: no member named 'swap' in namespace 'std'; did you mean simply 'swap'?
        std::swap( _cap, other._cap );
        ^~~~~~~~~
        swap
src/mongo/shell/linenoise_utf8.h:144:10: note: 'swap' declared here
    void swap( UtfStringMixin& other ) {
         ^
src/mongo/shell/linenoise_utf8.h:147:9: error: no member named 'swap' in namespace 'std'; did you mean simply 'swap'?
        std::swap( _chars, other._chars );
        ^~~~~~~~~
        swap
src/mongo/shell/linenoise_utf8.h:144:10: note: 'swap' declared here
    void swap( UtfStringMixin& other ) {
         ^
src/mongo/shell/linenoise_utf8.h:145:26: error: too many arguments to function call, expected single argument 'other', have 2 arguments
        std::swap( _len, other._len );
        ~~~~~~~~~        ^~~~~~~~~~
src/mongo/shell/linenoise_utf8.h:226:15: note: in instantiation of member function 'linenoise_utf8::UtfStringMixin<unsigned int>::swap' requested here
        this->swap( temp );
              ^
src/mongo/shell/linenoise_utf8.h:144:5: note: 'swap' declared here
    void swap( UtfStringMixin& other ) {
    ^
src/mongo/shell/linenoise_utf8.h:146:26: error: too many arguments to function call, expected single argument 'other', have 2 arguments
        std::swap( _cap, other._cap );
        ~~~~~~~~~        ^~~~~~~~~~
src/mongo/shell/linenoise_utf8.h:144:5: note: 'swap' declared here
    void swap( UtfStringMixin& other ) {
    ^
src/mongo/shell/linenoise_utf8.h:147:28: error: too many arguments to function call, expected single argument 'other', have 2 arguments
        std::swap( _chars, other._chars );
        ~~~~~~~~~          ^~~~~~~~~~~~
src/mongo/shell/linenoise_utf8.h:144:5: note: 'swap' declared here
    void swap( UtfStringMixin& other ) {
    ^
6 errors generated.



 Comments   
Comment by Ramon Fernandez Marina [ 04/Nov/14 ]

felixonmars, this is not the best forum to address your issue. The SERVER project is for reporting bugs or feature suggestions for the MongoDB server, and we officially only support building with the vendored boost. I would suggest you post your question to the mongodb-dev google group where it will reach a larger, more appropriate audience.

Comment by Felix Yan [ 04/Nov/14 ]

Same for gcc:

g++ -o build/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/mongo/shell/linenoise_utf8.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -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 -fno-builtin-memcmp -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DBOOST_THREAD_VERSION=2 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc -Isrc -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/mongo -Isrc/mongo -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/v8/include -Isrc/third_party/v8/include -Ibuild/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/third_party/yaml-cpp-0.5.1/include -Isrc/third_party/yaml-cpp-0.5.1/include src/mongo/shell/linenoise_utf8.cpp
In file included from src/mongo/shell/linenoise.cpp:116:0:
src/mongo/shell/linenoise_utf8.h: In member function 'void linenoise_utf8::UtfStringMixin<char_type>::swap(linenoise_utf8::UtfStringMixin<char_type>&)':
src/mongo/shell/linenoise_utf8.h:145:9: error: 'swap' is not a member of 'std'
         std::swap( _len, other._len );
         ^
src/mongo/shell/linenoise_utf8.h:145:9: note: suggested alternative:
In file included from src/mongo/shell/linenoise_utf8.h:18:0,
                 from src/mongo/shell/linenoise.cpp:116:
/usr/include/boost/smart_ptr/scoped_array.hpp:125:31: note:   'boost::swap'
 template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
                               ^
In file included from src/mongo/shell/linenoise.cpp:116:0:
src/mongo/shell/linenoise_utf8.h:146:9: error: 'swap' is not a member of 'std'
         std::swap( _cap, other._cap );
         ^
src/mongo/shell/linenoise_utf8.h:146:9: note: suggested alternative:
In file included from src/mongo/shell/linenoise_utf8.h:18:0,
                 from src/mongo/shell/linenoise.cpp:116:
/usr/include/boost/smart_ptr/scoped_array.hpp:125:31: note:   'boost::swap'
 template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
                               ^
In file included from src/mongo/shell/linenoise.cpp:116:0:
src/mongo/shell/linenoise_utf8.h:147:9: error: 'swap' is not a member of 'std'
         std::swap( _chars, other._chars );
         ^
src/mongo/shell/linenoise_utf8.h:147:9: note: suggested alternative:
In file included from src/mongo/shell/linenoise_utf8.h:18:0,
                 from src/mongo/shell/linenoise.cpp:116:
/usr/include/boost/smart_ptr/scoped_array.hpp:125:31: note:   'boost::swap'
 template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
                               ^
In file included from src/mongo/shell/linenoise_utf8.cpp:18:0:
src/mongo/shell/linenoise_utf8.h: In member function 'void linenoise_utf8::UtfStringMixin<char_type>::swap(linenoise_utf8::UtfStringMixin<char_type>&)':
src/mongo/shell/linenoise_utf8.h:145:9: error: 'swap' is not a member of 'std'
         std::swap( _len, other._len );
         ^
src/mongo/shell/linenoise_utf8.h:145:9: note: suggested alternative:
In file included from src/mongo/shell/linenoise_utf8.h:18:0,
                 from src/mongo/shell/linenoise_utf8.cpp:18:
/usr/include/boost/smart_ptr/scoped_array.hpp:125:31: note:   'boost::swap'
 template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
                               ^
In file included from src/mongo/shell/linenoise_utf8.cpp:18:0:
src/mongo/shell/linenoise_utf8.h:146:9: error: 'swap' is not a member of 'std'
         std::swap( _cap, other._cap );
         ^
src/mongo/shell/linenoise_utf8.h:146:9: note: suggested alternative:
In file included from src/mongo/shell/linenoise_utf8.h:18:0,
                 from src/mongo/shell/linenoise_utf8.cpp:18:
/usr/include/boost/smart_ptr/scoped_array.hpp:125:31: note:   'boost::swap'
 template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
                               ^
In file included from src/mongo/shell/linenoise_utf8.cpp:18:0:
src/mongo/shell/linenoise_utf8.h:147:9: error: 'swap' is not a member of 'std'
         std::swap( _chars, other._chars );
         ^
src/mongo/shell/linenoise_utf8.h:147:9: note: suggested alternative:
In file included from src/mongo/shell/linenoise_utf8.h:18:0,
                 from src/mongo/shell/linenoise_utf8.cpp:18:
/usr/include/boost/smart_ptr/scoped_array.hpp:125:31: note:   'boost::swap'
 template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
                               ^
scons: *** [build/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/mongo/shell/linenoise_utf8.o] Error 1
scons: *** [build/linux2/ssl/use-system-boost/use-system-pcre/use-system-snappy/use-system-tcmalloc/mongo/shell/linenoise.o] Error 1
scons: building terminated because of errors.

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