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

32-bit clang cannot compile vendored gperftools

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 4.1 Desired
    • Affects Version/s: 3.0.0
    • Component/s: Build
    • Labels:
    • ALL
    • Hide

      See description

      Show
      See description

      $ scons --cc=/usr/bin/clang --cxx=/usr/bin/clang++ CCFLAGS=-m32 LINKFLAGS=-m32 LIBS=atomic --cache --build-fast-and-loose=off -j$(grep -c ^processor /proc/cpuinfo) ./mongod
      
      ...
      
      src/third_party/gperftools-2.2/src/malloc_hook_mmap_linux.h:108:23: error:
            non-constant-expression cannot be narrowed from type 'off_t' (aka 'long long') to 'int32'
            (aka 'int') in initializer list [-Wc++11-narrowing]
                            (off_t) offset };
                            ^~~~~~~~~~~~~~
      src/third_party/gperftools-2.2/src/malloc_hook_mmap_linux.h:108:23: note: insert an explicit cast
            to silence this issue
                            (off_t) offset };
                            ^~~~~~~~~~~~~~
                            static_cast<int32>( )
      /usr/bin/clang++ -o build/cached/third_party/shim_allocator.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -m32 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -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 -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/gperftools-2.2 -Ibuild/cached -Isrc src/third_party/shim_allocator.cpp
      1 error generated.
      scons: *** [build/cached/third_party/gperftools-2.2/src/malloc_hook.o] Error 1
      src/third_party/gperftools-2.2/src/tcmalloc.cc:425:21: warning: format specifies type
            'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
                      cl, Static::sizemap()->ByteSizeForClass(cl),
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      scons: building terminated because of errors.
      

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: