This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question on libtool usage/limitation


Marco Atzeri wrote:

> The current link command is
> /bin/sh ../libtool --tag=CXX   --mode=link g++-4 -g -O2   -DHAVE_CONFIG_H -mieee-fp   -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2  -g -O2 -release 3.3.50+ -no-undefined -o liboctave.la -rpath /usr/local/lib/octave-3.3.50+  [huge list of x.lo]  ../libcruft/libcruft.la  -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse -larpack -lqrupdate  -lfftw3 -lfftw3f -llapack -lblas -lreadline -lncurses  -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  -lwsock32 -lm  -lwsock32 -lwsock32 -lm  -lwsock32
> 
> 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.  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  .libs/liboctave.la.lnkscript
> 
> *** 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.  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
> 
> [repeated for all the static libs]
> -------------------------------------------------------
> 
> Does libtool on cygwin require special setting to overcome such 
> problem ? On linux platform the build seems to be fine.

  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.

> Moreover for Fortran libgfortranbegin.la 
> is currently a static lib so I not easily overcome
> the issue changing it to a dll.

  Perhaps you'd better show us how you've defined the libtool primaries,
liboctave_la_LINK/LIBS/LDADD/xFLAGS/whatever in particular.  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.  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.

    cheers,
      DaveK


--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]