[R] RMySQL : Not loading

Geoff Grimwood geoff.grimwood at paradise.net.nz
Wed Jan 14 12:33:32 CET 2004


Hello,

I'm tearing my hair out over this. Any help will be very much 
appreciated. It's been two long nights battling with RMySQL.

 > library(RMySQL)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
         unable to load shared library 
"/usr/local/lib/R/library/RMySQL/libs/RMySQL.so":
   dlcompat: dyld: /usr/local/lib/R/bin/R.bin Undefined symbols:
_getopt_long
Error in library(RMySQL) : .First.lib failed

I am running Mac OS 10.2.8, R 1.8.1, RMySQL 0.5-3, MySQL 4.0.17. R and 
MySQL are well otherwise

I have moved away from the Fink sourced (ie /sw) version of R and MySQL 
to regular /usr/local types. Mainly because the Fink R is 1.7 and can't 
do the MySQL business. And I was wondering if the RMySQL install was 
comin to grief because it couldn't find the /sw mysql files.

Anyway, RMySQL seems to have install OK. I see it with 
installed.packages(). There was the apparent inability to find 
lmysqlclient and mysql.h but that seems to be a red herring (see below).

Regards

Geoff Grimwood
Wellington
New Zealand


[SIDLAW02:~/Desktop] geoff% sudo R CMD INSTALL 
--configure-args='--with-mysql-inc=/usr/local/mysql/include 
--with-mysql-lib=/usr/local/mysql/lib' RMySQL_0.5-3.tar.gz
* Installing *source* package 'RMySQL' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for mysql_init in -lmysqlclient... no
checking for mysql.h... no
updating cache ./config.cache
creating ./config.status
creating src/Makevars
** libs
gcc -no-cpp-precomp -I/usr/local/lib/R/include 
-I/usr/local/mysql/include -I/sw/include   -fno-common  -g -O2 -c 
RS-DBI.c -o RS-DBI.o
gcc -no-cpp-precomp -I/usr/local/lib/R/include 
-I/usr/local/mysql/include -I/sw/include   -fno-common  -g -O2 -c 
RS-MySQL.c -o RS-MySQL.o
gcc -bundle -flat_namespace -undefined suppress -L/sw/lib 
-L/usr/local/lib -o RMySQL.so RS-DBI.o RS-MySQL.o 
-L/usr/local/mysql/lib -lmysqlclient -lz -lcc_dynamic 
-L/usr/local/lib/R/bin -lR
[SNIP]

SIDLAW02:library/RMySQL/libs] geoff% ls -ltr
total 500
-rwxr-xr-x    1 root     staff      254816 Jan 14 23:45 RMySQL.so
-rwxr-xr-x    1 root     staff      249856 Jan 14 23:46 libmySQL.dll
-rw-r--r--    1 root     staff         155 Jan 14 23:46 
libMySQL_4.0.16.txt




More information about the R-help mailing list