[opensuse-packaging] Problems with linking
Hi! I have problems with linking when building KVim. It builds well for 11.1 but not for 11.2 and further. It seems the linker does not see the very basic libraries such as qt and kdelibs despite them being explicitely included in the linker's call. Here is the link to the build logs: https://build.opensuse.org/package/show?package=kvim&project=home%3AAnsus%3AKDE3 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2011/1/5 Ilya Chernykh
I have problems with linking when building KVim. It builds well for 11.1 but not for 11.2 and further. It seems the linker does not see the very basic libraries such as qt and kdelibs despite them being explicitely included in the linker's call.
The "-l namespec" option in the ld manual says: "The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again." So the order is wrong. Fix it or use "export SUSE_ASNEEDED=0" (with the side effect of perhaps making your package require libraries that the binary doesn't really use). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wednesday 05 January 2011 11:00:42 Cristian Morales Vega wrote:
So the order is wrong. Fix it or use "export SUSE_ASNEEDED=0" (with the side effect of perhaps making your package require libraries that the binary doesn't really use).
"export SUSE_ASNEEDED=0" does not help here, unfortunately. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2011/1/5 Ilya Chernykh
On Wednesday 05 January 2011 11:00:42 Cristian Morales Vega wrote:
So the order is wrong. Fix it or use "export SUSE_ASNEEDED=0" (with the side effect of perhaps making your package require libraries that the binary doesn't really use).
"export SUSE_ASNEEDED=0" does not help here, unfortunately.
Your spec file says "SUSE_AS_NEEDED", no SUSE_ASNEEDED. About the export LDFLAGS="$LDFLAGS -lkdecore -lkdeui -lkio -lqt-mt -lkparts -lDCOP" part. I have not looked in the makefile. But in general in LDFLAGS you must NOT use "-l<lib>". *LDFLAGS* variables are usually inserted and the start of the command line, so the problem. The correct variable is usually something of the form *LIB* or *LDADD*. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wednesday 05 January 2011 11:25:18 Cristian Morales Vega wrote:
2011/1/5 Ilya Chernykh
: On Wednesday 05 January 2011 11:00:42 Cristian Morales Vega wrote:
So the order is wrong. Fix it or use "export SUSE_ASNEEDED=0" (with the side effect of perhaps making your package require libraries that the binary doesn't really use).
"export SUSE_ASNEEDED=0" does not help here, unfortunately.
Your spec file says "SUSE_AS_NEEDED", no SUSE_ASNEEDED. About the
export LDFLAGS="$LDFLAGS -lkdecore -lkdeui -lkio -lqt-mt -lkparts -lDCOP"
part. I have not looked in the makefile. But in general in LDFLAGS you must NOT use "-l<lib>". *LDFLAGS* variables are usually inserted and the start of the command line, so the problem. The correct variable is usually something of the form *LIB* or *LDADD*.
LIBS still puts it into beginning of the command line. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wednesday 05 January 2011 11:25:18 Cristian Morales Vega wrote:
"export SUSE_ASNEEDED=0" does not help here, unfortunately.
Your spec file says "SUSE_AS_NEEDED", no SUSE_ASNEEDED.
Indeed. That was the problem. Thank you, now builds well. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Cristian Morales Vega
-
Ilya Chernykh