[clazy] [Bug 435854] New: Problems building clazy with MinGW
Björn Schäpers
bugzilla_noreply at kde.org
Sat Apr 17 20:50:17 BST 2021
https://bugs.kde.org/show_bug.cgi?id=435854
Bug ID: 435854
Summary: Problems building clazy with MinGW
Product: clazy
Version: unspecified
Platform: Microsoft Windows
OS: Microsoft Windows
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: kde at hazardy.de
CC: smartins at kde.org
Target Milestone: ---
SUMMARY
I'm trying to build clazy with (MSYS2's) MinGW on Windows. I hit some issues,
for two I need help.
STEPS TO REPRODUCE
1. cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=../$(LLVMINSTALLDIR) -DCMAKE_FIND_LIBRARY_SUFFIXES=.a
-DCLAZY_MAN_PAGE=OFF ../clazy
2. mingw32-make
OBSERVED RESULT
First Issue: Linking ClazyPlugin.dll fails, because the LLVM lib files have
mixed path separators and \ is not escaped, GCC eats it.
> llvm-config --libfiles
E:\llvm/lib/libLLVMWindowsManifest.a ...
I don't know if this is an error from LLVM, CMake (or its MinGW Makefiles
generator), GCC, or clazy. But I never had such an issue building QtCreator
(and its clang based plugins) or doxygen. I've found a work around with adding
string(REPLACE "\\" "/" LLVM_LIBS ${LLVM_LIBS})
in the FindLLVM.cmake.
Second Issue:
[100%] Linking CXX executable bin\clazy-standalone.exe
E:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
E:/llvm/lib/libclangASTMatchers.a(ASTMatchersInternal.cpp.obj):ASTMatchersInternal.cpp:(.text+0x1310):
multiple definition of
`clang::ast_matchers::internal::ASTMatchFinder::isTraversalIgnoringImplicitNodes()
const'; lib/libClazyPlugin.dll.a(d027125.o):(.text+0x0): first defined here
Following multiple symbols.
EXPECTED RESULT
First Issue: Either escaped backslashes or only forward slashes.
Second Issue: I assume the symbols should not be exported from the clazy
plugin.
SOFTWARE/OS VERSIONS
Windows: 7
Qt Version: 5.15.2
ADDITIONAL INFORMATION
Up to date msys2, self compiled Qt and LLVM.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list