Hi, I am having trouble getting RMySQL running on a solaris machine. [43] bedrock:/home/jayoung/source_codes/R/other_packages> uname -a SunOS bedrock 5.10 Generic_118833-36 sun4v sparc SUNW,Sun-Fire-T200
I thought I had finally managed to get it installed, albeit with some warnings that I didn't understand (it took me a while to find where our mysql libraries were), but when I tried to load it within R I got an error: > library(RMySQL) Error in dyn.load(file, ...) : unable to load shared library '/home/btrask/traskdata/lib/R/ library/RMySQL/libs/RMySQL.so': ld.so.1: R: fatal: relocation error: file /home/btrask/traskdata/ lib/R/library/RMySQL/libs/RMySQL.so: symbol mysql_more_results: referenced symbol not found Error: package/namespace load failed for 'RMySQL' I'm not a sysadmin and don't know any C, so I don't really understand this error, but I'm wondering whether we might have an older, incompatible version of mysql? [42] bedrock:/home/jayoung/source_codes/R/other_packages> mysql -V mysql Ver 12.22 Distrib 4.0.24, for sun-solaris2.10 (sparc) Or am I somehow failing to specify some of the necessary libraries in LD_LIBRARY_PATH or some other thing R is using to look for libraries? I've pasted the command I used for installation, and the output of the build process below, as well as the output of sessionInfo. Thanks in advance for any help, Janet Young ------------------------------------------------------------------- Dr. Janet Young (Trask lab) Fred Hutchinson Cancer Research Center 1100 Fairview Avenue N., C3-168, P.O. Box 19024, Seattle, WA 98109-1024, USA. tel: (206) 667 1471 fax: (206) 667 6524 email: [EMAIL PROTECTED] http://www.fhcrc.org/labs/trask/ ------------------------------------------------------------------- [13] bedrock:/home/jayoung/source_codes/R/other_packages> R CMD INSTALL --configure-args='--with-mysql-inc=/usr/sfw/include/mysql -- with-mysql-lib=/usr/sfw/lib' RMySQL_0.6-0.tar.gz * Installing to library '/home/btrask/traskdata/lib/R/library' * Installing *source* package 'RMySQL' ... checking for gcc... gcc checking for C compiler default output file name... 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 how to run the C preprocessor... gcc -E checking for compress in -lz... yes checking for getopt_long in -lc... yes checking for mysql_init in -lmysqlclient... no checking for egrep... egrep checking for ANSI C header files... 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 mysql.h usability... no checking mysql.h presence... no checking for mysql.h... no configure: creating ./config.status config.status: creating src/Makevars ** libs cc -I/home/btrask/traskdata/lib/R/include -I/home/btrask/traskdata/ lib/R/include -I/usr/sfw/include/mysql -I/usr/local/include -KPIC -g -c RS-DBI.c -o RS-DBI.o "RS-DBI.c", line 1177: warning: assignment type mismatch: pointer to char "=" pointer to const char "RS-DBI.c", line 1190: warning: implicit function declaration: isalpha "RS-DBI.c", line 1228: warning: assignment type mismatch: pointer to char "=" pointer to const char cc -I/home/btrask/traskdata/lib/R/include -I/home/btrask/traskdata/ lib/R/include -I/usr/sfw/include/mysql -I/usr/local/include -KPIC -g -c RS-MySQL.c -o RS-MySQL.o "RS-MySQL.c", line 134: warning: implicit function declaration: mysql_more_results "RS-MySQL.c", line 161: warning: implicit function declaration: mysql_next_result "RS-MySQL.c", line 387: warning: assignment type mismatch: pointer to char "=" pointer to const char "RS-MySQL.c", line 389: warning: assignment type mismatch: pointer to char "=" pointer to const char "RS-MySQL.c", line 391: warning: assignment type mismatch: pointer to char "=" pointer to const char "RS-MySQL.c", line 393: warning: assignment type mismatch: pointer to char "=" pointer to const char "RS-MySQL.c", line 395: warning: assignment type mismatch: pointer to char "=" pointer to const char cc -G -L/usr/local/lib -o RMySQL.so RS-DBI.o RS-MySQL.o -L/usr/sfw/ lib -lmysqlclient -lz -L/home/btrask/traskdata/lib/R/lib -lR ** R ** inst ** preparing package for lazy loading Loading required package: DBI Creating a new generic function for "format" in "RMySQL" Creating a new generic function for "print" in "RMySQL" ** help >>> Building/Updating help pages for package 'RMySQL' Formats: text html latex example MySQL text html latex example MySQLConnection-class text html latex example MySQLDriver-class text html latex example MySQLObject-class text html latex example MySQLResult-class text html latex example RMySQL-package text html latex example S4R text html latex example dbApply-methods text html latex example dbApply text html latex example dbBuildTableDefinition text html latex dbCallProc-methods text html latex dbCommit-methods text html latex example dbConnect-methods text html latex example Note: unmatched right brace in 'dbDataType-methods' on or after line 24 dbDataType-methods text html latex example dbDriver-methods text html latex example dbEscapeStrings-methods text html latex example dbEscapeStrings text html latex example dbGetInfo-methods text html latex example dbListTables-methods text html latex example dbNextResult-methods text html latex example dbNextResult text html latex example dbObjectId-class text html latex example dbReadTable-methods text html latex example dbSendQuery-methods text html latex example dbSetDataMappings-methods text html latex example fetch-methods text html latex example isIdCurrent text html latex example make.db.names-methods text html latex example mysqlDBApply text html latex example mysqlSupport text html latex safe.write text html latex example summary-methods text html latex ** building package indices ... * DONE (RMySQL) [1] bedrock:/home/jayoung> R R version 2.6.1 Patched (2007-12-02 r43572) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(DBI) > library(RMySQL) Error in dyn.load(file, ...) : unable to load shared library '/home/btrask/traskdata/lib/R/ library/RMySQL/libs/RMySQL.so': ld.so.1: R: fatal: relocation error: file /home/btrask/traskdata/ lib/R/library/RMySQL/libs/RMySQL.so: symbol mysql_more_results: referenced symbol not found Error: package/namespace load failed for 'RMySQL' > sessionInfo() R version 2.6.1 Patched (2007-12-02 r43572) sparc-sun-solaris2.10 locale: /en_US.ISO8859-15/C/C/en_US.ISO8859-15/en_US.ISO8859-15/C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] DBI_0.2-4 > q() Save workspace image? [y/n/c]: n [2] bedrock:/home/jayoung> printenv LD_LIBRARY_PATH /opt/SUNWspro/lib:/usr/lib:/opt/SUNWspro/lib:/usr/openwin/lib:/usr/ lib:/usr/local/lib:/opt/hpnpl/lib:/opt/sfw/lib:/usr/local/emacs/lib:/ usr/local/ImageMagick:/home/btrask/traskdata/lib/R/library/RSPerl/ libs:/home/btrask/traskdata/lib/R/lib:/usr/sfw/lib:/opt/local/apps/ gdbm-1.7.3/lib:/home/jayoung/traskdata/lib/R/bin:/home/jayoung/ traskdata/lib/R/lib:/home/jayoung/traskdata/lib/RSPerl/libs:/home/ jayoung/traskdata/lib/RSPerl:/home/jayoung/traskdata/lib/RSPerl/scripts ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.