On Sep 3, 2014, at 12:28 PM, Xiao He <[email protected]> wrote:
> Dear Simon, > > Thanks for the quick reply. I tried to do what you suggested: > > install_name_tool -id > /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libquadmath.0.dylib > /usr/local/lib/libquadmath.0.dylib > > But I got the following error messages: > > error: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: > can't open input file: /usr/local/lib/libquadmath.0.dylib for writing > (Permission denied) > error: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: > can't lseek to offset: 0 in file: /usr/local/lib/libquadmath.0.dylib for > writing (Bad file descriptor) > error: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: > can't write new headers in file: /usr/local/lib/libquadmath.0.dylib (Bad > file descriptor) > error: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: > can't close written on input file: /usr/local/lib/libquadmath.0.dylib (Bad > file descriptor) > > > The first error (Permission denied) can be solved by using "sudo" I suppose. > But I am not sure what caused the other three errors. Do you happen know what > may have been the root of the errors? Thank you again. > sudo should solve them all - the FD is invalid because it could not be opened in the first place. Note that if you can't sudo, you can also use install_name_tool -change on the package .so to change the path there instead. But the above would be a more permanent solution. Cheers, Simon > Best, > -Xiao > > > > > > On Wed, Sep 3, 2014 at 3:20 PM, Simon Urbanek <[email protected]> > wrote: > On Sep 3, 2014, at 4:18 AM, Xiao He <[email protected]> wrote: > > > Hi all, > > > > I tried to load a package which includes a shared object on one of my Macs, > > and I got an error message below, which suggests that the file " > > libquadmath.0.dylib" is missing in the /usr/local/lib folder. On my other > > Mac however, I have no problem loading the package, and the file " > > libquadmath.0.dylib" is in the /usr/local/lib folder. I wonder where this > > libquadmath.0.dylib file is from, and how I can install it on the computer > > where it is missing. Thanks! > > > > libquadmath is part of the Fortran compiler, it is not a standard library, so > it will be only present if you install the compiler. > > Note that the Mavericks build of R on CRAN also ships with the quadmath > library and Mavericks CRAN package binaries use it from there. If you compile > a package yourself and want others to be able to use it, you may want to > change the path from /usr/local/lib/libquadmath.0.dylib to > /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libquadmath.0.dylib > via install_name_tool --- the same goes for libgfortran.3.dylib. > > Cheers, > Simon > > > > > library(WRScpp) > > Error in dyn.load(file, DLLpath = DLLpath, ...) : > > unable to load shared object > > '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/WRScpp/libs/WRScpp.so': > > > > dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/WRScpp/libs/WRScpp.so, > > 6): Library not loaded: /usr/local/lib/libquadmath.0.dylib > > Referenced from: > > /Library/Frameworks/R.framework/Versions/3.1/Resources/library/WRScpp/libs/WRScpp.so > > Reason: image not found > > Error: package or namespace load failed for ‘WRScpp’ > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > R-SIG-Mac mailing list > > [email protected] > > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > > _______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
