Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have never been to any technical site that shows concern just to anybody with problems...I look forward to also share in the future..."

Geography

Where in the world do Tek-Tips members come from?

Distributing Fortran Program /// libfj9i6

flav256 (Programmer)
7 Jul 04 8:37
Hello,

I'm using Lahey Fortran compiler lf9561 on Linux.

I compile the program with the lahey automake feature... I can execute it on the same machine...
Now, I m trying to distribute my program : I mean, I want to run it on an other linux machine, which does not have the lahey compiler installed.

The error message is the following :
---
myProgram : error while loading shared libraries: libfj9i6.so.1: cannot open shared object file: No such file or directory
---

I ve tried to use the --staticlink option in the automake.fig file (line: 'LINK =' ), but I got the same error on the other machine.

Is there someone to help me and explain me how the static and shared libraries work?
How can I create libraries that I can distribute with the program? Do I have to rebuild my program and what does it mean?

Flav256

---
automake.fig :

LF95

INCLUDE = /usr/local/imsl/include/lf95:./INCLUDE

FILES = DIR1/*.f*
OBJDIR = OBJ_DIR1
MODULE = MODULES_DIR1
COMPILE = lf95 -O --prefetch2 --tpp -c %fi --mod ./MODULES_DIR1:./DIR2/MODULES:./MODULES --include %id -o %od%sf%oe

AND

FILES = DIR2/SRC/*.f90
OBJDIR = DIR2/OBJ
MODULE = DIR2/MODULES
COMPILE = lf95 -O --prefetch2 --tpp -c %fi --mod ./DIR2/MODULES:./MODULES:./MODULES_DIR1 --include %id -o %od%sf%oe

AND

FILES = SRC/*.f*
OBJDIR = OBJ
MODULE = MODULES
COMPILE = lf95 -O --prefetch2 -c --tpp %fi --mod ./MODULES:./MODULES_DIR1:./DIR2/MODULES --include %id -o %od%sf%oe

TARGET = BIN/hm4d
LINK = lf95 DIR2/OBJ/*.o ./OBJ_DIR1/*.o ./OBJ/*.o -o %ex --mod ./MODULES:./MODULES_DIR1:./DIR2/MODULES --include %id -L ./DIR2 -L ./DIR1 -L /usr/local/imsl/lib/lf95 -l sf90mp -l smaths -l smathd -l sstats -l sstatd -l fj9i6
xwb (Programmer)
7 Jul 04 14:55
Don't know about Lahey but what you need is something like libfj9i6.a

In fact, all the libraries should end with .a instead of .so.  Then you will get a static link but be warned: it will be *HUGE*.

Presumably lf95 issues an ld or an ar command depending on what it gets.  The ar command will create a static link for you.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close