-
Notifications
You must be signed in to change notification settings - Fork 56
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
Build failure on Ubuntu 20 LTS. #90
Comments
As far as I know, test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW should fail on Ubuntu since the option |
Yes. cmake failed. Above is from CMakeError.log. It's easy to repro. To me, the issue is: cmakefile has bugs. So currently it only supports mac build, not linux build. |
Please, provide the error cmake fails with or attach your CMakeError.log. The errors in tests above are not the reason of the failure. |
CMakeError.log |
I don't see any failures in the provided logs, only tests that are expected to fail on Ubuntu/with default compiler. What does "cmake ." print to console? |
-- Found LLVM 14.0.0 -- Configuring incomplete, errors occurred! |
The script llvm.sh doesn't install a required dependency on Ubuntu - liblldb-dev (or liblldb-$LLVM_VERSION-dev). You can add it manually to the if [[ $ALL -eq 1 ]]; then
# same as in test-install.sh
# No worries if we have dups
PKG="$PKG clang-tidy-$LLVM_VERSION clang-format-$LLVM_VERSION clang-tools-$LLVM_VERSION llvm-$LLVM_VERSION-dev lld-$LLVM_VERSION lldb-$LLVM_VERSION liblldb-$LLVM_VERSION-dev llvm-$LLVM_VERSION-tools libomp-$LLVM_VERSION-dev libc++-$LLVM_VERSION-dev libc++abi-$LLVM_VERSION-dev libclang-common-$LLVM_VERSION-dev libclang-$LLVM_VERSION-dev libclang-cpp$LLVM_VERSION-dev libunwind-$LLVM_VERSION-dev"
fi or request authors to add it. |
As Readme says,
lldb package provides only executables on Ubuntu, whereas liblldb-dev provides headers and libraries. |
Thanks . I am not sure which script you're referring to. May you please do a fix? |
I mean this script:
It is not a part of this project. |
Please, follow this issue: opencollab/llvm-jenkins.debian.net#16 |
Installing liblldb-15-dev via the script alongside the usual does not resolve the problem. I'm still getting the same error message on my Ubuntu 22.04. However, executing |
Full C/C++ Clang lldb or lldb-mi LLVM 17 VSCODE Debugging for Debian and UbuntuI have been able to build lldb-mi and use lldb or lldb-mi with clang++ in Debian and Ubuntu or WSL2 with full power clang++ built debugging including remote debugging into embedded Linux all using VSCODE despite the spaghetti designs of .vscode/xyz.json files going wrong for weeks! Hell who's idea was it to create .vscode/warped.json files? The lldb and lldb-mi Clang++ debug solution relies on the CodeLLDB VS CODE ExtensionYou are especially exposed to the bugs with Default LLVM 14 or 15 already installed and you install the latest LLVM 17 with:
mkdir -p ~/projects/clang/ ; cd ~/projects/clang/
sudo apt update && sudo apt upgrade
sudo apt install build-essential git python3 g++ gdb make cmake
sudo apt install rsync curl wget zip python3-pip
sudo apt autoremove
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
wget https://apt.llvm.org/llvm.sh lldb-mi source and advanced install again on the command line ... cd ~/projects/clang/ && git clone https://github.com/lldb-tools/lldb-mi.git
cd ~/projects/clang/lldb-mi/ ; git fetch --all ; git pull ; cat README.md
cat ../lldb.sh
sudo apt install cmake libedit-dev libcurl4-openssl-dev
LLVM_VERSION=17 # or the versin of LLVM
PKG="clang-$LLVM_VERSION lldb-$LLVM_VERSION lld-$LLVM_VERSION clangd-$LLVM_VERSION"
sudo apt install $PKG
PKG="clang-tidy-$LLVM_VERSION clang-format-$LLVM_VERSION clang-tools-$LLVM_VERSION llvm-$LLVM_VERSION-dev lld-$LLVM_VERSION lldb-$LLVM_VERSION llvm-$LLVM_VERSION-tools libomp-$LLVM_VERSION-dev libc++-$LLVM_VERSION-dev libc++abi-$LLVM_VERSION-dev libclang-common-$LLVM_VERSION-dev libclang-$LLVM_VERSION-dev libclang-cpp$LLVM_VERSION-dev libunwind-$LLVM_VERSION-dev"
sudo apt install $PKG
PKG="libclang-rt-$LLVM_VERSION-dev libpolly-$LLVM_VERSION-dev"
sudo apt install $PKG
sudo apt install liblldb-$LLVM_VERSION-dev
find /usr -iname "LLVMConfig.cmake" 2>&- # finds 2 (below).
/usr/lib/llvm-14/lib/cmake/llvm/LLVMConfig.cmake AND /usr/lib/llvm-17/lib/cmake/llvm/LLVMConfig.cmake
# That means for bugfix PATH_TO_LLVM becomes 17 in my case. Edit ~/projects/clang/lldb-mi/CMakeLists.txt find the bug line find_package(LLVM REQUIRED CONFIG) Change that one line to these (Version 17? or the most up-to-date version from the find command above):-
The above bugfix technique is found in THIS PDF tutorial for cmake for LLVM cd ~/projects/clang/lldb-mi/ ; rm -rf myBuild ; mkdir myBuild ; cd myBuild # a safer way of building cmake TWO DOTS
cmake .. # two dots
cmake .. # again YES DOT DOT.
cmake --build . # ONE dot in this command not two
sudo cp ~/projects/clang/lldb-mi/BuIlD/src/lldb-mi /usr/bin/ # obviously only if it builds Trouble? cmake debug Tip:
cd ~/projects/clang/lldb-mi/BuIlD/CMakeFiles/
cat CMakeError.log CMakeOutput.log CMakeCache.txt |
Repro
Observed:
Performing C SOURCE FILE Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW failed with the following output:
Change Dir: /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp
Run Build Command(s):/bin/make cmTC_a9240/fast && /bin/make -f CMakeFiles/cmTC_a9240.dir/build.make CMakeFiles/cmTC_a9240.dir/build
make[1]: Entering directory '/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a9240.dir/src.c.o
/bin/cc -fPIC -Werror=date-time -DC_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW -Werror -Werror=unguarded-availability-new -o CMakeFiles/cmTC_a9240.dir/src.c.o -c /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp/src.c
cc1: error: '-Werror=unguarded-availability-new': no option -Wunguarded-availability-new
make[1]: *** [CMakeFiles/cmTC_a9240.dir/build.make:66: CMakeFiles/cmTC_a9240.dir/src.c.o] Error 1
make[1]: Leaving directory '/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a9240/fast] Error 2
Source file was:
int main(void) { return 0; }
Performing C++ SOURCE FILE Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW failed with the following output:
Change Dir: /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp
Run Build Command(s):/bin/make cmTC_1db1f/fast && /bin/make -f CMakeFiles/cmTC_1db1f.dir/build.make CMakeFiles/cmTC_1db1f.dir/build
make[1]: Entering directory '/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_1db1f.dir/src.cxx.o
/bin/c++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -DCXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW -Werror -Werror=unguarded-availability-new -o CMakeFiles/cmTC_1db1f.dir/src.cxx.o -c /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp/src.cxx
cc1plus: error: '-Werror=unguarded-availability-new': no option -Wunguarded-availability-new
make[1]: *** [CMakeFiles/cmTC_1db1f.dir/build.make:66: CMakeFiles/cmTC_1db1f.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_1db1f/fast] Error 2
Source file was:
int main() { return 0; }
Determining if the os_signpost_interval_begin exist failed with the following output:
Change Dir: /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp
Run Build Command(s):/bin/make cmTC_e4556/fast && /bin/make -f CMakeFiles/cmTC_e4556.dir/build.make CMakeFiles/cmTC_e4556.dir/build
make[1]: Entering directory '/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e4556.dir/CheckSymbolExists.c.o
/bin/cc -fPIC -Werror=date-time -w -ffunction-sections -fdata-sections -o CMakeFiles/cmTC_e4556.dir/CheckSymbolExists.c.o -c /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: os/signpost.h: No such file or directory
2 | #include <os/signpost.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_e4556.dir/build.make:66: CMakeFiles/cmTC_e4556.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/k/src1/lldb-mi/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_e4556/fast] Error 2
File /home/k/src1/lldb-mi/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <os/signpost.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef os_signpost_interval_begin
return ((int*)(&os_signpost_interval_begin))[argc];
#else
(void)argc;
return 0;
#endif
}
The text was updated successfully, but these errors were encountered: