[R-SIG-Mac] plier source compilation error related to dylib

S Kong skong at mac.com
Fri Apr 21 20:43:45 CEST 2006


Dear Simon

It seems there is the affyplier.so in the directory.
When I start R64 and try to dyn.load
 > dyn.load("/Research/GEO_CEL/pliersrc/affyplier.so")
Segmentation fault

DYLIB_LIBRARY_PATH was set in .tcshrc as
DYLIB_LIBRARY_PATH=/usr/local/lib64/R/lib

Thank you very much for the helps!!!
-S

[Quad:~/Desktop/pliersrc] skong% ls
affy_ptr.h      affyplier.h     error.h         plier_impl.o     
plieralg.o
affyheapsort.h  affyplier.o     iaffyplier.h    plieralg.cpp     
rwrapper.cpp
affyplier.cpp   affyplier.so    plier_impl.cpp  plieralg.h       
rwrapper.o
[Quad:~/Desktop/pliersrc] skong% otool64 -L /usr/local/lib64/R/lib/*
otool64: can't map file: /usr/local/lib64/R/lib/R ((os/kern) invalid  
argument)
/usr/local/lib64/R/lib/libR.dylib:
         libR.dylib (compatibility version 2.2.0, current version 2.2.1)
         /System/Library/Frameworks/vecLib.framework/Versions/A/ 
vecLib (compatibility version 1.0.0, current version 176.1.0)
         libgfortran.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         libgcc_s.1.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
         libreadline.5.dylib (compatibility version 5.0.0, current  
version 5.0.0)
/usr/local/lib64/R/lib/libgcc_s.1.0.dylib:
         libgcc_s.dylib (compatibility version 1.0.0, current version  
1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
/usr/local/lib64/R/lib/libgcc_s.dylib:
         libgcc_s.dylib (compatibility version 1.0.0, current version  
1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
/usr/local/lib64/R/lib/libgfortran.0.0.0.dylib:
         libgfortran.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
         libgcc_s.1.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
/usr/local/lib64/R/lib/libgfortran.0.dylib:
         libgfortran.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
         libgcc_s.1.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
/usr/local/lib64/R/lib/libgfortran.dylib:
         libgfortran.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
         libgcc_s.1.0.dylib (compatibility version 1.0.0, current  
version 1.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
/usr/local/lib64/R/lib/libreadline.5.0.dylib:
         libreadline.5.dylib (compatibility version 5.0.0, current  
version 5.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
/usr/local/lib64/R/lib/libreadline.5.dylib:
         libreadline.5.dylib (compatibility version 5.0.0, current  
version 5.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
/usr/local/lib64/R/lib/libreadline.dylib:
         libreadline.5.dylib (compatibility version 5.0.0, current  
version 5.0.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.1.2)
[Quad:~/Desktop/pliersrc] skong% otool64 -L /usr/local/lib/libg*
/usr/local/lib/libgcc_s.1.0.dylib: is not an object file
/usr/local/lib/libgcc_s.dylib: is not an object file
/usr/local/lib/libgdraw.1.0.8.dylib: is not an object file
/usr/local/lib/libgdraw.1.dylib: is not an object file
/usr/local/lib/libgdraw.dylib: is not an object file
/usr/local/lib/libgdraw.la: is not an object file
/usr/local/lib/libgfortran.0.0.0.dylib: is not an object file
/usr/local/lib/libgfortran.0.dylib: is not an object file
/usr/local/lib/libgfortran.dylib: is not an object file
Archive : /usr/local/lib/libgfortranbegin.a
/usr/local/lib/libgfortranbegin.a(fmain.o): is not an object file
/usr/local/lib/libggobi.0.0.0.dylib: is not an object file
/usr/local/lib/libggobi.0.dylib: is not an object file
/usr/local/lib/libggobi.dylib: is not an object file
/usr/local/lib/libggobi.la: is not an object file
/usr/local/lib/libgunicode.2.0.2.dylib: is not an object file
/usr/local/lib/libgunicode.2.dylib: is not an object file
/usr/local/lib/libgunicode.dylib: is not an object file
/usr/local/lib/libgunicode.la: is not an object file
[Quad:~/Desktop/pliersrc] skong%



On Apr 20, 2006, at 4:51 PM, Simon Urbanek wrote:

>
> On Apr 20, 2006, at 2:25 PM, S Kong wrote:
>
>> [Quad:~/Desktop/pliersrc] skong% R64 CMD SHLIB affyplier.cpp  
>> plieralg.cpp plier_impl.cpp rwrapper.cpp
>> g++ -no-cpp-precomp -I/usr/local/lib64/R/include  -I/usr/local/ 
>> include   -fno-common  -arch ppc64 -m64 -mcpu=G5 -mtune=G5 - 
>> mpowerpc-gpopt -force_cpusubtype_ALL -c plieralg.cpp -o plieralg.o
>> g++ -no-cpp-precomp -I/usr/local/lib64/R/include  -I/usr/local/ 
>> include   -fno-common  -arch ppc64 -m64 -mcpu=G5 -mtune=G5 - 
>> mpowerpc-gpopt -force_cpusubtype_ALL -c plier_impl.cpp -o  
>> plier_impl.o
>> g++ -no-cpp-precomp -I/usr/local/lib64/R/include  -I/usr/local/ 
>> include   -fno-common  -arch ppc64 -m64 -mcpu=G5 -mtune=G5 - 
>> mpowerpc-gpopt -force_cpusubtype_ALL -c rwrapper.cpp -o rwrapper.o
>> g++ -bundle -flat_namespace -undefined suppress -m64 -L/usr/local/ 
>> lib -L/usr/local/lib64/R/lib -o affyplier.so affyplier.o  
>> plieralg.o plier_impl.o rwrapper.o   -L/usr/local/lib64/R/lib -lR
>> ld64 warning: indirect library libgfortran.0.dylib could not be  
>> loaded: file not found: libgfortran.0.dylib
>> ld64 warning: indirect library libgcc_s.1.0.dylib could not be  
>> loaded: file not found: libgcc_s.1.0.dylib
>> ld64 warning: indirect library libreadline.5.dylib could not be  
>> loaded: file not found: libreadline.5.dylib
>
> Yes, that is already better :). However, those should be just  
> warnings, not errors - does affyplier.so exist? Once R is started,  
> the DYLIB_LIBRARY_PATH is set and dyld should find the libraries.
>
> If not, then it really depends on your compilers - check libR.dylib  
> and the others in /usr/local/lib64/R/lib with otool64 -L to see  
> where they are actually expected. If in doubt, send me the output of
> otool64 -L /usr/local/lib64/R/lib/*
> and
> otool64 -L /usr/local/lib/libg*
>
> Cheers,
> Simon
>



More information about the R-SIG-Mac mailing list