Subject: pkg/29706: buildlink3 incorrectly reorders link objects
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 03/16/2005 10:28:00
>Number:         29706
>Category:       pkg
>Synopsis:       buildlink3 incorrectly reorders link objects
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 16 10:28:00 +0000 2005
>Originator:     Lex Wennmacher
>Release:        NetBSD 1.6.1
System: NetBSD 1.6.1 NetBSD 1.6.1 (MAIL) #0: Sun Jul 13 22:22:21 MEST 2003 i386
Architecture: i386
Machine: i386
Consider the following libtool command:

libtool --mode link cc -o test test.o -lfoo libbar.a

The buildlink3 infrastructure processes and reorders this to:
${WRKSRC}/.gcc/bin/gcc -o test test.o libbar.a -L${WRKSRC}.buildlink/lib \
-I${WRKSRC}.buildlink/include -lfoo

Note that the order of the libraries has changed. This can cause
unresolved externals.

Notably net/arla suffers from this as the Makefiles of this package
use both alternatives, "../../lib/foo/libfoo.a" and "-L../../lib/foo -lfoo"
to specify libraries.

Try to build net/arla without the numerous patches to work around this.

Not provided.

 pkgsrc as of 2005-03-16