Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17447

Failed to build on Linux i686 with clang

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.2
    • Affects Version/s: 3.0.0
    • Component/s: Build
    • Fully Compatible
    • ALL
    • Hide

      The build command I was using:

      scons all \
      --use-system-pcre \
      --use-system-snappy \
      --use-system-tcmalloc \
      --use-sasl-client \
      --use-system-boost \
      --variant-dir=build \
      --ssl \
      --disable-warnings-as-errors \
      --cc=clang --cxx=clang++

      Show
      The build command I was using: scons all \ --use-system-pcre \ --use-system-snappy \ --use-system-tcmalloc \ --use-sasl-client \ --use-system-boost \ --variant-dir=build \ --ssl \ --disable-warnings-as-errors \ --cc=clang --cxx=clang++
    • Platform 2 04/24/15, BUILD 2 04/24/15

      I am getting the following errors when trying to build mongodb. A quick google shows it might need a i686 build target instead of i386?

      clang++ -o build/build/mongo/db/auth/authorization_session.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -march=nocona -mtune=generic -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -fno-builtin-memcmp -D_SCONS -DMONGO_EXPOSE_MACROS -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_THREAD_VERSION=2 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Ibuild/build -Isrc src/mongo/db/auth/authorization_session.cpp
      build/build/mongo/client/dbclient.o: In function `mongo::AtomicIntrinsics<long long, void>::fetchAndAdd(long long volatile*, long long)':
      /build/mongodb/src/mongodb-src-r3.0.0/src/mongo/platform/atomic_intrinsics_gcc_atomic.h:72: undefined reference to `__atomic_fetch_add_8'
      build/build/mongo/client/dbclient_rs.o: In function `mongo::AtomicIntrinsics<long long, void>::fetchAndAdd(long long volatile*, long long)':
      /build/mongodb/src/mongodb-src-r3.0.0/src/mongo/platform/atomic_intrinsics_gcc_atomic.h:72: undefined reference to `__atomic_fetch_add_8'
      build/build/mongo/client/syncclusterconnection.o: In function `mongo::AtomicIntrinsics<long long, void>::fetchAndAdd(long long volatile*, long long)':
      /build/mongodb/src/mongodb-src-r3.0.0/src/mongo/platform/atomic_intrinsics_gcc_atomic.h:72: undefined reference to `__atomic_fetch_add_8'
      /build/mongodb/src/mongodb-src-r3.0.0/src/mongo/platform/atomic_intrinsics_gcc_atomic.h:72: undefined reference to `__atomic_fetch_add_8'
      /build/mongodb/src/mongodb-src-r3.0.0/src/mongo/platform/atomic_intrinsics_gcc_atomic.h:72: undefined reference to `__atomic_fetch_add_8'
      build/build/mongo/client/syncclusterconnection.o:/build/mongodb/src/mongodb-src-r3.0.0/src/mongo/platform/atomic_intrinsics_gcc_atomic.h:72: more undefined references to `__atomic_fetch_add_8' follow
      clang++ -o build/build/mongo/db/auth/authz_documents_update_guard.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -march=nocona -mtune=generic -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -fno-builtin-memcmp -D_SCONS -DMONGO_EXPOSE_MACROS -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_THREAD_VERSION=2 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Ibuild/build -Isrc src/mongo/db/auth/authz_documents_update_guard.cpp
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      scons: *** [build/build/mongo/mongo] Error 1
      scons: building terminated because of errors.

            Assignee:
            Unassigned Unassigned
            Reporter:
            felixonmars Felix Yan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: