LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-14-2006, 09:21 AM   #1
tomatoefish
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Rep: Reputation: 0
Gnu Fortran versus Intel Fortran


Hi!

I have a problem compiling code using gfortran. If I use
ifort -G the code compiles without error messages. However if I use g95 -shared linking does not work with following error message:

/usr/bin/ld: iosub.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Recompiling using fPIC does not fix the problem.

I use the following commands to compile:

gfortran -shared -o jivelib.so \
iosub.o dynamic.o trace.o segment.o \
invert.o bsp2d.o bsp3d.o modules.o

Kind regards, Tim!
 
Old 02-14-2006, 12:55 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Without having much knowledge about fortran in general, and
the differences between the two compilers in particular the
"R_X86_64_32" suggests that you're trying to mix 32 and 64 bit
code? Maybe you need to try architecture flags with the gnu
compiler, e.g. -mtune=k8 or try to find the 64-bit equivalent
(or 32, no idea which way around you're mixing) of whatever
you're linking against.


Cheers,
Tink
 
Old 02-20-2006, 01:03 PM   #3
tomatoefish
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the idea! Changed my library to -L/usr/X11R6/lib64 and now everything is working.
 
Old 02-20-2006, 02:31 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sweeeeeet ... glad I could help!


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 09:59 AM
how to uninstall the intel fortran compiler 8 ztdep Programming 5 07-22-2005 03:29 AM
Intel Fortran Compiler under KDevelop Ralph Kahel Linux - Software 1 07-21-2005 03:57 PM
How can I PATH the intel fortran library? souaw Mandriva 1 04-27-2004 05:34 PM
Intel Fortran Compiler - glibc dependencies bad damien Linux - Software 1 12-03-2003 12:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration