Dan Bolser
2009-Jan-30 11:58 UTC
[R] Problem installing RMySQL ("S4R.h:40:17: error: S.h: No such file or directory"?)
Hi,
I'm trying to install RMySQL and I keep hitting errors. My computer is:
uname -a
Linux cricket 2.6.18-92.1.22.el5PAE #1 SMP Tue Dec 16 12:36:25 EST 2008 i686
i686 i386 GNU/Linux
I have set the following environment settings:
export PKG_LIBS="-L/usr/lib/mysql -lmysqlclient"
export PKG_CPPFLAGS="-I/usr/include/mysql"
I run the following command:
R CMD INSTALL --library "$HOME/R/i386-redhat-linux-gnu-library/2.7"
RMySQL_0.7-2.tar.gz
And I get the output below.
Can anyone help me with this? What additional system details can I send?
Thanks very much for any tips.
Dan.
R CMD INSTALL --library "$HOME/R/i386-redhat-linux-gnu-library/2.7"
RMySQL_0.7-2.tar.gz
* 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... grep -E
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
gcc -m32 -std=gnu99 -I/usr/include/R -I/usr/include/mysql
-I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386
-mtune=generic -fasynchronous-unwind-tables -c RS-DBI.c -o RS-DBI.o
In file included from RS-DBI.h:32,
from RS-DBI.c:22:
S4R.h:40:17: error: S.h: No such file or directory
S4R.h:53:24: error: Rversion.h: No such file or directory
S4R.h:54:51: error: missing binary operator before token "("
S4R.h:62:26: error: Rdefines.h: No such file or directory
S4R.h:154:49: error: missing binary operator before token "("
S4R.h:176:49: error: missing binary operator before token "("
In file included from RS-DBI.c:22:
RS-DBI.h:100: error: expected specifier-qualifier-list before 'SEXPTYPE'
RS-DBI.h:170: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:173: error: expected ')' before '*' token
RS-DBI.h:174: error: expected ')' before '*' token
RS-DBI.h:175: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:176: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:179: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:181: error: expected ')' before '*' token
RS-DBI.h:182: error: expected ')' before '*' token
RS-DBI.h:183: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:184: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:187: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:188: error: expected ')' before '*' token
RS-DBI.h:189: error: expected ')' before '*' token
RS-DBI.h:190: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:191: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:194: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:195: error: expected ')' before '*' token
RS-DBI.h:213: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:220: error: expected ')' before '*' token
RS-DBI.h:224: error: expected ')' before '*' token
RS-DBI.h:231: error: expected ')' before '*' token
RS-DBI.h:251: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:253: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:257: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.h:259: error: expected declaration specifiers or '...' before
'SEXPTYPE'
RS-DBI.h:260: error: expected declaration specifiers or '...' before
'SEXPTYPE'
RS-DBI.c:36: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:109: error: expected ')' before '*' token
RS-DBI.c:137: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:207: error: expected ')' before '*' token
RS-DBI.c:261: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:309: error: expected ')' before '*' token
RS-DBI.c: In function 'RS_DBI_allocFields':
RS-DBI.c:350: warning: implicit declaration of function 'malloc'
RS-DBI.c:350: warning: incompatible implicit declaration of built-in
function 'malloc'
RS-DBI.c:357: warning: implicit declaration of function 'calloc'
RS-DBI.c:357: warning: incompatible implicit declaration of built-in
function 'calloc'
RS-DBI.c:364: error: 'RS_DBI_fields' has no member named
'Sclass'
RS-DBI.c:364: error: 'SEXPTYPE' undeclared (first use in this function)
RS-DBI.c:364: error: (Each undeclared identifier is reported only once
RS-DBI.c:364: error: for each function it appears in.)
RS-DBI.c:364: error: expected expression before ')' token
RS-DBI.c: In function 'RS_DBI_freeFields':
RS-DBI.c:375: warning: implicit declaration of function 'free'
RS-DBI.c:384: error: 'RS_DBI_fields' has no member named
'Sclass'
RS-DBI.c:384: error: 'RS_DBI_fields' has no member named
'Sclass'
RS-DBI.c: At top level:
RS-DBI.c:395: error: expected ')' before '*' token
RS-DBI.c:448: error: expected ')' before '*' token
RS-DBI.c:526: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:551: error: expected ')' before '*' token
RS-DBI.c: In function 'RS_DBI_errorMessage':
RS-DBI.c:586: error: 'PROBLEM' undeclared (first use in this function)
RS-DBI.c:586: error: expected ';' before string constant
RS-DBI.c:589: error: expected ';' before string constant
RS-DBI.c:592: error: expected ';' before string constant
RS-DBI.c:595: error: expected ';' before string constant
RS-DBI.c:582: warning: unused variable 'driver'
RS-DBI.c: In function 'RS_DBI_copyString':
RS-DBI.c:607: warning: incompatible implicit declaration of built-in
function 'malloc'
RS-DBI.c:607: warning: implicit declaration of function 'strlen'
RS-DBI.c:607: warning: incompatible implicit declaration of built-in
function 'strlen'
RS-DBI.c:612: warning: implicit declaration of function 'strcpy'
RS-DBI.c:612: warning: incompatible implicit declaration of built-in
function 'strcpy'
RS-DBI.c: In function 'RS_DBI_nCopyString':
RS-DBI.c:621: warning: incompatible implicit declaration of built-in
function 'malloc'
RS-DBI.c:624: warning: implicit declaration of function 'sprintf'
RS-DBI.c:624: warning: incompatible implicit declaration of built-in
function 'sprintf'
RS-DBI.c:634: warning: implicit declaration of function 'strncpy'
RS-DBI.c:634: warning: incompatible implicit declaration of built-in
function 'strncpy'
RS-DBI.c: At top level:
RS-DBI.c:649: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:691: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:736: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:768: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:779: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:791: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:805: error: expected ')' before '*' token
RS-DBI.c:820: error: expected ')' before '*' token
RS-DBI.c:839: error: expected ')' before '*' token
RS-DBI.c:914: error: expected ')' before '*' token
RS-DBI.c:964: error: expected '=', ',', ';',
'asm' or '__attribute__' before
'*' token
RS-DBI.c:1010: error: expected '=', ',', ';',
'asm' or '__attribute__'
before '*' token
RS-DBI.c:1055: error: expected '=', ',', ';',
'asm' or '__attribute__'
before '*' token
RS-DBI.c:1094: error: expected '=', ',', ';',
'asm' or '__attribute__'
before '*' token
RS-DBI.c: In function 'RS_DBI_getTypeName':
RS-DBI.c:1148: warning: incompatible implicit declaration of built-in
function 'sprintf'
RS-DBI.c: At top level:
RS-DBI.c:1170: error: expected '=', ',', ';',
'asm' or '__attribute__'
before '*' token
RS-DBI.c:1213: error: expected declaration specifiers or '...' before
'SEXPTYPE'
RS-DBI.c: In function 'RS_na_set':
RS-DBI.c:1218: error: 'type' undeclared (first use in this function)
RS-DBI.c:1219: error: 'INTSXP' undeclared (first use in this function)
RS-DBI.c:1221: error: 'NA_INTEGER' undeclared (first use in this
function)
RS-DBI.c:1223: error: 'LGLSXP' undeclared (first use in this function)
RS-DBI.c:1225: error: 'NA_LOGICAL' undeclared (first use in this
function)
RS-DBI.c:1227: error: 'REALSXP' undeclared (first use in this function)
RS-DBI.c:1229: error: 'NA_REAL' undeclared (first use in this function)
RS-DBI.c:1231: error: 'STRSXP' undeclared (first use in this function)
RS-DBI.c:1233: warning: implicit declaration of function 'CHAR'
RS-DBI.c:1233: warning: implicit declaration of function
'CHARACTER_POINTER'
RS-DBI.c:1233: error: 'NA_STRING' undeclared (first use in this
function)
RS-DBI.c:1233: error: subscripted value is neither array nor pointer
RS-DBI.c: At top level:
RS-DBI.c:1238: error: expected declaration specifiers or '...' before
'SEXPTYPE'
RS-DBI.c: In function 'RS_is_na':
RS-DBI.c:1244: error: 'type' undeclared (first use in this function)
RS-DBI.c:1245: error: 'INTSXP' undeclared (first use in this function)
RS-DBI.c:1246: error: 'LGLSXP' undeclared (first use in this function)
RS-DBI.c:1248: error: 'NA_INTEGER' undeclared (first use in this
function)
RS-DBI.c:1250: error: 'REALSXP' undeclared (first use in this function)
RS-DBI.c:1252: warning: implicit declaration of function 'ISNA'
RS-DBI.c:1254: error: 'STRSXP' undeclared (first use in this function)
RS-DBI.c:1256: warning: implicit declaration of function 'strcmp'
RS-DBI.c:1256: error: 'NA_STRING' undeclared (first use in this
function)
RS-DBI.c:1256: error: subscripted value is neither array nor pointer
RS-DBI.c: At top level:
RS-DBI.c:1265: error: 'NILSXP' undeclared here (not in a function)
RS-DBI.c:1266: error: 'SYMSXP' undeclared here (not in a function)
RS-DBI.c:1267: error: 'LISTSXP' undeclared here (not in a function)
RS-DBI.c:1268: error: 'CLOSXP' undeclared here (not in a function)
RS-DBI.c:1269: error: 'ENVSXP' undeclared here (not in a function)
RS-DBI.c:1270: error: 'PROMSXP' undeclared here (not in a function)
RS-DBI.c:1271: error: 'LANGSXP' undeclared here (not in a function)
RS-DBI.c:1272: error: 'SPECIALSXP' undeclared here (not in a function)
RS-DBI.c:1273: error: 'BUILTINSXP' undeclared here (not in a function)
RS-DBI.c:1274: error: 'CHARSXP' undeclared here (not in a function)
RS-DBI.c:1275: error: 'LGLSXP' undeclared here (not in a function)
RS-DBI.c:1276: error: 'INTSXP' undeclared here (not in a function)
RS-DBI.c:1277: error: 'REALSXP' undeclared here (not in a function)
RS-DBI.c:1278: error: 'CPLXSXP' undeclared here (not in a function)
RS-DBI.c:1279: error: 'STRSXP' undeclared here (not in a function)
RS-DBI.c:1280: error: 'DOTSXP' undeclared here (not in a function)
RS-DBI.c:1281: error: 'ANYSXP' undeclared here (not in a function)
RS-DBI.c:1282: error: 'EXPRSXP' undeclared here (not in a function)
RS-DBI.c:1283: error: 'VECSXP' undeclared here (not in a function)
RS-DBI.c:1284: error: 'RAWSXP' undeclared here (not in a function)
make: *** [RS-DBI.o] Error 1
chmod: cannot access
`/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2.7/RMySQL/libs/*':
No such file or directory
ERROR: compilation failed for package 'RMySQL'
** Removing
'/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2.7/RMySQL'
[[alternative HTML version deleted]]
Jeffrey Horner
2009-Jan-30 13:10 UTC
[R] Problem installing RMySQL ("S4R.h:40:17: error: S.h: No such file or directory"?)
Dan Bolser wrote:> Hi, > > I'm trying to install RMySQL and I keep hitting errors. My computer is: > > uname -a > Linux cricket 2.6.18-92.1.22.el5PAE #1 SMP Tue Dec 16 12:36:25 EST 2008 i686 > i686 i386 GNU/Linux > > > I have set the following environment settings: > > export PKG_LIBS="-L/usr/lib/mysql -lmysqlclient" > export PKG_CPPFLAGS="-I/usr/include/mysql" > > > I run the following command: > > R CMD INSTALL --library "$HOME/R/i386-redhat-linux-gnu-library/2.7" > RMySQL_0.7-2.tar.gzHi Dan, You will certainly want to upgrade R first. The latest version is R 2.8.1. Jeff> > > And I get the output below. > > Can anyone help me with this? What additional system details can I send? > > > Thanks very much for any tips. > > Dan. > > > R CMD INSTALL --library "$HOME/R/i386-redhat-linux-gnu-library/2.7" > RMySQL_0.7-2.tar.gz > * 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... grep -E > 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 > gcc -m32 -std=gnu99 -I/usr/include/R -I/usr/include/mysql > -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 > -mtune=generic -fasynchronous-unwind-tables -c RS-DBI.c -o RS-DBI.o > In file included from RS-DBI.h:32, > from RS-DBI.c:22: > S4R.h:40:17: error: S.h: No such file or directory > S4R.h:53:24: error: Rversion.h: No such file or directory > S4R.h:54:51: error: missing binary operator before token "(" > S4R.h:62:26: error: Rdefines.h: No such file or directory > S4R.h:154:49: error: missing binary operator before token "(" > S4R.h:176:49: error: missing binary operator before token "(" > In file included from RS-DBI.c:22: > RS-DBI.h:100: error: expected specifier-qualifier-list before 'SEXPTYPE' > RS-DBI.h:170: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:173: error: expected ')' before '*' token > RS-DBI.h:174: error: expected ')' before '*' token > RS-DBI.h:175: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:176: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:179: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:181: error: expected ')' before '*' token > RS-DBI.h:182: error: expected ')' before '*' token > RS-DBI.h:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:184: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:187: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:188: error: expected ')' before '*' token > RS-DBI.h:189: error: expected ')' before '*' token > RS-DBI.h:190: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:191: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:194: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:195: error: expected ')' before '*' token > RS-DBI.h:213: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:220: error: expected ')' before '*' token > RS-DBI.h:224: error: expected ')' before '*' token > RS-DBI.h:231: error: expected ')' before '*' token > RS-DBI.h:251: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:253: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:257: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:259: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.h:260: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.c:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:109: error: expected ')' before '*' token > RS-DBI.c:137: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:207: error: expected ')' before '*' token > RS-DBI.c:261: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:309: error: expected ')' before '*' token > RS-DBI.c: In function 'RS_DBI_allocFields': > RS-DBI.c:350: warning: implicit declaration of function 'malloc' > RS-DBI.c:350: warning: incompatible implicit declaration of built-in > function 'malloc' > RS-DBI.c:357: warning: implicit declaration of function 'calloc' > RS-DBI.c:357: warning: incompatible implicit declaration of built-in > function 'calloc' > RS-DBI.c:364: error: 'RS_DBI_fields' has no member named 'Sclass' > RS-DBI.c:364: error: 'SEXPTYPE' undeclared (first use in this function) > RS-DBI.c:364: error: (Each undeclared identifier is reported only once > RS-DBI.c:364: error: for each function it appears in.) > RS-DBI.c:364: error: expected expression before ')' token > RS-DBI.c: In function 'RS_DBI_freeFields': > RS-DBI.c:375: warning: implicit declaration of function 'free' > RS-DBI.c:384: error: 'RS_DBI_fields' has no member named 'Sclass' > RS-DBI.c:384: error: 'RS_DBI_fields' has no member named 'Sclass' > RS-DBI.c: At top level: > RS-DBI.c:395: error: expected ')' before '*' token > RS-DBI.c:448: error: expected ')' before '*' token > RS-DBI.c:526: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:551: error: expected ')' before '*' token > RS-DBI.c: In function 'RS_DBI_errorMessage': > RS-DBI.c:586: error: 'PROBLEM' undeclared (first use in this function) > RS-DBI.c:586: error: expected ';' before string constant > RS-DBI.c:589: error: expected ';' before string constant > RS-DBI.c:592: error: expected ';' before string constant > RS-DBI.c:595: error: expected ';' before string constant > RS-DBI.c:582: warning: unused variable 'driver' > RS-DBI.c: In function 'RS_DBI_copyString': > RS-DBI.c:607: warning: incompatible implicit declaration of built-in > function 'malloc' > RS-DBI.c:607: warning: implicit declaration of function 'strlen' > RS-DBI.c:607: warning: incompatible implicit declaration of built-in > function 'strlen' > RS-DBI.c:612: warning: implicit declaration of function 'strcpy' > RS-DBI.c:612: warning: incompatible implicit declaration of built-in > function 'strcpy' > RS-DBI.c: In function 'RS_DBI_nCopyString': > RS-DBI.c:621: warning: incompatible implicit declaration of built-in > function 'malloc' > RS-DBI.c:624: warning: implicit declaration of function 'sprintf' > RS-DBI.c:624: warning: incompatible implicit declaration of built-in > function 'sprintf' > RS-DBI.c:634: warning: implicit declaration of function 'strncpy' > RS-DBI.c:634: warning: incompatible implicit declaration of built-in > function 'strncpy' > RS-DBI.c: At top level: > RS-DBI.c:649: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:691: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:736: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:768: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:779: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:791: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:805: error: expected ')' before '*' token > RS-DBI.c:820: error: expected ')' before '*' token > RS-DBI.c:839: error: expected ')' before '*' token > RS-DBI.c:914: error: expected ')' before '*' token > RS-DBI.c:964: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:1010: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c:1055: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c:1094: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c: In function 'RS_DBI_getTypeName': > RS-DBI.c:1148: warning: incompatible implicit declaration of built-in > function 'sprintf' > RS-DBI.c: At top level: > RS-DBI.c:1170: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c:1213: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.c: In function 'RS_na_set': > RS-DBI.c:1218: error: 'type' undeclared (first use in this function) > RS-DBI.c:1219: error: 'INTSXP' undeclared (first use in this function) > RS-DBI.c:1221: error: 'NA_INTEGER' undeclared (first use in this function) > RS-DBI.c:1223: error: 'LGLSXP' undeclared (first use in this function) > RS-DBI.c:1225: error: 'NA_LOGICAL' undeclared (first use in this function) > RS-DBI.c:1227: error: 'REALSXP' undeclared (first use in this function) > RS-DBI.c:1229: error: 'NA_REAL' undeclared (first use in this function) > RS-DBI.c:1231: error: 'STRSXP' undeclared (first use in this function) > RS-DBI.c:1233: warning: implicit declaration of function 'CHAR' > RS-DBI.c:1233: warning: implicit declaration of function 'CHARACTER_POINTER' > RS-DBI.c:1233: error: 'NA_STRING' undeclared (first use in this function) > RS-DBI.c:1233: error: subscripted value is neither array nor pointer > RS-DBI.c: At top level: > RS-DBI.c:1238: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.c: In function 'RS_is_na': > RS-DBI.c:1244: error: 'type' undeclared (first use in this function) > RS-DBI.c:1245: error: 'INTSXP' undeclared (first use in this function) > RS-DBI.c:1246: error: 'LGLSXP' undeclared (first use in this function) > RS-DBI.c:1248: error: 'NA_INTEGER' undeclared (first use in this function) > RS-DBI.c:1250: error: 'REALSXP' undeclared (first use in this function) > RS-DBI.c:1252: warning: implicit declaration of function 'ISNA' > RS-DBI.c:1254: error: 'STRSXP' undeclared (first use in this function) > RS-DBI.c:1256: warning: implicit declaration of function 'strcmp' > RS-DBI.c:1256: error: 'NA_STRING' undeclared (first use in this function) > RS-DBI.c:1256: error: subscripted value is neither array nor pointer > RS-DBI.c: At top level: > RS-DBI.c:1265: error: 'NILSXP' undeclared here (not in a function) > RS-DBI.c:1266: error: 'SYMSXP' undeclared here (not in a function) > RS-DBI.c:1267: error: 'LISTSXP' undeclared here (not in a function) > RS-DBI.c:1268: error: 'CLOSXP' undeclared here (not in a function) > RS-DBI.c:1269: error: 'ENVSXP' undeclared here (not in a function) > RS-DBI.c:1270: error: 'PROMSXP' undeclared here (not in a function) > RS-DBI.c:1271: error: 'LANGSXP' undeclared here (not in a function) > RS-DBI.c:1272: error: 'SPECIALSXP' undeclared here (not in a function) > RS-DBI.c:1273: error: 'BUILTINSXP' undeclared here (not in a function) > RS-DBI.c:1274: error: 'CHARSXP' undeclared here (not in a function) > RS-DBI.c:1275: error: 'LGLSXP' undeclared here (not in a function) > RS-DBI.c:1276: error: 'INTSXP' undeclared here (not in a function) > RS-DBI.c:1277: error: 'REALSXP' undeclared here (not in a function) > RS-DBI.c:1278: error: 'CPLXSXP' undeclared here (not in a function) > RS-DBI.c:1279: error: 'STRSXP' undeclared here (not in a function) > RS-DBI.c:1280: error: 'DOTSXP' undeclared here (not in a function) > RS-DBI.c:1281: error: 'ANYSXP' undeclared here (not in a function) > RS-DBI.c:1282: error: 'EXPRSXP' undeclared here (not in a function) > RS-DBI.c:1283: error: 'VECSXP' undeclared here (not in a function) > RS-DBI.c:1284: error: 'RAWSXP' undeclared here (not in a function) > make: *** [RS-DBI.o] Error 1 > chmod: cannot access > `/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2.7/RMySQL/libs/*': > No such file or directory > ERROR: compilation failed for package 'RMySQL' > ** Removing > '/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2.7/RMySQL' > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.-- http://biostat.mc.vanderbilt.edu/JeffreyHorner
Prof Brian Ripley
2009-Jan-30 13:38 UTC
[R] Problem installing RMySQL ("S4R.h:40:17: error: S.h: No such file or directory"?)
Looks like you installed R from an RPM and missed the R-devel RPM. On Fri, 30 Jan 2009, Dan Bolser wrote:> Hi, > > I'm trying to install RMySQL and I keep hitting errors. My computer is: > > uname -a > Linux cricket 2.6.18-92.1.22.el5PAE #1 SMP Tue Dec 16 12:36:25 EST 2008 i686 > i686 i386 GNU/Linux > > > I have set the following environment settings: > > export PKG_LIBS="-L/usr/lib/mysql -lmysqlclient" > export PKG_CPPFLAGS="-I/usr/include/mysql" > > > I run the following command: > > R CMD INSTALL --library "$HOME/R/i386-redhat-linux-gnu-library/2.7" > RMySQL_0.7-2.tar.gz > > > And I get the output below. > > Can anyone help me with this? What additional system details can I send?Well, what your OS is is often helpful, and how you installed R, and of course the 'at a minimum' information asked for in the posting guide.> > Thanks very much for any tips. > > Dan. > > > R CMD INSTALL --library "$HOME/R/i386-redhat-linux-gnu-library/2.7" > RMySQL_0.7-2.tar.gz > * 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... grep -E > 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 > gcc -m32 -std=gnu99 -I/usr/include/R -I/usr/include/mysql > -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 > -mtune=generic -fasynchronous-unwind-tables -c RS-DBI.c -o RS-DBI.o > In file included from RS-DBI.h:32, > from RS-DBI.c:22: > S4R.h:40:17: error: S.h: No such file or directory > S4R.h:53:24: error: Rversion.h: No such file or directory > S4R.h:54:51: error: missing binary operator before token "(" > S4R.h:62:26: error: Rdefines.h: No such file or directory > S4R.h:154:49: error: missing binary operator before token "(" > S4R.h:176:49: error: missing binary operator before token "(" > In file included from RS-DBI.c:22: > RS-DBI.h:100: error: expected specifier-qualifier-list before 'SEXPTYPE' > RS-DBI.h:170: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:173: error: expected ')' before '*' token > RS-DBI.h:174: error: expected ')' before '*' token > RS-DBI.h:175: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:176: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:179: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:181: error: expected ')' before '*' token > RS-DBI.h:182: error: expected ')' before '*' token > RS-DBI.h:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:184: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:187: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:188: error: expected ')' before '*' token > RS-DBI.h:189: error: expected ')' before '*' token > RS-DBI.h:190: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:191: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:194: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:195: error: expected ')' before '*' token > RS-DBI.h:213: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:220: error: expected ')' before '*' token > RS-DBI.h:224: error: expected ')' before '*' token > RS-DBI.h:231: error: expected ')' before '*' token > RS-DBI.h:251: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:253: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:257: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.h:259: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.h:260: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.c:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:109: error: expected ')' before '*' token > RS-DBI.c:137: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:207: error: expected ')' before '*' token > RS-DBI.c:261: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:309: error: expected ')' before '*' token > RS-DBI.c: In function 'RS_DBI_allocFields': > RS-DBI.c:350: warning: implicit declaration of function 'malloc' > RS-DBI.c:350: warning: incompatible implicit declaration of built-in > function 'malloc' > RS-DBI.c:357: warning: implicit declaration of function 'calloc' > RS-DBI.c:357: warning: incompatible implicit declaration of built-in > function 'calloc' > RS-DBI.c:364: error: 'RS_DBI_fields' has no member named 'Sclass' > RS-DBI.c:364: error: 'SEXPTYPE' undeclared (first use in this function) > RS-DBI.c:364: error: (Each undeclared identifier is reported only once > RS-DBI.c:364: error: for each function it appears in.) > RS-DBI.c:364: error: expected expression before ')' token > RS-DBI.c: In function 'RS_DBI_freeFields': > RS-DBI.c:375: warning: implicit declaration of function 'free' > RS-DBI.c:384: error: 'RS_DBI_fields' has no member named 'Sclass' > RS-DBI.c:384: error: 'RS_DBI_fields' has no member named 'Sclass' > RS-DBI.c: At top level: > RS-DBI.c:395: error: expected ')' before '*' token > RS-DBI.c:448: error: expected ')' before '*' token > RS-DBI.c:526: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:551: error: expected ')' before '*' token > RS-DBI.c: In function 'RS_DBI_errorMessage': > RS-DBI.c:586: error: 'PROBLEM' undeclared (first use in this function) > RS-DBI.c:586: error: expected ';' before string constant > RS-DBI.c:589: error: expected ';' before string constant > RS-DBI.c:592: error: expected ';' before string constant > RS-DBI.c:595: error: expected ';' before string constant > RS-DBI.c:582: warning: unused variable 'driver' > RS-DBI.c: In function 'RS_DBI_copyString': > RS-DBI.c:607: warning: incompatible implicit declaration of built-in > function 'malloc' > RS-DBI.c:607: warning: implicit declaration of function 'strlen' > RS-DBI.c:607: warning: incompatible implicit declaration of built-in > function 'strlen' > RS-DBI.c:612: warning: implicit declaration of function 'strcpy' > RS-DBI.c:612: warning: incompatible implicit declaration of built-in > function 'strcpy' > RS-DBI.c: In function 'RS_DBI_nCopyString': > RS-DBI.c:621: warning: incompatible implicit declaration of built-in > function 'malloc' > RS-DBI.c:624: warning: implicit declaration of function 'sprintf' > RS-DBI.c:624: warning: incompatible implicit declaration of built-in > function 'sprintf' > RS-DBI.c:634: warning: implicit declaration of function 'strncpy' > RS-DBI.c:634: warning: incompatible implicit declaration of built-in > function 'strncpy' > RS-DBI.c: At top level: > RS-DBI.c:649: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:691: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:736: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:768: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:779: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:791: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:805: error: expected ')' before '*' token > RS-DBI.c:820: error: expected ')' before '*' token > RS-DBI.c:839: error: expected ')' before '*' token > RS-DBI.c:914: error: expected ')' before '*' token > RS-DBI.c:964: error: expected '=', ',', ';', 'asm' or '__attribute__' before > '*' token > RS-DBI.c:1010: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c:1055: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c:1094: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c: In function 'RS_DBI_getTypeName': > RS-DBI.c:1148: warning: incompatible implicit declaration of built-in > function 'sprintf' > RS-DBI.c: At top level: > RS-DBI.c:1170: error: expected '=', ',', ';', 'asm' or '__attribute__' > before '*' token > RS-DBI.c:1213: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.c: In function 'RS_na_set': > RS-DBI.c:1218: error: 'type' undeclared (first use in this function) > RS-DBI.c:1219: error: 'INTSXP' undeclared (first use in this function) > RS-DBI.c:1221: error: 'NA_INTEGER' undeclared (first use in this function) > RS-DBI.c:1223: error: 'LGLSXP' undeclared (first use in this function) > RS-DBI.c:1225: error: 'NA_LOGICAL' undeclared (first use in this function) > RS-DBI.c:1227: error: 'REALSXP' undeclared (first use in this function) > RS-DBI.c:1229: error: 'NA_REAL' undeclared (first use in this function) > RS-DBI.c:1231: error: 'STRSXP' undeclared (first use in this function) > RS-DBI.c:1233: warning: implicit declaration of function 'CHAR' > RS-DBI.c:1233: warning: implicit declaration of function 'CHARACTER_POINTER' > RS-DBI.c:1233: error: 'NA_STRING' undeclared (first use in this function) > RS-DBI.c:1233: error: subscripted value is neither array nor pointer > RS-DBI.c: At top level: > RS-DBI.c:1238: error: expected declaration specifiers or '...' before > 'SEXPTYPE' > RS-DBI.c: In function 'RS_is_na': > RS-DBI.c:1244: error: 'type' undeclared (first use in this function) > RS-DBI.c:1245: error: 'INTSXP' undeclared (first use in this function) > RS-DBI.c:1246: error: 'LGLSXP' undeclared (first use in this function) > RS-DBI.c:1248: error: 'NA_INTEGER' undeclared (first use in this function) > RS-DBI.c:1250: error: 'REALSXP' undeclared (first use in this function) > RS-DBI.c:1252: warning: implicit declaration of function 'ISNA' > RS-DBI.c:1254: error: 'STRSXP' undeclared (first use in this function) > RS-DBI.c:1256: warning: implicit declaration of function 'strcmp' > RS-DBI.c:1256: error: 'NA_STRING' undeclared (first use in this function) > RS-DBI.c:1256: error: subscripted value is neither array nor pointer > RS-DBI.c: At top level: > RS-DBI.c:1265: error: 'NILSXP' undeclared here (not in a function) > RS-DBI.c:1266: error: 'SYMSXP' undeclared here (not in a function) > RS-DBI.c:1267: error: 'LISTSXP' undeclared here (not in a function) > RS-DBI.c:1268: error: 'CLOSXP' undeclared here (not in a function) > RS-DBI.c:1269: error: 'ENVSXP' undeclared here (not in a function) > RS-DBI.c:1270: error: 'PROMSXP' undeclared here (not in a function) > RS-DBI.c:1271: error: 'LANGSXP' undeclared here (not in a function) > RS-DBI.c:1272: error: 'SPECIALSXP' undeclared here (not in a function) > RS-DBI.c:1273: error: 'BUILTINSXP' undeclared here (not in a function) > RS-DBI.c:1274: error: 'CHARSXP' undeclared here (not in a function) > RS-DBI.c:1275: error: 'LGLSXP' undeclared here (not in a function) > RS-DBI.c:1276: error: 'INTSXP' undeclared here (not in a function) > RS-DBI.c:1277: error: 'REALSXP' undeclared here (not in a function) > RS-DBI.c:1278: error: 'CPLXSXP' undeclared here (not in a function) > RS-DBI.c:1279: error: 'STRSXP' undeclared here (not in a function) > RS-DBI.c:1280: error: 'DOTSXP' undeclared here (not in a function) > RS-DBI.c:1281: error: 'ANYSXP' undeclared here (not in a function) > RS-DBI.c:1282: error: 'EXPRSXP' undeclared here (not in a function) > RS-DBI.c:1283: error: 'VECSXP' undeclared here (not in a function) > RS-DBI.c:1284: error: 'RAWSXP' undeclared here (not in a function) > make: *** [RS-DBI.o] Error 1 > chmod: cannot access > `/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2.7/RMySQL/libs/*': > No such file or directory > ERROR: compilation failed for package 'RMySQL' > ** Removing > '/local/Scratch/dbolser/R/i386-redhat-linux-gnu-library/2.7/RMySQL' > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595