Created attachment 50582 [details] [review] fix build with ld --as-needed [ this is forwarded from http://bugs.debian.org/639320 ] [ patch created by Julian Taylor <jtaylor.debian@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 %
Thanks. Fixed in trunk.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.