[R-SIG-Mac] Compiling gsl package for x86_64 build on Mac Pro using MacOS 10.5.3

Michael Braun braunm at MIT.EDU
Thu Jun 5 16:39:32 CEST 2008


Hello, again, list:

At long last, I have been able to compile from source a working 64-bit  
implementation of R 2.7.0 on my Intel Mac Pro x86_64, running MacOS  
10.5.3.  I am now trying to install the gsl package (again, compiling  
from source).  I sent this issue to Robin Hankin, the maintainer of  
the gsl package, and he referred me to this list.  So, I hope this  
message isn't too off-topic.

I have no problem installing, compiling, loading and using the R gsl  
package on my 32-bit build on the same machine.  And, the package  
downloads and compiles fine on my x86_64 build, when I use  
install.packages ("gsl",type="source").  But, when I try to load the  
library, I get the following:

 > library(gsl)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared library '/Library/Frameworks/R.framework/ 
Resources/library/gsl/libs/x86_64/gsl.so':
  dlopen(/Library/Frameworks/R.framework/Resources/library/gsl/libs/ 
x86_64/gsl.so, 6): Symbol not found:  
_gsl_multimin_fdfminimizer_conjugate_fr
  Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
gsl/libs/x86_64/gsl.so
  Expected in: dynamic lookup

Error: package/namespace load failed for 'gsl'

If it is helpful, I pasted the entire output of the configure and  
compilation stage at the bottom of this email.

Also, I do have a full working implementation of gsl 1.11, on my  
system.  Could there be a conflict (there wasn't for the 32 bit  
build)?  I see that there is a warning near the bottom of the  
compilation output (below), but I don't understand why the package  
would want to link to a non-package gsl version.

I'd appreciate any help you can provide.

Thanks,

Michael



Michael Braun
Assistant Professor of Management Science (Marketing Group)
MIT Sloan School of Management
One Amherst St., E40-169
Cambridge, MA 02142
braunm at mit.edu
617-253-3436



 > install.packages("gsl",repos="http://stat.cmu.edu/R/ 
CRAN",type="source")
trying URL 'http://stat.cmu.edu/R/CRAN/src/contrib/gsl_1.8-8.tar.gz'
Content type 'application/x-gzip' length 59084 bytes (57 Kb)
opened URL
==================================================
downloaded 57 Kb

* Installing *source* package 'gsl' ...
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for gsl_sf_airy_Ai_e in -lgsl... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gsl/gsl_version.h usability... yes
checking gsl/gsl_version.h presence... yes
checking for gsl/gsl_version.h... yes
checking if GSL version >= 1.8... yes
configure: creating ./config.status
** libs
** arch - x86_64
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c airy.c -o airy.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c bessel.c -o bessel.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c clausen.c -o clausen.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c coulomb.c -o coulomb.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c coupling.c -o  
coupling.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c dawson.c -o dawson.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c debye.c -o debye.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c dilog.c -o dilog.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c ellint.c -o ellint.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c elljac.c -o elljac.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c error.c -o error.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c expint.c -o expint.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c fermi_dirac.c -o  
fermi_dirac.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c gamma.c -o gamma.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c gegenbauer.c -o  
gegenbauer.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c hyperg.c -o hyperg.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c laguerre.c -o  
laguerre.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c lambert.c -o lambert.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c legendre.c -o  
legendre.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c log.c -o log.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c multimin.c -o  
multimin.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c poly.c -o poly.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c pow_int.c -o pow_int.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c psi.c -o psi.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c qrng.c -o qrng.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c rng.c -o rng.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c synchrotron.c -o  
synchrotron.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c transport.c -o  
transport.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c trig.c -o trig.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c vector.c -o vector.o
gcc -arch x86_64 -std=gnu99 -g -p -I/Library/Frameworks/R.framework/ 
Resources/include -I/Library/Frameworks/R.framework/Resources/include/ 
x86_64  -I/usr/local/include    -fPIC  -g -O2 -c zeta.c -o zeta.o
gcc -arch x86_64 -std=gnu99 -g -p -dynamiclib -Wl,- 
headerpad_max_install_names  -undefined dynamic_lookup -single_module - 
multiply_defined suppress -L/usr/local/lib -o gsl.so airy.o bessel.o  
clausen.o coulomb.o coupling.o dawson.o debye.o dilog.o ellint.o  
elljac.o error.o expint.o fermi_dirac.o gamma.o gegenbauer.o hyperg.o  
laguerre.o lambert.o legendre.o log.o multimin.o poly.o pow_int.o  
psi.o qrng.o rng.o synchrotron.o transport.o trig.o vector.o zeta.o - 
lgsl -lgslcblas  -F/Library/Frameworks/R.framework/.. -framework R - 
Wl,-framework -Wl,CoreFoundation
ld: warning in /usr/local/lib/libgsl.dylib, file is not of required  
architecture
ld: warning in /usr/local/lib/libgslcblas.dylib, file is not of  
required architecture
** R
** inst
** preparing package for lazy loading
** help
 >>> Building/Updating help pages for package 'gsl'


< output snipped >

The downloaded packages are in
	/private/var/folders/6g/6gqJUHG-FsGAUUywFq+B3U++q3w/-Tmp-/RtmpzVqC9W/ 
downloaded_packages
Updating HTML index of packages in '.Library'
 > library(gsl)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared library '/Library/Frameworks/R.framework/ 
Resources/library/gsl/libs/x86_64/gsl.so':
  dlopen(/Library/Frameworks/R.framework/Resources/library/gsl/libs/ 
x86_64/gsl.so, 6): Symbol not found:  
_gsl_multimin_fdfminimizer_conjugate_fr
  Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
gsl/libs/x86_64/gsl.so
  Expected in: dynamic lookup

Error: package/namespace load failed for 'gsl'



More information about the R-SIG-Mac mailing list