我正在尝试使用R 2.15.1和Rtools 2.15在Windows下编译ROracle包版本1.1-4
install.packages('ROracle',type='source')
但似乎缺少ocimingw.c
(参见下面的输出)。我使用R CMD INSTALL --build
得到了相同的错误消息。
编辑2012-09-11 :问题显然特定于1.1-4,因为我设法正常构建和安装1.1-1。
知道解决方案可能是什么?
trying URL 'http://stat.ethz.ch/CRAN/src/contrib/ROracle_1.1-4.tar.gz'
Content type 'application/x-gzip' length 156924 bytes (153 Kb)
opened URL
downloaded 153 Kb
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
looking for Instant Client c:/instantclient/x64/instantclient_11_2
cygwin warning:
MS-DOS style path detected: C:\instantclient\x64\instantclient_11_2
Preferred POSIX equivalent is: /cygdrive/c/instantclient/x64/instantclient_11_2
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
found Instant Client C:\instantclient\x64\instantclient_11_2
found Instant Client SDK c:/instantclient/x64/instantclient_11_2/sdk/include
generating ocimingw.lib from ocimingw.def
x86_64-w64-mingw32-dlltool: not found
copying from c:/instantclient/x64/instantclient_11_2/sdk/include
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture
cygwin warning:
MS-DOS style path detected: C:/R/R-215~1.1/etc/x64/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/R/R-215~1.1/etc/x64/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
gcc -m64 -I"C:/R/R-215~1.1/include" -DNDEBUG -I./oci -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c rodbi.c -o rodbi.o
rodbi.c: In function 'rociResExec':
rodbi.c:1169:14: warning: unused variable 'drv' [-Wunused-variable]
rodbi.c: In function 'rociResFetch':
rodbi.c:1187:16: warning: unused variable 'drv' [-Wunused-variable]
rodbi.c: In function 'rociResInfo':
rodbi.c:1256:16: warning: unused variable 'drv' [-Wunused-variable]
rodbi.c: In function 'rociResTerm':
rodbi.c:1323:14: warning: unused variable 'drv' [-Wunused-variable]
rodbi.c: In function 'rodbiCheck':
rodbi.c:2348:25: warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness [-Wpointer-sign]
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:505:15: note: expected 'char * restrict' but argument is of type 'text *'
rodbi.c: In function 'rawToStrhexCall':
rodbi.c:2573:7: warning: pointer targets in passing argument 1 of 'Rf_mkChar' differ in signedness [-Wpointer-sign]
C:/R/R-215~1.1/include/Rinternals.h:628:6: note: expected 'const char *' but argument is of type 'unsigned char *'
rodbi.c:2557:26: warning: unused variable 'seglen' [-Wunused-variable]
rodbi.c: In function 'rociResInit':
rodbi.c:1121:3: warning: 'qry_encoding' may be used uninitialized in this function [-Wuninitialized]
gcc -m64 -I"C:/R/R-215~1.1/include" -DNDEBUG -I./oci -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -std=gnu99 -mtune=core2 -c rooci.c -o rooci.o
In file included from C:/R/R-215~1.1/include/R.h:44:0,
from rodbi.h:37,
from rooci.c:47:
C:/R/R-215~1.1/include/R_ext/RS.h:43:0: warning: "ERROR" redefined [enabled by default]
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/wingdi.h:70:0: note: this is the location of the previous definition
rooci.c: In function 'roociInitializeRes':
rooci.c:620:32: warning: 'cnvcid' may be used uninitialized in this function [-Wuninitialized]
gcc -m64 -shared -s -static-libgcc -o ROracle.dll tmp.def rodbi.o rooci.o -L. ocimingw.lib -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/R/R-215~1.1/bin/x64 -lR
gcc.exe: error: ocimingw.lib: No such file or directory
ERROR: compilation failed for package 'ROracle'
* removing 'C:/R/R-2.15.1/library/ROracle'
答案 0 :(得分:0)
ROracle很容易在Windows中从源代码安装,如果你想从源代码中使用ROracle,请尝试使用Linux,这里是my install log。
如果仍然使用Windows,您可以从Oracle获取已编译的ROracle包,它包含在“客户支持包”中。
答案 1 :(得分:0)
问题显然特定于1.1-4,因为我设法正常构建和安装1.1-1。在我再试一次之前,我会等待1.1-5版本。感谢所有贡献者!