Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid -lLLVM error #8

Closed
peeterjoot opened this issue Sep 22, 2019 · 7 comments · Fixed by #29
Closed

How to avoid -lLLVM error #8

peeterjoot opened this issue Sep 22, 2019 · 7 comments · Fixed by #29

Comments

@peeterjoot
Copy link

peeterjoot commented Sep 22, 2019

I have a clang compiler installed on my system, but am trying to use the clang that I've built myself, configuring lldb-mi with:

export CC=/opt/lzlabs/gcc-9.2.0/bin/gcc
export CXX=/opt/lzlabs/gcc-9.2.0/bin/g++
#export CXX="/opt/lzlabs/gcc-9.2.0/bin/g++ -std=c++14"

export LD_LIBRARY_PATH=/opt/lzlabs/gcc-9.2.0/lib64:/opt/lzlabs/lldb/lib64

export PATH=/opt/lzlabs/gcc-9.2.0/bin:/home/pjoot/gdb/bin:/opt/lzlabs/lldb/bin:$PATH

cmake
-DCMAKE_PREFIX_PATH=/opt/lzlabs/lldb
-DBUILD_SHARED_LIBS=true
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_SHARED_LINKER_FLAGS='-B/home/pjoot/gdb/bin'
-DCMAKE_EXE_LINKER_FLAGS='-B/home/pjoot/gdb/bin'
-DLLVM_LIBDIR_SUFFIX=64
-DCMAKE_INSTALL_RPATH=/opt/lzlabs/gcc-9.2.0/lib64:/opt/lzlabs/lldb/lib64
-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE
-GNinja ../lldb-mi

I end up with an error when lldb-mi is linked as my build.ninja tries to use -lLLVM (which curiously doesn't seem to exist in either the llvm that is part of the old clang-3.8 that is installed on my system, nor in my just built llvm+lldb (trunk))

I was able to work around that by changing the build.ninja reference to -lLLVM into llvm-config --libs (that's backquotes mangled by markup into highlighted text)

Is there a proper way to do this, without hacking the generated build.ninja?

@peeterjoot
Copy link
Author

figured it out: peeterjoot@2d1a12e

@tkrasnukha
Copy link
Member

figured it out: peeterjoot@2d1a12e

Those changes also fix the runtime "CommandLine Error: Option 'disable-symbolication' registered more than once!" for us. Could you make a pull request with it, please?

@peeterjoot
Copy link
Author

@tkrasnukha Okay, a pull request has been submitted.

@tkrasnukha
Copy link
Member

Thanks a lot! I hope anyone with commit access will merge it soon.

@Teemperor
Copy link
Collaborator

@tkrasnukha By the way, you do have commit access (unless I messed up permissions somehow, then let me know).

@tkrasnukha
Copy link
Member

It seems I don't have, at least I see this message on a pull request's page: "Only those with write access to this repository can merge pull requests")

@Teemperor
Copy link
Collaborator

Yeah, seems like I need to do more than just adding you to the lldb-tools team. Should be working now (unless there are more hidden settings I have to change).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants