apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject Re: [patch] bogus libtool file in APRUTIL_EXPORT_LIBS
Date Mon, 30 Oct 2006 12:47:01 GMT
Justin Erenkrantz wrote:
> On 10/28/06, Davi Arnaut <davi@haxent.com.br> wrote:
>> Add the expat libtool file to the LT_LDFLAGS variable to avoid placing a
>> libtool file path onto LDFLAGS (pkg-config --libs apr-util-1).
> 
> AFAICT, we don't ever use LT_LDFLAGS with apr-util, so we won't use
> the .la file when linking.  So, won't that break something?  -- justin

But apr-util uses apr_rules.mk (from apr) which places the LT_LDFLAGS
the on the libtool link command (you may confirm it by looking at apr's
configure.in).

Current behavior is broken because it will place a .la file path on the
LDFLAGS for non-libtool compiles, as APRUTIL_EXPORT_LIBS is also used
when in the apr-util.pc.in file. e.g.:


/Users/davi/svn/apr-util $ pkg-config --libs apr-util-1
/Users/davi/svn/apr-util/xml/expat/lib/libexpat.la -L/tmp/apu/lib
-L/opt/local/lib -laprutil-1 -lsqlite3 -liconv -lapr-1 -lpthread

When compiling:

/Users/davi/svn/apr-util $ gcc -o foo test.c `pkg-config --cflags --libs
apr-util-1`
/usr/bin/ld: /Users/davi/svn/apr-util/xml/expat/lib/libexpat.la bad
magic number (not a Mach-O file)
collect2: ld returned 1 exit status

--
Davi Arnaut






Mime
View raw message