delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/17/05:57:15

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=sUSNPK60VPT3pcbjbwNl+EhFocYeO2ISRQEgJDHQ+KB
dC4UEILGH/2t8EPP7pRkDhq2C6cEHW5+YsZmGh63I1bqQqK9Hqq0HOUhlk7ZSrsE
eTp8Tb3wF9eFxiEkm2gMQjtJdObd8ePerBHwqwi5WFwIHFe7qf8acTKROF/mpCvY
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=c6AV6f+fOuc+xaNkKdtL5ZtTcgU=; b=X3Rv5SaYhdkIu8z5h
WxUcBoxAEvN/UQ31ttNOsFOxtD/zQl1frNeliuALhHseHLVjiEIxowO4n4R3SWHT
J6Lc1VIyI/JU+UDxUQZVtcOlTobJ1DHLD9j3oyzrWdKjnyARqApBRDxT7478Dkz0
KYzpl7waMDD4MXyqUyynUmvR2k=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail.lysator.liu.se
Message-ID: <534FA564.4020904@lysator.liu.se>
Date: Thu, 17 Apr 2014 11:56:52 +0200
From: Peter Rosin <peda AT lysator DOT liu DOT se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: libtool: link: object name conflicts in archive
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>
In-Reply-To: <534F94CC.5010606@ludens.elte.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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019