This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: libtool: link: object name conflicts in archive
- From: Peter Rosin <peda at lysator dot liu dot se>
- To: cygwin at cygwin dot com
- Date: Thu, 17 Apr 2014 11:56:52 +0200
- Subject: Re: libtool: link: object name conflicts in archive
- Authentication-results: sourceware.org; auth=none
- References: <7c71eb34219779df3fb3d492f29bcead at mail dot eclipso dot de> <20140415093113 dot GF3271 at calimero dot vinschen dot de> <22601c400b5e0fffb54b32a9d6b2bdf8 at mail dot eclipso dot de> <20140415112757 dot GI3271 at calimero dot vinschen dot de> <534DC67C dot 3080909 at lysator dot liu dot se> <d9e573a45fdb88940ab5064aa333cccb at mail dot eclipso dot de> <534F94CC dot 5010606 at ludens dot elte dot hu>
On 2014-04-17 10:46, szgyg wrote:
> On 4/16/2014 9:21 AM, Gisela Haschmich wrote:
>>
>> /bin/sh ../../libtool --tag=F77 --mode=link gfortran -o liby12.la y12mae.lo y12maf.lo y12mbe.lo y12mbf.lo y12mce.lo y12mcf.lo y12mde.lo y12mdf.lo y12mfe.lo y12mge.lo y12mhe.lo -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2 -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../.. -lgfortran -lquadmath -lm -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32 -lltdl -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2 -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../.. -lgfortran -lquadmath -lm -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32 -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2 -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib -L/lib/../lib -L/usr/li
>> b/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../.. -lgfortran -lquadmath -lm -lcygwin -ladvapi32
>> -lshell32 -luser32 -lkernel32 -lltdl
>> libtool: link: lib -OUT:.libs/liby12.lib .libs/y12mae.o .libs/y12maf.o .libs/y12mbe.o .libs/y12mbf.o .libs/y12mce.o .libs/y12mcf.o .libs/y12mde.o .libs/y12mdf.o .libs/y12mfe.o .libs/y12mge.o .libs/y12mhe.o
>> ../../libtool: line 1117: lib: command not found
>
> After running configure there is a file named libtool in the source directory. Replace it with libtool from /bin, then run make. (You may need to install the libtool package in cygwin's setup.)
>
> They have this in configure.in:
> -----
> if test "x$FC" = "x" ; then
> AC_PROG_F77
> if test "x$F77" = "x" ; then
> AC_MSG_ERROR([Need a working Fortran compiler])
> fi
> AC_F77_LIBRARY_LDFLAGS
> LIBS="$LIBS $F77LIBS"
> else
> F77="$FC"
> F77LIBS="$FCLIBS"
> LIBS="$LIBS $FCLIBS"
> fi
> -----
> so libtool thinks it's F77 but not G77 and tries to use the native linker.
Ouch, that's just br0ken.
It would probably work better to move AC_PROG_F77 out of the if
as below, otherwise language support is added to Libtool since
it "sees" the AC_PROG_F77 macro, but Libtool then gets thoroughly
confused when the macro expansion is not executed.
AC_PROG_F77
if test "x$FC" = "x" ; then
if test "x$F77" = "x" ; then
AC_MSG_ERROR([Need a working Fortran compiler])
fi
AC_F77_LIBRARY_LDFLAGS
LIBS="$LIBS $F77LIBS"
else
F77="$FC"
F77LIBS="$FCLIBS"
LIBS="$LIBS $FCLIBS"
fi
Side note, I believe it's $FLIBS, not $F77LIBS. But it has been many years
since I used Fortran at all, and I have never used it with Autotools.
Cheers,
Peter
--
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