Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing Fortran Program /// libfj9i6

Status
Not open for further replies.

flav256

Programmer
May 28, 2003
21
FR
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top