Date: Sat, 30 Mar 2013 17:09:08 GMT From: Heath Nielson <heathn@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/177509: [Patch] graphics/libkdcraw-kde4 doesn't export classes Message-ID: <201303301709.r2UH98dF029289@red.freebsd.org> Resent-Message-ID: <201303301710.r2UHA0hF075737@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 177509 >Category: ports >Synopsis: [Patch] graphics/libkdcraw-kde4 doesn't export classes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 30 17:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Heath Nielson >Release: 9.1-STABLE >Organization: >Environment: FreeBSD hershey.bar.net 9.1-STABLE FreeBSD 9.1-STABLE #26: Wed Feb 13 13:44:17 MST 2013 heath@hershey.bar.net:/usr/obj/usr/src/sys/HERSHEY amd64 >Description: The port is configured to build with GCC. As part of the configuration cmake calls FindKDE4Internal.cmake which checks to see if gcc supports the -fvisible=hidden flag, which it does. The project is then built with that flag. However, for some reason, cmake is not defining the value __KDE_HAVE_GCC_VISIBILITY which is used in /usr/local/kde4/include/kdemacros.h to define KDE_EXPORT to export the symbols. Instead KDE_EXPORT is is not defined and those symbols are not exported. Downstream ports, such as graphics/kipi-plugins-kde4, fail because of those hidden symbols. >How-To-Repeat: cd /usr/ports/graphics/libkdcraw-kde4; make install nm -CD /usr/local/kde4/lib/libkdcraw.so | grep KDcraw # will not list any symbols >Fix: I am not very familiar with the KDE build infrastructure (nor with cmake). I can see in /usr/ports/x11/kdelibs4/files/patch-cmake_modules_FindKDE4Internal.cmake where testing is done for the -fvisibility compiler flag and see the __KDE_HAVE_GCC_VISIBILITY property set, but can't see how that property translates into setting __KDE_HAVE_GCC_VISIBILITY for kdemacros.h. I created a workaround which I've attached, but I'm sure that this isn't the proper way to fix this issue. Patch attached with submission follows: --- libkdcraw/CMakeLists.txt.orig 2013-03-30 10:40:23.000000000 -0600 +++ libkdcraw/CMakeLists.txt 2013-03-30 10:40:27.000000000 -0600 @@ -52,6 +52,10 @@ SET_TARGET_PROPERTIES(kdcraw PROPERTIES VERSION ${DCRAW_LIB_SO_VERSION_STRING} SOVERSION ${DCRAW_LIB_SO_CUR_VERSION} DEFINE_SYMBOL LIBRAW_BUILDLIB) +if (__KDE_HAVE_GCC_VISIBILITY) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__KDE_HAVE_GCC_VISIBILITY") +endif() + INSTALL(TARGETS kdcraw ${INSTALL_TARGETS_DEFAULT_ARGS}) # Check if compilation is done through digiKam SC or not. If yes, do not install header files. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303301709.r2UH98dF029289>