Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <43740D5E.4050306@users.sourceforge.net> Date: Thu, 10 Nov 2005 21:17:50 -0600 From: "Yaakov S (Cygwin Ports)" User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: libtool: static libs where shared can't be built References: <4373C3BB DOT 3010407 AT users DOT sourceforge DOT net> <4373F3CF DOT 2020409 AT cwilson DOT fastmail DOT fm> In-Reply-To: <4373F3CF.2020409@cwilson.fastmail.fm> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Charles Wilson wrote: > First what does "/bin/sh ../libtool --version" say, when you run it in > your build directory? If it doesn't say 1.5.20, then you need to > re-libtoolize your project. I forgot to mention that I had already re-libtoolized (I consider autoreconf standard procedure), otherwise I wouldn't be bothering you about someone else's copy of libtool. :-) This is from our libtool-1.5.20-1. > Second, the "right" way to do this is the following: > > 1) since you have undefined symbols, you shouldn't lie to libtool by > saying "-no-undefined'. On cygwin/mingw, that SHOULD be enough to > ensure that only a static library is built. However, you'd still get a > shared library on other platforms. I already tried that in case 1 in my first message. > 2) If you want static only, for all platforms, but just for this > particular library, then if you're using automake --- use > target-specific LDFLAGS: > > libkscreensaver_la_LDFLAGS = -static [other flags like -version-info] > > (or otherwise pass -static [but NOT -no-undefined] to libtool) Hmmm, am I missing something here? /bin/sh ../libtool --mode=link --tag=CXX g++ -Wno-long-long -Wundef - -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -pipe - -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common - -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT - -DQT_NO_TRANSLATION -o libkscreensaver.la -rpath /usr/lib -L/usr/lib - -L/usr/lib/qt3/lib -L/usr/X11R6/lib -R /usr/lib -R /usr/lib -R /usr/lib/qt3/lib -R /usr/X11R6/lib -version-info 6:0:2 -static main.lo kscreensaver.lo ../kio/libkio.la ../kdecore/libkdecore.la -lqt-mt -lz - -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries ar cru .libs/libkscreensaver.a ranlib .libs/libkscreensaver.a creating libkscreensaver.la (cd .libs && rm -f libkscreensaver.la && ln -s ../libkscreensaver.la libkscreensaver.la) $ d .libs/libkscreensaver.a rw-r--r-- Yaakov:None 8 Nov 10 21:09 libkscreensaver.a 1 regular files, with a total size of 8. It's still empty! (That's 8 bytes.) Yaakov -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDdA1epiWmPGlmQSMRAvfQAJ4lJU5xIKfA1zumViYIxgglQKJscwCgopGx mHTNPJW1axYvHKjyggSTByU= =vAuQ -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/