X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <207491.83862.qm@web25504.mail.ukl.yahoo.com> Date: Thu, 5 Nov 2009 11:07:21 +0000 (GMT) From: Marco Atzeri Subject: Re: question on libtool usage/limitation To: cygwin AT cygwin DOT com, Dave Korn In-Reply-To: <4AF210AA.7050902@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 --- Gio 5/11/09, Dave Korn ha scritto: >=20 > > The current link command is > > /bin/sh ../libtool > --tag=3DCXX=A0=A0=A0--mode=3Dlink g++-4 -g > -O2=A0=A0=A0-DHAVE_CONFIG_H > -mieee-fp=A0=A0=A0-Wall -W -Wshadow > -Wold-style-cast -Wformat -g -O2=A0 -g -O2 -release > 3.3.50+ -no-undefined -o liboctave.la -rpath > /usr/local/lib/octave-3.3.50+=A0 [huge list of > x.lo]=A0 ../libcruft/libcruft.la=A0 -lcholmod > -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse > -larpack -lqrupdate=A0 -lfftw3 -lfftw3f -llapack -lblas > -lreadline -lncurses=A0 -L/usr/lib -lpcre -ldl > -L/bin/../lib/gcc/i686-pc-cygwin/4.3.4 -L/bin/../lib/gcc > -L/usr/lib/gcc/i686-pc-cygwin/4.3.4 > -L/bin/../lib/gcc/i686-pc-cygwin/4.3.4/../../.. -lm > -lgfortranbegin -lgfortran -lcygwin -luser32 -lkernel32 > -ladvapi32 -lshell32=A0 -lwsock32 -lm=A0 -lwsock32 > -lwsock32 -lm=A0 -lwsock32 > >=20 > > but the disappointing outcome is > > > ------------------------------------------------------- > > *** Warning: This system can not link to static lib > archive > /bin/../lib/gcc/i686-pc-cygwin/4.3.4/libgfortranbegin.la. > > *** I have the capability to make that library > automatically link in when > > *** you link to this library.=A0 But I can only do > this if you have a > > *** shared version of the library, which you do not > appear to have. > > libtool: link: rm -fr=A0 > .libs/liboctave.la.lnkscript > >=20 > > *** Warning: linker path does not have real file for > library -lcholmod. > > *** I have the capability to make that library > automatically link in when > > *** you link to this library.=A0 But I can only do > this if you have a > > *** shared version of the library, which you do not > appear to have > > *** because I did check the linker path looking for a > file starting > > *** with libcholmod and none of the candidates passed > a file format test > > *** using a file magic. Last file checked: > /usr/lib/libcholmod.a > >=20 > > [repeated for all the static libs] > > > ------------------------------------------------------- > >=20 > > Does libtool on cygwin require special setting to > overcome such=20 > > problem ? On linux platform the build seems to be > fine. >=20 > =A0 On Linux probably it's all shared libs and it > doesn't matter if symbols > don't get resolved in the final link because they'll still > be resolved at > load-time; on Windows of course everything must be resolved > in the final link, > which limits libtool's options if it can't find the > expected sorts of > libraries to link against. >=20 > > Moreover for Fortran libgfortranbegin.la=20 > > is currently a static lib so I not easily overcome > > the issue changing it to a dll. >=20 > =A0 Perhaps you'd better show us how you've defined the > libtool primaries, > liboctave_la_LINK/LIBS/LDADD/xFLAGS/whatever in > particular.=A0 IIUC, depending > which one you use (and whether it's a full path to the .a > file or a -lXXX > option), libtool interprets what you mean as either 1) > please add the contents > of this library to the link, or 2) make the output library > dependent on this > input library.=A0 You're getting 2) when you want 1), > and it's certainly to be > expected that attempting 2) with plain static archives that > don't even have > libtool .la control scripts wouldn't work right on PE. >=20 > =A0 =A0 cheers, > =A0 =A0 =A0 DaveK >=20 Hi Dave,=20 Thank for the clarification, I was suspecting something=20 like that. I tried to "convince" libtool to use the static libraries, building and ad hoc .la script, but I didn't fooled it. I suppose that I should replace the simple "-llibcholmod" with one of the methods mentioned in the libtool documentation: `-Wc,FLAG' `-Xcompiler FLAG' Pass a linker-specific flag directly to the compiler. `-Wl,FLAG' `-Xlinker FLAG' Pass a linker-specific flag directly to the linker. `-XCClinker FLAG' Pass a link-specific flag to the compiler driver (CC) during linking. but I need to understand, which and how to specify the static lib /usr/lib/libcholmod.a (and the others) Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple