[lldb-dev] [Bug 36817] New: error: ‘sort’ is not a member of ‘llvm’

via lldb-dev lldb-dev at lists.llvm.org
Tue Mar 20 01:21:18 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36817

            Bug ID: 36817
           Summary: error: ‘sort’ is not a member of ‘llvm’
           Product: lldb
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: ygolanski at isotek.co.uk
                CC: llvm-bugs at lists.llvm.org

I am compiling LLVM from source (no packages for CentOS 7 which I use) and it
compiles fine with ninja. However, when I add LLDB, I get the above error. 

I am 99% sure that this is something not right on my system, but I cannot
fathom what it is.

```
; uname -a                                                                      
Linux serval.isotek.co.uk 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux      
; ninja-build --version                                                         
1.7.2                                    
; gcc -v                                                                        
Using built-in specs.                                                           
COLLECT_GCC=gcc                                                                 
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper      
Target: x86_64-redhat-linux                                                     
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --disable-libgcj
--with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64
--build=x86_64-redhat-linux                    
Thread model: posix                                                             
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)    
```

Here is the full stack trace:

```
; ninja-build lldb                                                              
[3/752] Building CXX object tools/lldb...es/lldbBreakpoint.dir/Breakpoint.cpp.o 
FAILED:
tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/Breakpoint.cpp.o     
/usr/bin/c++   -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_CONFIGURATION_DEBUG
-DLLDB_USE_BUILTIN_DEMANGLER -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/lldb/source/Breakpoint
-I/home/yann/src/llvm/tools/lldb/source/Breakpoint -Itools/lldb/include
-I/home/yann/src/llvm/tools/lldb/include -I/usr/include/libxml2 -Iinclude
-I/home/yann/src/llvm/include -I/usr/include/python2.7
-I/home/yann/src/llvm/tools/clang/include -Itools/lldb/../clang/include
-I/home/yann/src/llvm/tools/lldb/source/. -fPIC -fvisibility-inlines-hidden
-std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing
-Wno-deprecated-register -Wno-vla-extension -g -MD -MT
tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/Breakpoint.cpp.o -MF
tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/Breakpoint.cpp.o.d
-o tools/lldb/source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/Breakpoint.cpp.o
-c /home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp              
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp: In member
function ‘void lldb_private::Breakpoint::ModuleReplaced(lldb::ModuleSP,
lldb::ModuleSP)’:                                                               
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp:795:13: error:
‘sort’ is not a member of ‘llvm’                                                
             llvm::sort(old_id_vec.begin(), old_id_vec.end());                  
             ^                                                                  
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp:795:13: note:
suggested alternative:                                                          
In file included from /usr/include/c++/4.8.2/algorithm:62:0,                    
                 from /home/yann/src/llvm/include/llvm/ADT/Optional.h:23,       
                 from /home/yann/src/llvm/include/llvm/ADT/STLExtras.h:20,      
                 from /home/yann/src/llvm/include/llvm/ADT/StringRef.h:13,      
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h:13,     
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/lldb-private.h:16,                  
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointID.h:18,       
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h:22,         
                 from
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp:16:             
/usr/include/c++/4.8.2/bits/stl_algo.h:5483:5: note:   ‘std::sort’              
     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,          
     ^                                                                          
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp:796:13: error:
‘sort’ is not a member of ‘llvm’                                                
             llvm::sort(new_id_vec.begin(), new_id_vec.end());                  
             ^                                                                  
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp:796:13: note:
suggested alternative:                                                          
In file included from /usr/include/c++/4.8.2/algorithm:62:0,                    
                 from /home/yann/src/llvm/include/llvm/ADT/Optional.h:23,       
                 from /home/yann/src/llvm/include/llvm/ADT/STLExtras.h:20,      
                 from /home/yann/src/llvm/include/llvm/ADT/StringRef.h:13,      
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h:13,     
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/lldb-private.h:16,                  
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointID.h:18,       
                 from
/home/yann/src/llvm/tools/lldb/include/lldb/Breakpoint/Breakpoint.h:22,         
                 from
/home/yann/src/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp:16:             
/usr/include/c++/4.8.2/bits/stl_algo.h:5483:5: note:   ‘std::sort’              
     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,          
     ^                                                                          
At global scope:                                                                
cc1plus: warning: unrecognized command line option "-Wno-vla-extension"
[enabled by default]                                                            
cc1plus: warning: unrecognized command line option "-Wno-deprecated-register"
[enabled by default]                                                            
[12/752] Building CXX object
tools/lldb/source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectMemory.cpp.o 
ninja: build stopped: subcommand failed.     
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180320/7b5bed5c/attachment.html>


More information about the lldb-dev mailing list