Prepare for llvm-config in base and use ports llvm-config to avoid a
build error.
-- Found LLVM (version: 7.0.1): (using /usr/bin/llvm-config)
-- Include dirs: /usr/include
-- LLVM libraries: /usr/lib/libLLVM.so
-- LLVM System libraries:
-- Found Clang (LLVM version: 7.0.1)
-- Include dirs: /usr/include
-- Clang libraries:
/usr/local/lib/libclangFrontend.a;/usr/local/lib/libclangDriver.a;/usr/local/lib/libclangCodeGen.a;/usr/local/lib/libclangSema.a;/usr/local/lib/libclangAnalysis.a;/usr/local/lib/libclangRewriteFrontend.a;/usr/local/lib/libclangRewrite.a;/usr/local/lib/libclangAST.a;/usr/local/lib/libclangASTMatchers.a;/usr/local/lib/libclangParse.a;/usr/local/lib/libclangLex.a;/usr/local/lib/libclangBasic.a;/usr/local/lib/libclangARCMigrate.a;/usr/local/lib/libclangEdit.a;/usr/local/lib/libclangFrontendTool.a;/usr/local/lib/libclangRewrite.a;/usr/local/lib/libclangSerialization.a;/usr/local/lib/libclangTooling.a;/usr/local/lib/libclangStaticAnalyzerCheckers.a;/usr/local/lib/libclangStaticAnalyzerCore.a;/usr/local/lib/libclangStaticAnalyzerFrontend.a;/usr/local/lib/libclangSema.a
-- Libclang C library: /usr/local/lib/libclang.so.8.0
Enabling AST Matchers workaround. Consider building with gcc instead. See bug
#392223.
Looking for std::regex support...
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done
CMake Warning at CMakeLists.txt:125 (add_library):
Cannot generate a safe linker search path for target ClangLazy because
files in some directories may conflict with libraries in implicit
directories:
link library [libLLVM.so] in /usr/lib may be hidden by files in:
/usr/local/lib
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
CMakeLists.txt:164 (add_clang_plugin)
CMake Warning at CMakeLists.txt:240 (add_executable):
Cannot generate a safe linker search path for target clazy-standalone
because files in some directories may conflict with libraries in implicit
directories:
link library [libLLVM.so] in /usr/lib may be hidden by files in:
/usr/local/lib
Some of these libraries may not be found correctly.
CMake Warning at CMakeLists.txt:150 (add_library):
Cannot generate a safe linker search path for target clazylib because files
in some directories may conflict with libraries in implicit directories:
link library [libLLVM.so] in /usr/lib may be hidden by files in:
/usr/local/lib
Some of these libraries may not be found correctly.
-- Generating done
-- Build files have been written to: /usr/obj/ports/clazy-1.4/build-amd64
>>> Running build in lang/clazy at 1551492218
===> lang/clazy
===> Building for clazy-1.4
ninja: error: '/usr/lib/libLLVM.so', needed by 'lib/libClangLazy.so', missing
and no known rule to make it
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/clazy/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile 16 Oct 2018 14:31:04 -0000 1.3
+++ Makefile 3 Mar 2019 01:04:50 -0000
@@ -25,7 +25,8 @@ BUILD_DEPENDS = devel/llvm
RUN_DEPENDS = devel/llvm
CONFIGURE_ARGS = -DCLAZY_BUILD_UTILS_LIB:Bool=ON \
- -DMAN_INSTALL_DIR="${PREFIX}/man/man1"
+ -DMAN_INSTALL_DIR="${PREFIX}/man/man1" \
+ -DLLVM_ROOT="${LOCALBASE}"
NO_TEST = Yes