freedib/lldbmi2

Build fails: LLDB_Library NOTFOUND

Closed this issue · 6 comments

When building with Eclipse, configuring fails:

15:08:23 **** Build of configuration Debug for project lldbmi2 ****
/Users/Aaron/lldbmi2/build.sh -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=1 all 
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LLDB_LIBRARY (ADVANCED)
    linked by target "lldbmi2" in directory /Users/Aaron/lldbmi2

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
[  7%] Building CXX object CMakeFiles/tests.dir/tests/src/tests.cpp.o
[ 14%] Linking CXX executable tests
[ 14%] Built target tests
[ 21%] Building CXX object CMakeFiles/lldbmi2.dir/src/engine.cpp.o
[ 28%] Building CXX object CMakeFiles/lldbmi2.dir/src/events.cpp.o
[ 35%] Building CXX object CMakeFiles/lldbmi2.dir/src/frames.cpp.o
[ 42%] Building CXX object CMakeFiles/lldbmi2.dir/src/lldbmi2.cpp.o
[ 50%] Building CXX object CMakeFiles/lldbmi2.dir/src/log.cpp.o
[ 57%] Building CXX object CMakeFiles/lldbmi2.dir/src/names.cpp.o
[ 64%] Building CXX object CMakeFiles/lldbmi2.dir/src/stringb.cpp.o
[ 71%] Building CXX object CMakeFiles/lldbmi2.dir/src/test.cpp.o
[ 78%] Building CXX object CMakeFiles/lldbmi2.dir/src/variables.cpp.o
[ 85%] Linking CXX executable lldbmi2
ld: library not found for -lLLDB_LIBRARY-NOTFOUND
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lldbmi2] Error 1
make[1]: *** [CMakeFiles/lldbmi2.dir/all] Error 2
make: *** [all] Error 2
"/Users/Aaron/lldbmi2/build.sh -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=1 all" terminated with exit code 2. Build might be incomplete.

15:08:31 Build Failed. 4 errors, 0 warnings. (took 7s.850ms)

CMake fails with a similar problem:

-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LLDB_LIBRARY (ADVANCED)
    linked by target "lldbmi2" in directory /Users/Aaron/lldbmi2

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

This is just a long shot, but notice above it's testing for "/Library/Developer/CommandLineTools/usr/bin/c++" and it says "skipped". Do you have Xcode's command line tools installed?

This is just a long shot, but notice above it's testing for "/Library/Developer/CommandLineTools/usr/bin/c++" and it says "skipped". Do you have Xcode's command line tools installed?

Yes.

$ xcode-select -p
/Library/Developer/CommandLineTools
$ ls -al /Library/Developer/CommandLineTools
lrwxr-xr-x  1 root  wheel  5 May 22 10:24 /Library/Developer/CommandLineTools/usr/bin/c++ -> clang

One line seems missing in CMakeLists.txt. The fourth statement should be
set(LLDB_LIBRARY liblldb.dylib)

I can't test it for now, but if you can validate, it would be nice.

unfortunately my mac is not avaliable right now.

I checked on an Intel Mac and it is for a fine working configuration
LLDB_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework
It also compiles when with the xcode command line tools installed by brew. The LLDB.framework has then another location (/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework)

v1.1 added support for Command Line Tool without Xcode installed.