hpc1367
2004-Sep-20 22:18 UTC
[R] unable to load shared library "/home/hpc1367/runs/taper/taper.so"
I am trying to load a .so file and get the following error message:> dyn.load("taper.so",local=F)Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "/home/hpc1367/runs/taper/taper.so": ld.so.1: /usr/local/lib/R/bin/R.bin: fatal: relocation error: file /home/hpc1367/runs/taper/taper.so: symbol f90_init: referenced symbol not found also tried with default local=T and got same error. my makefile (used to produce the .so) is included below F90S = taper.f90 OBJS = taper.o LIBS = -lsocket -lnsl -lintl OPT = -fast MODS = -M/opt/NAG/fnsol04dbl/nag_mod_dir NAG = /opt/NAG/fnsol04dbl/libnagfl90.a STATNAG = /opt/NAG/flsol20dal/libnag.a taper.o : taper.f90 f95 -c -dalign $(OPT) $(MODS) taper.f90 taper.so: taper.f90 f95 -o taper.so -G -dalign $(OPT) $(MODS) taper.f90 taper.x : taper.o f95 -o taper.x -dalign $(OPT) $(MODS) $(LIBS) taper.o $(OBJS) $(NAG) please, help thank you very much stoyan
Martin Maechler
2004-Sep-21 08:00 UTC
[R] unable to load shared library "/home/hpc1367/runs/taper/taper.so"
>>>>> "hpc1367" == hpc1367 <sje at mast.queensu.ca> >>>>> on Mon, 20 Sep 2004 18:18:58 -0400 writes:Why do you put the full filename in the e-mail subject????? (We'd rather want to know your operating system, some kind of unix, probably Linux, seen from below) hpc1367> I am trying to load a .so file and get the hpc1367> following error message: >> dyn.load("taper.so",local=F) hpc1367> Error in dyn.load(x, as.logical(local), hpc1367> as.logical(now)) : unable to load shared library hpc1367> "/home/hpc1367/runs/taper/taper.so": ld.so.1: hpc1367> /usr/local/lib/R/bin/R.bin: fatal: relocation hpc1367> error: file /home/hpc1367/runs/taper/taper.so: hpc1367> symbol f90_init: referenced symbol not found ^^^^^^^^^^^^^^^^ this is the crucial part ! hpc1367> also tried with default local=T and got same error. of course, since your fortran90 code needs f90_init() and that is evidently not linked into your taper.so but is provided by your Fortran90 hpc1367> my makefile (used to produce the .so) is included below hpc1367> F90S = taper.f90 hpc1367> OBJS = taper.o hpc1367> LIBS = -lsocket -lnsl -lintl hpc1367> OPT = -fast hpc1367> MODS = -M/opt/NAG/fnsol04dbl/nag_mod_dir hpc1367> NAG = /opt/NAG/fnsol04dbl/libnagfl90.a hpc1367> STATNAG = /opt/NAG/flsol20dal/libnag.a hpc1367> taper.o : taper.f90 hpc1367> f95 -c -dalign $(OPT) $(MODS) taper.f90 hpc1367> taper.so: taper.f90 hpc1367> f95 -o taper.so -G -dalign $(OPT) $(MODS) taper.f90 hpc1367> taper.x : taper.o hpc1367> f95 -o taper.x -dalign $(OPT) $(MODS) $(LIBS) taper.o $(OBJS) hpc1367> $(NAG) You must make sure that the "system" library which defines the f90_init() symbol is specified at link time, i.e., when taper.so is built. So I guess you need at least the $(LIBS) also in that line, probably also $(NAG). But we don't have your non-free NAG compilers and libraries and it's hard to find out "from here". Use 'nm' and 'ldd' but probably rather ask someone at your institution who knows more about compilation and linking. hpc1367> please, help hpc1367> thank you very much
Reasonably Related Threads
- Documentation for taper in spec.taper (PR#8871)
- Spectral analysis with mtm-svd Multi-Taper Method Combined with Singular Value Decomposition
- spec.pgram() - circularity of kernel
- spec.pgram returns different spectra when fast=TRUE and the number of samples is odd
- how to get flac fingerprint from a wav?