Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Build failure on Fedora 35 #75

Open
Dubhead opened this issue Nov 6, 2021 · 0 comments
Open

Build failure on Fedora 35 #75

Dubhead opened this issue Nov 6, 2021 · 0 comments

Comments

@Dubhead
Copy link

Dubhead commented Nov 6, 2021

On Fedora 35 Workstation (x86_64), the build fails as follows:

% cmake --build .
[ 12%] Building CXX object CMakeFiles/FileCheck.dir/Unity/unity_0_cxx.cxx.o
[ 25%] Linking CXX executable FileCheck
[ 25%] Built target FileCheck
[ 37%] Building CXX object CMakeFiles/cx.dir/cmake_pch.hxx.gch
[ 50%] Building CXX object CMakeFiles/cx.dir/Unity/unity_3_cxx.cxx.o
[ 62%] Building CXX object CMakeFiles/cx.dir/Unity/unity_2_cxx.cxx.o
[ 75%] Building CXX object CMakeFiles/cx.dir/Unity/unity_1_cxx.cxx.o
[ 87%] Building CXX object CMakeFiles/cx.dir/Unity/unity_0_cxx.cxx.o
[100%] Linking CXX executable cx
/usr/bin/ld: cannot find -lclangAST
/usr/bin/ld: cannot find -lclangBasic
/usr/bin/ld: cannot find -lclangFrontend
/usr/bin/ld: cannot find -lclangLex
/usr/bin/ld: cannot find -lclangParse
/usr/bin/ld: cannot find -lclangSema
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/cx.dir/build.make:170: cx] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:304: CMakeFiles/cx.dir/all] Error 2
gmake: *** [Makefile:101: all] Error 2
cmake --build .: 45.30s user, 2.89s kernel, 1253M memory
%

The build succeeded with this patch to CMakeLists.txt:

  diff --git a/CMakeLists.txt b/CMakeLists.txt
  index c50b6b4d..a62983aa 100644
  --- a/CMakeLists.txt
  +++ b/CMakeLists.txt
  @@ -71,7 +71,8 @@ if (LLVM_LINK_LLVM_DYLIB)
   else()
       llvm_map_components_to_libnames(LLVM_LIBS core native linker support)
   endif()
  -list(APPEND LLVM_LIBS clangAST clangBasic clangFrontend clangLex clangParse clangSema)
  +# list(APPEND LLVM_LIBS clangAST clangBasic clangFrontend clangLex clangParse clangSema)
  +list(APPEND LLVM_LIBS clang-cpp)
   target_link_libraries(cx ${LLVM_LIBS})
   
   add_custom_target(check_lit COMMAND lit --verbose --succinct --incremental ${EXTRA_LIT_FLAGS} ${PROJECT_SOURCE_DIR}/test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant