Monday, July 01, 2019

[update] clazy-1.5 (needed for llvm8)

clazy-1.4 doesn't build any more with llvm8:

--8<--
===> Building for clazy-1.4
[1/101] /usr/ports/pobj/clazy-1.4/bin/c++ -DCLAZY_BUILD_UTILS_LIB -DCLAZY_DISABLE_AST_MATCHERS -DClangLazy_EXPORTS -DHAVE_CLANG_CONFIG_H -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I. -I/usr/local/include -I/usr/ports/pobj/clazy-1.4/clazy-1.4 -I/usr/ports/pobj/clazy-1.4/clazy-1.4/src -O2 -pipe -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti -fPIC -DNDEBUG -fPIC -MD -MT CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o -MF CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o.d -o CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o -c /usr/ports/pobj/clazy-1.4/clazy-1.4/src/checks/level0/qt-macros.cpp
FAILED: CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o
/usr/ports/pobj/clazy-1.4/bin/c++ -DCLAZY_BUILD_UTILS_LIB -DCLAZY_DISABLE_AST_MATCHERS -DClangLazy_EXPORTS -DHAVE_CLANG_CONFIG_H -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I. -I/usr/local/include -I/usr/ports/pobj/clazy-1.4/clazy-1.4 -I/usr/ports/pobj/clazy-1.4/clazy-1.4/src -O2 -pipe -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti -fPIC -DNDEBUG -fPIC -MD -MT CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o -MF CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o.d -o CMakeFiles/ClangLazy.dir/src/checks/level0/qt-macros.cpp.o -c /usr/ports/pobj/clazy-1.4/clazy-1.4/src/checks/level0/qt-macros.cpp
In file included from /usr/ports/pobj/clazy-1.4/clazy-1.4/src/checks/level0/qt-macros.cpp:23:
/usr/ports/pobj/clazy-1.4/clazy-1.4/src/ClazyContext.h:127:9: error: unknown type name 'StringRef'
StringRef fileName((*file)->getName());
^
In file included from /usr/ports/pobj/clazy-1.4/clazy-1.4/src/checks/level0/qt-macros.cpp:26:
In file included from /usr/ports/pobj/clazy-1.4/clazy-1.4/src/QtUtils.h:28:
/usr/ports/pobj/clazy-1.4/clazy-1.4/src/MacroUtils.h:66:9: error: unknown type name 'StringRef'
StringRef macro = clang::Lexer::getImmediateMacroName(loc, context->getSourceManager(), context->getLangOpts());
^
In file included from /usr/ports/pobj/clazy-1.4/clazy-1.4/src/checks/level0/qt-macros.cpp:26:
In file included from /usr/ports/pobj/clazy-1.4/clazy-1.4/src/QtUtils.h:29:
/usr/ports/pobj/clazy-1.4/clazy-1.4/src/FunctionUtils.h:107:5: error: unknown type name 'StringRef'
StringRef methodName = method->getName();
^
3 errors generated.
ninja: build stopped: subcommand failed.
*** Error 1 in . (/usr/ports/devel/cmake/cmake.port.mk:39 'do-build': @cd /usr/ports/pobj/clazy-1.4/build-amd64 && exec /usr/bin/env -i LIBc...)
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2816 '/usr/ports/pobj/clazy-1.4/build-amd64/.build_done')
*** Error 1 in /usr/ports/lang/clazy (/usr/ports/infrastructure/mk/bsd.port.mk:2486 'all')
-->8--

Upstream presumably fixed this in

https://github.com/KDE/clazy/commit/25e8b84b964c2615c28856630ee5a34e355d5acb

and has since released v1.5. Two possible problems:
- libclazylib isn't supported any more [0]
- the plugin has been renamed [1]

No idea whether that's a problem. libclazylib isn't referenced in the
ports tree. Also, bin/clazy-standalone used to link against
libClangLazy.so and now links against libClazyPlugin.so (no dlopen).
Maybe qt-creator and kdevelop do dlopen it?

clazy-1.5 builds with both llvm7 and llvm8.

Feedback/ok welcome.


[0] https://github.com/KDE/clazy/commit/4c6c491fd475238c43bd9fc849e46b15d771bb1b#diff-af3b638bc2a3e6c650974192a53c7291
[1] https://github.com/KDE/clazy/commit/f559a0627bdcc3969ee4867c40518509f36e975f#diff-af3b638bc2a3e6c650974192a53c7291


Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/clazy/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 4 Mar 2019 01:09:39 -0000 1.4
+++ Makefile 1 Jul 2019 09:45:17 -0000
@@ -4,12 +4,10 @@ COMMENT = static source code analyzer fo

GH_ACCOUNT = KDE
GH_PROJECT = clazy
-GH_TAGNAME = v1.4
+GH_TAGNAME = v1.5

CATEGORIES = lang devel

-SHARED_LIBS += clazylib 0.1 # 0.1
-
MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>

# LGPLv2+
@@ -24,8 +22,7 @@ MODULES = devel/cmake
BUILD_DEPENDS = devel/llvm
RUN_DEPENDS = devel/llvm

-CONFIGURE_ARGS = -DCLAZY_BUILD_UTILS_LIB:Bool=ON \
- -DMAN_INSTALL_DIR="${PREFIX}/man/man1" \
+CONFIGURE_ARGS = -DMAN_INSTALL_DIR="${PREFIX}/man/man1" \
-DLLVM_ROOT="${LOCALBASE}"

NO_TEST = Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/clazy/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo 16 Oct 2018 14:31:04 -0000 1.2
+++ distinfo 1 Jul 2019 09:45:17 -0000
@@ -1,2 +1,2 @@
-SHA256 (clazy-1.4.tar.gz) = YsNLTeHpm0fVjNRI+9/ZS4t+Icp1FNueZ2E6GHhwJps=
-SIZE (clazy-1.4.tar.gz) = 413300
+SHA256 (clazy-1.5.tar.gz) = yNnSBeb7e8x8wc1jxUdqeCkNQeTR7ZvS00uSiFsRwM0=
+SIZE (clazy-1.5.tar.gz) = 431820
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/lang/clazy/patches/patch-CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -r1.2 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 16 Oct 2018 14:31:04 -0000 1.2
+++ patches/patch-CMakeLists_txt 1 Jul 2019 09:45:17 -0000
@@ -3,19 +3,19 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 201
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -164,7 +164,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
- add_clang_plugin(ClangLazy ${CLAZY_PLUGIN_SRCS})
- set_target_properties(ClangLazy PROPERTIES
+@@ -140,7 +140,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
+ add_clang_plugin(ClazyPlugin ${CLAZY_PLUGIN_SRCS})
+ set_target_properties(ClazyPlugin PROPERTIES
LINKER_LANGUAGE CXX
- PREFIX ""
)

- install(TARGETS ClangLazy
-@@ -200,7 +199,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
+ install(TARGETS ClazyPlugin
+@@ -178,7 +177,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${DOC_INSTALL_DIR})

# Build docs
- set(MAN_INSTALL_DIR "${SHARE_INSTALL_DIR}/man/man1")
add_subdirectory(docs)

- if(CLAZY_BUILD_UTILS_LIB)
+ # rpath
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/clazy/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 16 Oct 2018 14:31:04 -0000 1.2
+++ pkg/PLIST 1 Jul 2019 09:45:17 -0000
@@ -1,27 +1,7 @@
@comment $OpenBSD: PLIST,v 1.2 2018/10/16 14:31:04 rsadowski Exp $
bin/clazy
@bin bin/clazy-standalone
-include/clazy/
-include/clazy/AccessSpecifierManager.h
-include/clazy/ClazyContext.h
-include/clazy/ContextUtils.h
-include/clazy/FixItUtils.h
-include/clazy/HierarchyUtils.h
-include/clazy/LoopUtils.h
-include/clazy/MacroUtils.h
-include/clazy/QtUtils.h
-include/clazy/StmtBodyRange.h
-include/clazy/StringUtils.h
-include/clazy/SuppressionManager.h
-include/clazy/TemplateUtils.h
-include/clazy/TypeUtils.h
-include/clazy/Utils.h
-include/clazy/checkbase.h
-include/clazy/checkmanager.h
-include/clazy/clazy_export.h
-include/clazy/clazy_stl.h
-lib/libClangLazy.so
-@lib lib/libclazylib.so.${LIBclazylib_VERSION}
+lib/libClazyPlugin.so
@man man/man1/clazy.1
share/doc/clazy/
share/doc/clazy/COPYING-LGPL2.txt
@@ -36,6 +16,7 @@ share/doc/clazy/level0/README-empty-qstr
share/doc/clazy/level0/README-fully-qualified-moc-types.md
share/doc/clazy/level0/README-lambda-in-connect.md
share/doc/clazy/level0/README-lambda-unique-connection.md
+share/doc/clazy/level0/README-lowercase-qml-type-name.md
share/doc/clazy/level0/README-mutable-container-key.md
share/doc/clazy/level0/README-qcolor-from-literal.md
share/doc/clazy/level0/README-qdatetime-utc.md
@@ -101,9 +82,11 @@ share/doc/clazy/level3/README-thread-wit
share/doc/clazy/level3/README-unneeded-cast.md
share/doc/clazy/manuallevel/
share/doc/clazy/manuallevel/README-container-inside-loop.md
+share/doc/clazy/manuallevel/README-ifndef-define-typo.md
share/doc/clazy/manuallevel/README-inefficient-qlist.md
share/doc/clazy/manuallevel/README-isempty-vs-count.md
share/doc/clazy/manuallevel/README-qhash-with-char-pointer-key.md
+share/doc/clazy/manuallevel/README-qrequiredresult-candidates.md
share/doc/clazy/manuallevel/README-qstring-varargs.md
share/doc/clazy/manuallevel/README-qt-keywords.md
share/doc/clazy/manuallevel/README-qt4-qstring-from-array.md


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

No comments:

Post a Comment