Solved [Solved] Error installing DigiKam

I am attempting to install graphics/digikam-kde4 on 10.0-PRERELEASE from ports and am receiving the following error:
Code:
[ 43%] Building CXX object digikam/CMakeFiles/digikamdatabase.dir/__/libs/threadimageio/pgfutils.o
Linking CXX shared library ../lib/libdigikamdatabase.so
/usr/bin/ld: cannot find -lpgf
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/digikam-kde4/work/digikam-3.2.0/core
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/digikam-kde4/work/digikam-3.2.0/core
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/graphics/digikam-kde4/work/digikam-3.2.0/core
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/digikam-kde4
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/digikam-kde4

Is the port broken? Thoughts and/or suggestions?
 
Re: Error installing DigiKam

So I ran the following command and got these results:
Code:
# pkg search digikam
digikam-doc-3.2.0
digikam-l10n-3.2.0
Since digikam is missing I guess the port/package is broken.
 
Re: Error installing DigiKam

Given that graphics/digikam-kde4 depends on external libpgf
Code:
% cd /usr/ports/graphics/digikam-kde4 && make build-depends-list
/usr/ports/astro/libkgeomap
/usr/ports/deskutils/kdepimlibs4
/usr/ports/devel/automoc4
/usr/ports/devel/boost-libs
/usr/ports/devel/cmake
/usr/ports/devel/pkgconf
/usr/ports/devel/qmake4
/usr/ports/devel/qt4-moc
/usr/ports/devel/qt4-rcc
/usr/ports/devel/qt4-uic
/usr/ports/graphics/jasper
/usr/ports/graphics/lcms
/usr/ports/graphics/lensfun
/usr/ports/graphics/libgphoto2
/usr/ports/graphics/libkdcraw-kde4
/usr/ports/graphics/libkexiv2-kde4
/usr/ports/graphics/libkface
/usr/ports/graphics/libkipi-kde4
/usr/ports/graphics/liblqr-1
/usr/ports/graphics/libpgf
/usr/ports/graphics/png
/usr/ports/graphics/tiff
/usr/ports/math/eigen3
/usr/ports/x11/kdelibs4
Reinstall graphics/libpgf and try again.
 
Re: Error installing DigiKam

Thanks for the feedback. I re-installed graphics/libpgf as you suggested but that did not resolve the digikam build issue. If you look at the specific error it shows:
Code:
Linking CXX shared library ../lib/libdigikamdatabase.so
/usr/bin/ld: cannot find -lpgf
c++: error: linker command failed with exit code 1 (use -v to see invocation)
I did a man ld and did not see the -p argument listed on the man page. It seems that the port build is passing an argument to linker that isn't valid. Found this while searching Google and it looks like a bug report has been filed. http://www.freebsd.org/cgi/query-pr.cgi?pr=184942
 
Re: Error installing DigiKam

The problem was already fixed: http://mail.kde.org/pipermail/kde-freebsd/2014-January/016813.html

Just apply the patch included then the port should build/install properly :)

Save it as patch-CMakeLists.txt into the /usr/ports/graphics/digikam-kde4/files directory
Code:
--- ./CMakeLists.txt.orig	2012-06-04 16:38:57.000000000 -0400
+++ ./CMakeLists.txt	2012-06-24 12:52:32.000000000 -0400
@@ -203,9 +203,10 @@
     FIND_LIBRARY(MATH_LIBRARY m)
 ENDIF(NOT WIN32)
 
-IF(Boost_FOUND)
-    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-ENDIF(Boost_FOUND)
+STRING(TOLOWER ${CMAKE_SYSTEM_NAME} node_platform)
+IF(${node_platform} MATCHES freebsd)
+    FIND_LIBRARY(KVM_LIBRARY NAMES kvm)
+ENDIF(${node_platform} MATCHES freebsd)
 
 #-------------------------------------------------------------------------------------
 
@@ -595,6 +596,10 @@
                         ${CMAKE_CURRENT_BINARY_DIR}/digikam
     )
 
+    IF(Boost_FOUND)
+        INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+    ENDIF(Boost_FOUND)
+
     IF(USE_SCRIPT_IFACE)
         INCLUDE_DIRECTORIES(${QT_QTSCRIPT_INCLUDE_DIR})
     ENDIF(USE_SCRIPT_IFACE)
@@ -762,6 +767,9 @@
 
     ENDIF(EIGEN3_FOUND)
 
+    # FreeBSD patch
+    LINK_DIRECTORIES(/usr/local/lib)
+
     # ==================================================================================================
     # Common targets parts
 
Re: Error installing DigiKam

It appears the patch did not apply cleanly.
Code:
[root@bsdbox /usr/ports/graphics/digikam-kde4]# make
===>  License GPLv2 accepted by the user
===>  Found saved configuration for digikam-3.2.0_1,1
===>   digikam-3.2.0_1,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by digikam-3.2.0_1,1 for building
===>  Extracting for digikam-3.2.0_1,1
=> SHA256 Checksum OK for digikam-3.2.0.tar.bz2.
===>  Patching for digikam-3.2.0_1,1
===>  Applying FreeBSD patches for digikam-3.2.0_1,1
Ignoring previously applied (or reversed) patch.
2 out of 2 hunks ignored--saving rejects to ./CMakeLists.txt.rej
=> Patch patch-CMakeLists.txt.old failed to apply cleanly.
=> Patch(es) patch-CMakeLists.txt applied cleanly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/digikam-kde4
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/digikam-kde4

The contents of the ./work/digikam-3.2.0/core/CMakeLists.txt.rej file are:
Code:
@@ -261,9 +261,10 @@
     FIND_LIBRARY(MATH_LIBRARY m)
 ENDIF(NOT WIN32)
 
-IF(Boost_FOUND)
-    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-ENDIF(Boost_FOUND)
+STRING(TOLOWER ${CMAKE_SYSTEM_NAME} node_platform)
+IF(${node_platform} MATCHES freebsd)
+    FIND_LIBRARY(KVM_LIBRARY NAMES kvm)
+ENDIF(${node_platform} MATCHES freebsd)
 
 #-------------------------------------------------------------------------------------
 
@@ -653,6 +654,10 @@
                         ${CMAKE_CURRENT_BINARY_DIR}/digikam
     )
 
+    IF(Boost_FOUND)
+        INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+    ENDIF(Boost_FOUND)
+
     IF(USE_SCRIPT_IFACE)
         INCLUDE_DIRECTORIES(${QT_QTSCRIPT_INCLUDE_DIR})
     ENDIF(USE_SCRIPT_IFACE)
 
Re: Error installing DigiKam

Disregard the last post. I had saved the original patch-CMakeLists.txt as patch-CMakeLists.txt.old. I removed patch-CMakeLists.txt.old and the build is in progress. My mistake.
 
Re: Error installing DigiKam

The build succeeded and has been installed. Thank you for the assistance!
 
Back
Top