Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-1139

[C++] dlmalloc doesn't allow arrow to be built with clang 4 or gcc 7.1.1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.1
    • Fix Version/s: 0.5.0
    • Component/s: C++
    • Labels:
      None

      Description

      When building arrow with clang 4.0.0 I see the following error when building the plasma store:

      In file included from /home/phillip/code/cpp/arrow/cpp/src/plasma/malloc.cc:45:                                                                                           
      /home/phillip/code/cpp/arrow/cpp/src/plasma/thirdparty/dlmalloc.c:592:5: error: macro expansion                                                                      
            producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]                                                                      
      #if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */                                                                                          
          ^                                                                                                                                                            
      /home/phillip/code/cpp/arrow/cpp/src/plasma/thirdparty/dlmalloc.c:588:22: note: expanded from                                                                         
            macro 'USE_LOCKS'                                                                                                                                                                        
      #define USE_LOCKS  ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
      

      and this error when building with clang 4.0.0 and gcc 7.1.1:

      In file included from /home/phillip/code/cpp/arrow/cpp/src/plasma/malloc.cc:45:0:              
      /home/phillip/code/cpp/arrow/cpp/src/plasma/thirdparty/dlmalloc.c:648:0: error: "_GNU_SOURCE" redefined [-Werror]
       #define _GNU_SOURCE /* Turns on mremap() definition */                                
                                                                                                     
      <command-line>:0:0: note: this is the location of the previous definition                      
      cc1plus: all warnings being treated as errors                                                  
      make[2]: *** [src/plasma/CMakeFiles/plasma_objlib.dir/build.make:207: src/plasma/CMakeFiles/plasma_objlib.dir/malloc.cc.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:657: src/plasma/CMakeFiles/plasma_objlib.dir/all] Error 2
      make: *** [Makefile:141: all] Error 2
      

        Attachments

          Activity

            People

            • Assignee:
              pcmoritz Philipp Moritz
              Reporter:
              cpcloud Phillip Cloud
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: