[lldb-dev] build fails on linux

dawn at burble.org dawn at burble.org
Mon Sep 26 17:41:06 PDT 2011


Thanks - I added a UpdateThreadList that returns 0.


The next error I run into is:

    [...]
    llvm[3]: Compiling ProcessLinux.cpp for Debug+Asserts build
    ProcessLinux.cpp: In member function 'virtual lldb::addr_t
    ProcessLinux::DoAllocateMemory(size_t, uint32_t, lldb_private::Error&)':
    ProcessLinux.cpp:375:145: warning: ISO C++ does not support the 'z'
    gnu_printf length modifier
    llvm[3]: Compiling ProcessMessage.cpp for Debug+Asserts build
    llvm[3]: Compiling ProcessMonitor.cpp for Debug+Asserts build
    ProcessMonitor.cpp: In member function 'virtual void
    ReadRegOperation::Execute(ProcessMonitor*)':
    ProcessMonitor.cpp:250:19: error: ambiguous overload for 'operator=' in
    '((ReadRegOperation*)this)->ReadRegOperation::m_value = data'
    /home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux/../../../../include/lldb/Core/RegisterValue.h:219:9:
    note: candidates are: void
    lldb_private::RegisterValue::operator=(uint8_t)
	/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux/../../../../include/lldb/Core/RegisterValue.h:226:9:
	note:                 void
	lldb_private::RegisterValue::operator=(uint16_t)
	/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux/../../../../include/lldb/Core/RegisterValue.h:233:9:
	note:                 void
	lldb_private::RegisterValue::operator=(uint32_t)
	[...]

Which I fixed in Linux/ProcessMonitor.cpp line 244 with:
	uint32_t data = ptrace(PTRACE_PEEKUSER, pid, m_offset, NULL);


Then I run into:
    [...]
    llvm[3]: Compiling DynamicLoaderLinuxDYLD.cpp for Debug+Asserts build
    DynamicLoaderLinuxDYLD.cpp: In member function 'virtual void
    DynamicLoaderLinuxDYLD::DidAttach()':
    DynamicLoaderLinuxDYLD.cpp:115:21: error: 'class lldb::ModuleSP' has no
    member named 'empty'
    DynamicLoaderLinuxDYLD.cpp: In member function 'virtual void
    DynamicLoaderLinuxDYLD::DidLaunch()':
    DynamicLoaderLinuxDYLD.cpp:135:21: error: 'class lldb::ModuleSP' has no
    member named 'empty'
    DynamicLoaderLinuxDYLD.cpp: In member function 'void
    DynamicLoaderLinuxDYLD::RefreshModules()':
    DynamicLoaderLinuxDYLD.cpp:267:28: error: 'class lldb::ModuleSP' has no
    member named 'empty'
    DynamicLoaderLinuxDYLD.cpp:283:28: error: 'class lldb::ModuleSP' has no
    member named 'empty'
    DynamicLoaderLinuxDYLD.cpp: In member function 'void
    DynamicLoaderLinuxDYLD::LoadAllCurrentModules()':
    DynamicLoaderLinuxDYLD.cpp:358:24: error: 'class lldb::ModuleSP' has no
    member named 'empty'
    /bin/rm: cannot remove
    `/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/DynamicLoader/Linux-DYLD/Debug+Asserts/DynamicLoaderLinuxDYLD.d.tmp':
    No such file or directory
    make[3]: ***
    [/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/DynamicLoader/Linux-DYLD/Debug+Asserts/DynamicLoaderLinuxDYLD.o]
    Error 1
    make[3]: Leaving directory
    `/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/DynamicLoader/Linux-DYLD'
    [...]


I gather Linux isn't actively supported as a platform?
Should I give up and go back to trying to get things to build on 
Mac OS X again?  There I get the gcc 4.2.1 ambiguity errors (see
previous thread).

Thanks again,
    -Dawn

On Mon, Sep 26, 2011 at 04:51:43PM -0700, Greg Clayton wrote:
> You might need to add any missing pure virtual functions that are in Process.h into the ProcessLinux.h/cpp, even if they just return errors or zero values.
> 
> On Sep 26, 2011, at 4:32 PM, dawn at burble.org wrote:
> 
> > Thank you!  That got me a little further.  Now I get:
> > 
> > make[3]: Entering directory
> > `/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux'
> > llvm[3]: Compiling ProcessLinux.cpp for Debug+Asserts build
> > ProcessLinux.cpp: In static member function 'static
> > lldb_private::Process*
> > ProcessLinux::CreateInstance(lldb_private::Target&,
> > 	lldb_private::Listener&)':
> > ProcessLinux.cpp:36:45: error: cannot allocate an object of abstract
> > type 'ProcessLinux'
> > ProcessLinux.h:27:1: note:   because the following virtual functions are
> > pure within 'ProcessLinux':
> > /home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux/../../../../include/lldb/Target/Process.h:2492:5:
> > note:    virtual uint32_t
> > lldb_private::Process::UpdateThreadList(lldb_private::ThreadList&,
> > 	lldb_private::ThreadList&)
> > ProcessLinux.cpp: In member function 'virtual lldb::addr_t
> > ProcessLinux::DoAllocateMemory(size_t, uint32_t, lldb_private::Error&)':
> > ProcessLinux.cpp:375:145: warning: ISO C++ does not support the 'z'
> > gnu_printf length modifier
> > ProcessLinux.cpp: In static member function 'static
> > lldb_private::Process*
> > ProcessLinux::CreateInstance(lldb_private::Target&,
> > 	lldb_private::Listener&)':
> > ProcessLinux.cpp:37:1: warning: control reaches end of non-void function
> > /bin/rm: cannot remove
> > `/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux/Debug+Asserts/ProcessLinux.d.tmp':
> > No such file or directory
> > make[3]: ***
> > [/home/dawn/dev/llvm_svn/tools/lldb/source/Plugins/Process/Linux/Debug+Asserts/ProcessLinux.o]
> > Error 1
> > 
> > 
> > I tried to fix it by copying the UpdateThreadList function from
> > MacOSX-Kernel/ProcessKDP.cpp (and fixing the identifiers), but that 
> > just led me into a different set of errors.
> > 
> > Thanks in advance,
> >    -Dawn
> > 
> > 
> > On Mon, Sep 26, 2011 at 04:04:55PM -0700, Sean Callanan wrote:
> >> Dawn,
> >> 
> >> I just committed r140577, which should resolve your problem.
> >> 
> >> Sean
> >> 
> >> On Sep 26, 2011, at 3:46 PM, dawn at burble.org wrote:
> >> 
> >>> 
> >>> I have lldb rev 140572.
> >>> 
> >>> I followed the instructions here: http://lldb.llvm.org/build.html
> >>> 
> >>> and updated my llvm and clang trees to the documented revision:
> >>>   $grep -m 1 llvm_revision $lldb/scripts/build-llvm.pl 
> >>>   our $llvm_revision = "137311";
> >>> 
> >>> When I build, I get:
> >>> [...]
> >>> llvm[2]: Compiling ClangUserExpression.cpp for Debug+Asserts build
> >>> In file included from ClangUserExpression.cpp:31:0:
> >>> /home/dawn/dev/llvm_svn/tools/lldb/source/Expression/../../include/lldb/Expression/ExpressionSourceCode.h:13:31:
> >>> fatal error: lldb-enumerations.h: No such file or directory
> >>> compilation terminated.
> >>> [...]
> >>> 
> >>> Please help,
> >>> Thanks,
> >>> -Dawn
> >>> 
> >>> _______________________________________________
> >>> lldb-dev mailing list
> >>> lldb-dev at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev



More information about the lldb-dev mailing list