This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: porting g77 code to gfortran
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Granville Sewell <sewell at math dot utep dot edu>
- Date: Sun, 6 Jan 2008 23:35:56 +0100
- Subject: Re: porting g77 code to gfortran
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=7B+PATZCsdN9xynUgu2qqgErYkFGYtNxtjco1dBLxDQ=; b=r4c3CsV+wkhkoF/LS9+ImdHY8z2L/Dyknd2unnEAXKKFrjBeIqHozTOw0e/4kMcn2RPGduNGxDr8C20WOmvfGAcCbkgmOyqnEwPUnctDp6Kh7lOvIL13YshWQLpdNkL7GY474XF5mkCeO5Ty7wOejpOMF9H+Le9p+rq0/Cg6dGo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=Md0GtzG4Sh7MDzhv+Y1AAUbjxDO4z0ovuTxkyY3TggW7MllscM8gr7Qh/vzslL6c05BfL30t1GvObk+yucE/+AmXUl968K/OnFhec4TA+LL2rUVwQSWshwvodcA7z4A+0l7c4bGELXq3r27VGxduJTl70+Qp+KinZDqkgA92xP8=
- References: <200801062216.m06MGiWF003533@banach.math.utep.edu>
On Sunday 06 January 2008 23:16:44 Granville Sewell wrote:
Let's see:
> gfortran -c main.f
> gfortran -static main.o -L /home/sewell/lib -lpde2dgf64 -L /usr/X11R6/lib64
> -lX11 -lXt
> /usr/X11R6/lib64/libXt.a(Initialize.o): In function `GetRootDirName':
> (.text+0x223): warning: Using 'getpwnam_r' in statically linked
> applications requires at runtime the shared libraries from the glibc
> version used for linking
Drop '-static' and these will go away. Static linking is evil anyway ;)
> /usr/X11R6/lib64/libX11.a(XlibInt.o): In function
> `_XProcessInternalConnection': (.text+0x18c4): undefined reference to
> `pthread_equal'
Something, somewhere uses threads. Add '-lpthread'.
> /usr/X11R6/lib64/libX11.a(XlibInt.o):(.text+0x3345): more undefined
> references to `pthread_equal' follow /usr/X11R6/lib64/libXt.a(Event.o): In
> function `_XtEventInitialize': (.text+0x1305): undefined reference to
> `XCreateRegion'
As libX11 provides XCreateRegion, switch '-lX11 -lXt'. Use '-lXt -X11'.
Holds true for lot more of these.
> /usr/X11R6/lib64/libXt.a(Shell.o): In function `JoinSession':
> (.text+0x1669): undefined reference to `IceConnectionNumber'
Function `IceConnectionNumber' is defined in libICE. Add '-lICE'.
> [...]
Continue until you got rid of all messages.
To begin with, try something like:
$> gfortran main.o -L /home/sewell/lib -lpde2dgf64 -L /usr/X11R6/lib64 \
-Xt -lICE -lX11 -lpthread
Hope this helps.
Daniel