On Sun, Oct 29, 2023 at 09:31:22AM +0100, Rafael Sadowski wrote: > kirby@ reported the following issue. > > $ /usr/local/lib/qt6/bin/lupdate > ld.so: lupdate: can't load library 'libclang-cpp.so.1.0' > > The fix seems very simple to me and we have done this elsewhere with > libinotify. The question is, are there other places that also need to be > fixed?
gnome-builder-clang may need it, but I don't know how to trigger it. Apparently cmake does the right thing for clazy. Couldn't find others in a quick grep. > Does RPATH have to be set only for executables or also for shared libs? I think shared libraries need it, too, to cover for the situation where lib1 needs lib2, but the executable only links against lib1. Not sure if this occurs with libraries out of the default search path in the ports tree. Diff below makes sense, so I'd land it. > > Rafael > > diff --git a/x11/qt6/qttools/Makefile b/x11/qt6/qttools/Makefile > index 7c9bcb5c446..3525a1743cc 100644 > --- a/x11/qt6/qttools/Makefile > +++ b/x11/qt6/qttools/Makefile > @@ -1,7 +1,7 @@ > QT6NAME = QtTools > COMMENT = Qt6 development tools > PKGSPEC = qt6-qttools-${QT6_PKGSPEC} > -REVISION = 0 > +REVISION = 1 > > SHARED_LIBS += Qt6Designer 2.0 # 6.5 > SHARED_LIBS += Qt6DesignerComponents 1.0 # 6.5 > @@ -12,6 +12,7 @@ WANTLIB += ${COMPILER_LIBCXX} GL Qt6Core Qt6DBus Qt6Gui > Qt6Network > WANTLIB += Qt6OpenGL Qt6OpenGLWidgets Qt6PrintSupport Qt6Qml Qt6QmlModels > WANTLIB += Qt6Quick Qt6QuickWidgets Qt6Sql Qt6Widgets Qt6Xml c > WANTLIB += m xkbcommon > + > WANTLIB += llvm${MODCLANG_VERSION}/lib/clang > llvm${MODCLANG_VERSION}/lib/clang-cpp > > MODULES += lang/clang > @@ -27,4 +28,6 @@ BUILD_DEPENDS = graphics/vulkan-loader > > CONFIGURE_ENV = LLVM_INSTALL_DIR=${LOCALBASE}/llvm${MODCLANG_VERSION} > > +MODCMAKE_LDFLAGS = -L${LOCALBASE}/llvm${MODCLANG_VERSION}/lib > -Wl,-rpath=${LOCALBASE}/llvm${MODCLANG_VERSION}/lib > + > .include <bsd.port.mk> >