help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to force -liberty?


From: Kilian A. Foth
Subject: Re: How to force -liberty?
Date: 30 Jul 2004 13:36:48 GMT
User-agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))

Glynn Clements <glynn.clements@virgin.net> wrote:

> "Kilian A. Foth" <foth@informatik.uni-hamburg.de> writes:

>> I'm trying to compile a largish autoconf'ed project (KDE) on an
>> outlandish platform (Solaris) and working around many Linuxisms in the
>> sources. The latest one has me stumped: files use vasprintf() under the
>> assumption that this would be provided by the standard libraries, but
>> on Solaris it isn't. That would be no big problem; I know that
>> linking to libiberty fixes that, but I can't for the life of me figure
>> out where to put the `-liberty' to that the build process picks it up.
>> 
>> The usual solutions of adding it to CXXFLAGS, to the Makefile etc.
>> don't work. I even ran amok and hacked the local libtool to include it
>> unconditionally -- no success. How do I tell the autoconf system "Yes,
>> I do need libiberty unconditionally!' ?

> CFLAGS/CXXFLAGS are used for compiling, not linking. For linking, you
> could try using LDFLAGS or LIBS; autoconf will set these variables
> from the environment in a similar manner to CFLAGS/CXXFLAGS.

So I thought, but it doesn't:

 $ LDFLAGS=-liberty LIBS=-liberty make
[...]
/bin/bash ../libtool --silent --mode=link --tag=CXX g++  -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -O2 
-I/opt/pkg/kde3.3-beta2/include -I/opt/pkg/qt-3.3.1/include 
-I/usr/X11R6/include -L/opt/pkg/kde3.3-beta2/lib -L/opt/pkg/qt-3.3.1/lib 
-L/usr/X11R6/lib -I/opt/pkg/kde3.3-beta2/include -I/opt/pkg/qt-3.3.1/include 
-I/usr/X11R6/include -L/opt/pkg/kde3.3-beta2/lib -L/opt/pkg/qt-3.3.1/lib 
-L/usr/X11R6/lib -O2 -pipe -O2 -pipe -fno-exceptions -fno-check-new -fno-common 
-DQT
_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT 
-DQT_NO_TRANSLATION   -L/opt/pkg/kde3.3-beta2/lib -L/usr/X11R6/lib 
-L/opt/pkg/qt-3.3.1/lib -L/opt/pkg/kde3.3-beta2/lib -L/usr/X11R6/lib 
-L/opt/pkg/qt-3.3.1/lib  -o kmail -L/opt/pkg/qt-3.3.1/lib 
-L/opt/pkg/kde3.3-beta2/lib  -R /opt/pkg/kde3.3-beta2/lib -R 
/opt/pkg/qt-3.3.1/lib main.o libkmailprivate.laUndefined                    
first referenced
 symbol                             in file
vasprintf                           
/data/source/KDE/konstruct/kde/kdepim/work/kdepim-3.2.92/libkdenetwork/gpgmepp/.libs/libgpgme++.so
asprintf                            
/data/source/KDE/konstruct/kde/kdepim/work/kdepim-3.2.92/libkdenetwork/gpgmepp/.libs/libgpgme++.so
ld: fatal: Symbol referencing errors. No output written to .libs/kmail

So the question is really, `How do I trick libtool into adding an -l
option that I know I need, when libtool doesn't believe me?'


-- 
No animal was harmed in the composition of this message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]