[Uim-bugs] [Bug 40385] New: uim-pref-qt4: failed to link with ld --as-needed
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Aug 25 19:56:27 PDT 2011
https://bugs.freedesktop.org/show_bug.cgi?id=40385
Summary: uim-pref-qt4: failed to link with ld --as-needed
Product: UIM
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: minor
Priority: medium
Component: helper: pref
AssignedTo: uim-bugs at freedesktop.org
ReportedBy: d+bugzilla at vdr.jp
Created an attachment (id=50582)
View: https://bugs.freedesktop.org/attachment.cgi?id=50582
Review: https://bugs.freedesktop.org/review?bug=40385&attachment=50582
fix build with ld --as-needed
[ this is forwarded from http://bugs.debian.org/639320 ]
[ patch created by Julian Taylor <jtaylor.debian at googlemail.com> ]
the package uim fails to build when using the linker flag --as-needed
This is caused by the library libuim placed before the static
libuim-counted-init library which needs its symbols.
ld will then drop libuim as it appears not needed.
attached patch fixes this by adding libuim again behind libuim-counted-init
------------------------------------------------------------------------------
* failed to link with ld --as-needed
% g++ -m64 -Wl,-O1 -Wl,--as-needed -o uim-pref-qt4 customwidgets.o qt4.o
moc_customwidgets.o moc_qt4.o -L/usr/src/uim/uim -L/usr/src/uim/replace
-L/usr/src/uim/replace/.libs -L/usr/src/uim/uim/.libs -L/usr/lib -lreplace
-luim -luim-scm -luim-x-util -luim-custom -luim-counted-init -lQtGui -lQtCore
-lpthread
/usr/bin/ld:
/usr/src/uim/uim/.libs/libuim-counted-init.a(libuim_counted_init_la-counted-init.o):
undefined reference to symbol 'uim_init'
/usr/bin/ld: note: 'uim_init' is defined in DSO
/usr/src/uim/uim/.libs/libuim.so so try adding it to the linker command line
/usr/src/uim/uim/.libs/libuim.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
%
------------------------------------------------------------------------------
* succeeded to link with ld --as-needed (added -luim behind -luim-counted-init)
% g++ -m64 -Wl,-O1 -Wl,--as-needed -o uim-pref-qt4 customwidgets.o qt4.o
moc_customwidgets.o moc_qt4.o -L/usr/src/uim/uim -L/usr/src/uim/replace
-L/usr/src/uim/replace/.libs -L/usr/src/uim/uim/.libs -L/usr/lib -lreplace
-luim -luim-scm -luim-x-util -luim-custom -luim-counted-init -luim -lQtGui
-lQtCore -lpthread
%
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the uim-bugs
mailing list