[opensuse-packaging] linker error - need help

I have a package that fails at the link stage, reporting undefined references as follows, and the --no-as-needed option does not help :( /bin/sh ../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -L/opt/kde3/lib64 -L/usr/lib/qt3/lib64 -L/usr/lib64 -Wl,--no-as-needed -Wl,--enable-new-dtags -L../src/fs -Wl,-Bsymbolic-functions -o ktagebuch main.o -lkio library/ui/libktagebuchui.la library/libktagebuch.la -lfilesystem -lkdeui -lkdecore /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_exec' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_text' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_bind_blob' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_step' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_open' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_bytes' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_blob' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_prepare' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_close' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_mprintf' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_errmsg' build log link: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ktageb... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On 5/26/11 8:01 PM, Ilya Chernykh wrote:
I have a package that fails at the link stage, reporting undefined references as follows, and the --no-as-needed option does not help :(
/bin/sh ../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -L/opt/kde3/lib64 -L/usr/lib/qt3/lib64 -L/usr/lib64 -Wl,--no-as-needed -Wl,--enable-new-dtags -L../src/fs -Wl,-Bsymbolic-functions -o ktagebuch main.o -lkio library/ui/libktagebuchui.la library/libktagebuch.la -lfilesystem -lkdeui -lkdecore /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_exec' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_text' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_bind_blob' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_step' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_open' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_bytes' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_blob' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_prepare' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_close' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_mprintf' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_errmsg'
build log link: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ktageb...
Here is the hint in the build log: configure: WARNING: unrecognized options: --with-pcsc-dir, --with-xinerama, --with-ssl-dir, --with-sqlite so looking at the spec file, line 49 looks like the cause, but im not expert with kde3 packaging. So, try removing $configkde ? HTH, Peter -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Thu, 26 May 2011 22:28:17 -0700, Peter Linnell <mrdocs@opensuse.org> wrote:
Here is the hint in the build log:
configure: WARNING: unrecognized options: --with-pcsc-dir, --with-xinerama, --with-ssl-dir, --with-sqlite
That's a hint, but not at what you think.
So, try removing $configkde ?
That would be wrong. Options configure doesn't recognize mean that the code for supporting them is missing from it but are otherwise harmless. The code to use sqlite was indeed missing because the call to update_admin in the spec removes the existing admin dir. I've modified configure.in.in to use pkg-config. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On 27/05/11 04:01, Ilya Chernykh wrote:
I have a package that fails at the link stage, reporting undefined references as follows, and the --no-as-needed option does not help :(
/bin/sh ../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -L/opt/kde3/lib64 -L/usr/lib/qt3/lib64 -L/usr/lib64 -Wl,--no-as-needed -Wl,--enable-new-dtags -L../src/fs -Wl,-Bsymbolic-functions -o ktagebuch main.o -lkio library/ui/libktagebuchui.la library/libktagebuch.la -lfilesystem -lkdeui -lkdecore /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_exec' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_text' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_bind_blob' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_step' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_open' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_bytes' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_column_blob' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_prepare' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_close' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_mprintf' /usr/src/packages/BUILD/ktagebuch-0.74/src/fs/.libs/libfilesystem.so: undefined reference to `sqlite3_errmsg'
build log link: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ktageb...
Looks like the missing link is to -lsqlite3 ... you have sqlite3-devel installed in the buildroot so must be a bug in the makefile. Also the easier way to disable as_needed is to export SUSE_ASNEEDED=0, rather than sed tricks. But it shouldn't be necessary if my above guess is correct. Tejas -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Friday 27 May 2011 12:28:17 Tejas Guruswamy wrote:
Also the easier way to disable as_needed is to export SUSE_ASNEEDED=0, rather than sed tricks.
No this did not work here. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Friday 27 May 2011 12:28:17 Tejas Guruswamy wrote:
build log link: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=kta gebuch&project=home%3AAnsus%3AKDE3&repository=KDE_KDE3_openSUSE_11.4
Looks like the missing link is to -lsqlite3 ... you have sqlite3-devel installed in the buildroot so must be a bug in the makefile.
Thank you very much, that worked. But now I have the following problem: found trace of $RPM_BUILD_ROOT or $RPM_BUILD_DIR in installed .la file /usr/src/packages/BUILDROOT/ktagebuch-0.74-24.1.x86_64/opt/kde3/lib64/libktagebuch.la found trace of $RPM_BUILD_ROOT or $RPM_BUILD_DIR in installed .la file /usr/src/packages/BUILDROOT/ktagebuch-0.74-24.1.x86_64/opt/kde3/lib64/kde3/ktagebuch_mood.la -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Fri, 27 May 2011 18:57:29 +0400, Ilya Chernykh <anixxsus@gmail.com> wrote:
found trace of $RPM_BUILD_ROOT or $RPM_BUILD_DIR in installed .la
Just remove any .la files as long as they're not needed for static libraries. See the spec file in the SR I submitted. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Saturday 28 May 2011 01:11:25 Philipp Thomas wrote:
found trace of $RPM_BUILD_ROOT or $RPM_BUILD_DIR in installed .la
Just remove any .la files as long as they're not needed for static libraries. See the spec file in the SR I submitted.
Thank you very much. I just did not remove those .la files because in other cases as I know they were necessary. I don't know how to determine when they are. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

El 27/05/11 22:19, Ilya Chernykh escribió:
On Saturday 28 May 2011 01:11:25 Philipp Thomas wrote:
found trace of $RPM_BUILD_ROOT or $RPM_BUILD_DIR in installed .la
Just remove any .la files as long as they're not needed for static libraries. See the spec file in the SR I submitted.
Thank you very much.
I just did not remove those .la files because in other cases as I know they were necessary. I don't know how to determine when they are.
There is a simple way to determine that. remove the files, if something breaks, determine what is broken, aka. what component is trying to load those files, fix that component, those files arent really supposed to be used in a modern OS. We almost managed to get rid of them distro wide, it was painful (read: my email inbox contained lots of "hey you broke something else, &%$#/$" ;) ) but I think it was worth the effort. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (5)
-
Cristian Rodríguez
-
Ilya Chernykh
-
Peter Linnell
-
Philipp Thomas
-
Tejas Guruswamy