Re: FW: Linking F90 routine

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 9 May 2007 07:00:03 -0600 (MDT)

Hi Soo-Jin,

As the error message indicates, you need to compile with -fPIC. If you
have the new version of NCL (4.3.0), I believe you can do this:

    WRAPIT -fPIC -pg test90.stub test_l.f90 test.f90

Just in case you don't have the new version, I've attached the latest
WRAPIT to this message so you can give it a try.

--Mary

On Wed, 9 May 2007, Soo-Jin Sohn wrote:

> Hi All,
>
>
>
> I missed some point on last mail. (I compiled it with wrong way).
>
> I have some trouble when I compile F90 codes with WRAPIT Version 090806 on a
> Linux X86_64 bit machine.
>
>
>
> Here is my error message:
>
>
>
> % WRAPIT -pg test90.stub test_l.f90 test.f90
>
>
>
> WRAPIT Version: 090806
>
> /usr/local/64/pgi/linux86-64/6.0/bin/pgf90
>
> COMPILING test_l.f90
>
> COMPILING test.f90
>
> LINKING
>
> /usr/bin/ld: WRAPIT.o: relocation R_X86_64_32 against `a local symbol' can
> not be used when making a shared object; recompile with -fPIC
>
> WRAPIT.o: could not read symbols: Bad value
>
> END WRAPIT
>
>
>
>
>
> Soo-Jin Sohn
>
> _____
>
> From: Soo-Jin Sohn [mailto:jeenie7_at_apcc21.net]
> Sent: Wednesday, May 09, 2007 11:51 AM
> To: saji_at_apcc21.net
> Subject: FW: Linking F90 routine
>
>
>
>
>
>
>
> _____
>
> From: Soo-Jin Sohn [mailto:jeenie7_at_apcc21.net]
> Sent: Wednesday, May 09, 2007 11:39 AM
> To: ncl-talk_at_ucar.edu
> Subject: Linking F90 routine
>
>
>
> Dear All,
>
>
>
> I am used to link NCL to Fortran 77 with WRAPIT on a Linux X86_64 bit
> machine.
>
> (WRAPIT Version: 090806)
>
> But I have a problem when I try to link NCL to F90 routines.
>
>
>
> The following are my simple test codes.
>
>
>
> test90.stub
>
> C NCLFORTSTART
>
> subroutine test (N)
>
> INTEGER N
>
> C NCLEND
>
>
>
> test_l.f90
>
> module test
>
> interface
>
> subroutine test (N)
>
> integer, intent(in) :: N
>
> end subroutine
>
> end interface
>
> end module
>
>
>
> test.f90
>
> subroutine test (N)
>
> implicit none
>
> integer, intent(in) :: N
>
> print *, N
>
> return
>
> end subroutine test
>
>
>
> When I compile these codes with WRAPIT, I got an error:
>
>
>
> % WRAPIT test90.stub test_l.f90 test.f90
>
>
>
> WRAPIT Version: 090806
>
> /usr/bin/g77
>
> COMPILING test_l.f90
>
> FATAL ERROR: g77 can not compile f90 code
>
>
>
> Thank you.
>
> Soo-Jin Sohn
>
>
>
>
>
> ===================================
>
>
>
> Soo-Jin Sohn
>
>
>
> Climate Model Specialist
>
> APCC(APEC Climate Center)
>
> National Pension Corporation Busan Bldg.
>
> Yeonsan 2(i)-dong, Yeonje-gu
>
> Busan, 611-705, Republic of Korea
>
> Tel.: +82-51-668-7471,2
>
> Fax: +82-51-668-7473
>
> Mobile: +82-16-751-8361
>
> e-mail: jeenie7_at_apcc21.net
>
>
>
> ====================================
>
>
>
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed May 09 2007 - 07:00:03 MDT

This archive was generated by hypermail 2.2.0 : Thu May 10 2007 - 09:24:01 MDT