Mailinglist Archive: opensuse-packaging (202 mails)

< Previous Next >
Re: [opensuse-packaging] linker error - need help
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=ktagebuch&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.

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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
References