[R] RMySQL with Xampp could never work?
Paolo D'Onorio De Meo
donorio at caspur.it
Thu Dec 13 17:50:36 CET 2007
Hello everybody, i had a big issue with RMySQL,
working on an installation of R on multiple nodes via net file-system.
The point is that we installed Xampp as suite for mysql, perl, apache
and php on every node, and we need to use R scripts with mysql.
Xampp doesn't compile anything, it gives you pre-compiled binaries all
linked together, you just extract from a tarball.
At my first try, RMySQL could not find where mysql stuff was.
There are a few mentions of this problem in google, so i defined the
LDFLAGS and CPPFLAGS environment variable, and then set the PKG_CPPFLAGS
and PKG_LIBS environment variables as well.
After this the installation with the "R CMD INSTALL" went fine, but then
trying to load the library:
unable to load shared library:
RMySQL.so: undefined symbol: mysql_field_count
The command "ldd RMySQL.so" showed that the shared object was not
pointing to libmysqlclient.so in the Xampp directory.
I tried to modify /etc/ld.so.conf adding Xampp directory, running again
ldconfig, still same problem.
The only way to have it work was installing on one node the RPM of the
shared library for Mysql 4.1.
On that machine i installed RMySQL and finally RMySQL.so was pointing to
libmysqlclient.so.14, and loading the library was successful.
But the funny thing is that now that RMySQL.so works fine on the other
nodes, without requiring the rpm installation,
i just need to specify the xampp mysql socket address (different from
the standard /var/mysql) when i use dbConnect.
Is this RMySQL going to work one day on Xampp?
Does anybody know the reason why you cannot specify to RMySQL where
libmysqlclient should be?
More information about the R-help