Bug 258931 - linking broken when using -Wl,--no-copy-dt-needed-entries
Summary: linking broken when using -Wl,--no-copy-dt-needed-entries
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: 1.6.0
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2010-12-05 18:56 UTC by Arkadiusz Miskiewicz
Modified: 2017-08-20 09:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.7.0

build log (139.84 KB, text/plain)
2010-12-05 18:59 UTC, Arkadiusz Miskiewicz

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadiusz Miskiewicz 2010-12-05 18:56:37 UTC
Version:           1.6.0 (using KDE 4.5.4) 
OS:                Linux

Linking fails because GPHOTO2_LIBRARIES are specified before object that uses these (libgphoto2_port library to be precise).

libcameragui.a uses gp_port_free() but there is no -lgphoto2_port AFTER "../lib/libcameragui.a" in linking command while it should be there.

Reproducible: Always
Comment 1 Arkadiusz Miskiewicz 2010-12-05 18:59:44 UTC
Created attachment 54174 [details]
build log
Comment 2 Martin Klapetek 2010-12-05 19:08:31 UTC
This will also be most probably an issue with Fedora 13 and higher, as they changed the implicit DSO linking, which is pretty much what Arkadiusz did manually, see here: http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking

I believe that Fedora took a good path and we should be more careful about the linking in digiKam now.
Comment 3 Martin Klapetek 2010-12-05 21:20:36 UTC
I've commited a fix, but seems like the CCBUG part wasn't recognized or something, anyway, see rev.1203962 

Comment 4 Ismail Donmez 2011-08-26 08:17:19 UTC
This patch got removed somehow when digikam got migrated to git. Please reapply.
Comment 5 caulier.gilles 2011-08-26 09:48:45 UTC
git master is properly patched...


Gilles Caulier
Comment 6 Ismail Donmez 2011-08-26 09:51:28 UTC
No its not properly patched, GPHOTO2_LIBRARIES should be the last argument like this:

--- core/digikam/CMakeLists.txt 2011-07-28 01:28:25.000000000 +0200
+++ core/digikam/CMakeLists.txt 2011-08-26 10:10:07.010025844 +0200
@@ -278,13 +278,14 @@
Comment 7 caulier.gilles 2011-08-26 10:00:50 UTC
Git commit 772f592f639f52d0c1a991265098b46672fecb6e by Gilles Caulier.
Committed on 26/08/2011 at 11:58.
Pushed by cgilles into branch 'master'.

Fix order to link gphoto2 library with digiKam shared lib. This must be the last on linker command line...
CCBUGS: 258931
CCBUGS: 268267

M  +3    -1    digikam/CMakeLists.txt