[lldb-dev] unable to build lldb on linux

Todd Fiala tfiala at google.com
Sat Apr 5 15:49:30 PDT 2014


> It looks like there might be a build error in top of tree based on your
output, I will check in a minute on my end.

I was able to make a clean build with cmake/ninja with top of tree r205497.

Looking at the build page, there are a few mistakes there (I'll look into
getting these updated):

   - gcc 4.8+ is needed now (as of very late 2013).  We're using cxx11
   features not fully supported by earlier gcc versions.  I've used gcc 4.8.1
   (Ubuntu 13.10 default) and gcc 4.8.2 (what I build custom on Ubuntu 12.04).
   - The enable cxx11 bits are setup by default now (as of Feb/March 2014).
   - libedit is needed as of roughly Feb 2014.  Use 'sudo apt-get install
   libedit-dev'.  That works for Ubuntu 13.10 or later.  For earlier versions,
   you really need the July 2013 version of libedit.  We use a configure-based
   version of it on Ubuntu 12.04, but use the stock Ubuntu version for Ubuntu
   13.10 and later.
   - The version of cmake available on Ubuntu 13.10 worked fine for me.  I
   had to build a custom latest version for Ubuntu 12.04.

Let me know if that gets you further.  If not, I can distill what we run
out of our build scripts to see if you can replicate.  A big key at this
point is which distribution version you're using, though.

Thanks!

Sincerely,
Todd Fiala




On Sat, Apr 5, 2014 at 3:25 PM, Todd Fiala <tfiala at google.com> wrote:

> Hi Tiago,
>
> Which version of Linux are you running under?  I assume it is Debian based
> given the apt-get.
>
> It looks like there might be a build error in top of tree based on your
> output, I will check in a minute on my end.
>
> I'll have a look at the packages listed in the docs to see if anything I
> tend to need is missing.  I build pretty regularly both on Ubuntu 12.04
> x86_64 and Ubuntu 13.10 x86_64, although I almost exclusively use gcc 4.8.1
> or 4.8.2 due to some issues I ran into back in Nov 2013 (I need to work on
> migrating or at least supporting clang in our build process).
>
> Back in a bit after I see if I can get a clean build...
>
>
>
> On Fri, Apr 4, 2014 at 9:45 PM, Thiago Farina <tfarina at chromium.org>wrote:
>
>> Hi,
>>
>> I tried to follow the instruction I found in
>> http://lldb.llvm.org/build.html but I'm unable to build lldb.
>>
>> The structure of my source three is:
>>
>> ~/llvm-clang
>>  |__build (normal dir)
>>  |__llvm (git)
>>           |__tools
>>                     |__clang (git)
>>                     |__lldb    (git)
>>
>> I ran `sudo apt-get build-dep lldb-3.3`
>> Then from ~/llvm-clang/build, I ran `cmake ../llvm -G Ninja
>> -DLLVM_ENABLE_CXX11=ON
>>
>> This might be relevant:
>> CMake Warning (dev) at tools/lldb/source/CMakeLists.txt:289
>> (add_dependencies):
>>   Policy CMP0046 is not set: Error on non-existent dependency in
>>   add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
>>   Use the cmake_policy command to set the policy and suppress this
>> warning.
>>
>>   The dependency target
>>   "/home/tfarina/llvm-clang/build/tools/lldb/scripts/LLDBWrapPython.cpp"
>> of
>>   target "liblldb" does not exist.
>>
>> By the end, I ran `ninja lldb 2>&1 | tee ninja.log`
>>
>> Log with output attached.
>>
>> $ clang -v
>> clang version 3.5.0 (trunk 204777)
>> Target: x86_64-unknown-linux-gnu
>> Thread model: posix
>> Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8
>> Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8.1
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.5
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.5.3
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
>> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.1
>> Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
>>
>> What am I missing?
>>
>> Thanks in advance!
>>
>> NOTE: I'm not subscribed to this list, so please keep me in the CC list
>> when replying.
>>
>> --
>> Thiago Farina
>>
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>
>>
>
>
> --
> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>



-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140405/fa96f50b/attachment.html>


More information about the lldb-dev mailing list