libtool
[Top][All Lists]
Advanced

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

libtool removes -F arguments on Darwin.


From: SIGOURE Benoit
Subject: libtool removes -F arguments on Darwin.
Date: Sun, 22 Oct 2006 14:15:24 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.0.2)

Hello folks
It seems that libtool removes the -F's passed to GCC when linking a library on
Darwin that uses MacOSX' framework thingy:

$ make
/bin/sh ../../../libtool --tag=CXX --mode=link g++ -Wall -W -Weffc++
-Wold-style-cast -pipe -g -O2   -o libfsm_xml_parser.la -rpath /usr/local/lib
-headerpad_max_install_names  libfsm_xml_parser_la-QStdIStream.lo
libfsm_xml_parser_la-parse.lo libfsm_xml_parser_la-xml_parser.lo
-F/usr/local/Trolltech/Qt-4.2.0/lib -L/usr/local/Trolltech/Qt-4.2.0/lib
-framework QtXml -framework QtGui -framework Carbon -framework QuickTime
-framework AppKit -framework QtCore -lz -lm -liconv -framework
ApplicationServices

g++ -dynamiclib -single_module ${wl}-flat_namespace ${wl}-undefined
${wl}suppress -o .libs/libfsm_xml_parser.0.0.0.dylib 
.libs/libfsm_xml_parser_la-QStdIStream.o .libs/libfsm_xml_parser_la-parse.o
.libs/libfsm_xml_parser_la-xml_parser.o  -L/usr/local/Trolltech/Qt-4.2.0/lib
-lz -lm /usr/lib/libiconv.dylib  -framework QtXml -framework QtGui -framework
Carbon -framework QuickTime -framework AppKit -framework QtCore -framework
ApplicationServices -install_name  /usr/local/lib/libfsm_xml_parser.0.dylib
-Wl,-compatibility_version -Wl,1 -Wl,-current_version -Wl,1.0

ld: can't locate framework for: -framework QtXml
/usr/bin/libtool: internal link edit command failed
make: *** [libfsm_xml_parser.la] Error 1

(I inserted empty lines so that it's easier to read).
I was using libtool 1.5.22 but I also have the problem with 1.5.23a.

Notice on the line echo'ed by libtool that it invoked gcc without the -F
argument that was originally passed to libtool. Adding that argument manually
in the invokation line succeeds to link the library.

I included the full log (with --debug) at
https://tsunanet.net/~tsuna/libtool.log (just in case).

This issue has already been brought to the list
(http://lists.gnu.org/archive/html/libtool/2005-08/msg00010.html) with an
obvious workaround: Use -Wl,-F... however I was rather surprised that libtool
supports -framework and not -F. It's like if it supported -l and not -L :)

Peter O'Gorman wrote (in
http://lists.gnu.org/archive/html/libtool/2005-08/msg00015.html)

> Most people put their frameworks in {/System,/Network,,~}/Library/Frameworks,
> where they are in the default search path. People using libtool don't tend to
> have uninstalled frameworks (the major use for -F, afaik) during build.
>
> Why do you need -F, do many people actually need it? I have never seen a
> request for this before.

I ran across this problem while using Qt.
Qt installs its libraries as frameworks under /usr/local/Trolltech/...
I didn't want to use Qt's build system (with qmake) so I wrote a bunch of M4
macros so that my configure.ac runs qmake on a fake source and then guess the
proper flags to compile Qt apps by looking at the Makefile generated by qmake.

Regards,

-- 
SIGOURE Benoit aka Tsuna
EPITA Promo 2008, LRDE





reply via email to

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