[Rprotobuf-yada] building on windows
eckuipers-web at yahoo.com
eckuipers-web at yahoo.com
Mon Oct 25 15:12:46 CEST 2010
Hey all,
I am trying to build and install under windows. These are the steps i did. I am
not sure if this is how it is supposed to be done.
1) Configure/Make/Make install for google protobuf library using MinGW and MSYS
No trouble here
2) Configure rprotobuf using MinGW and MSYS
Run without problems
3) By hand modify rprotobuf/pkg/src/Makevars
I have to tell RTools where to find protobuf
My Makevars now looks like this:
PKG_CPPFLAGS=-I"c:/Devel/msys/1.0/local/include"
PKG_LIBS=c:/Devel/R-2.10.1/library/Rcpp/lib/libRcpp.a
c:/Devel/msys/1.0/local/lib/libprotobuf.a
4) R CMD build pkg
This seems to move along with some warnings until it needs netinet/in.h and
throws and ERROR.
I have had this problem on windows before. I think last time i replaced the
include of netinet with an include of winsock or winsock2.
The output of "R CMD build" is below.
Best Koert
**************************************************************************************
* checking for file 'pkg/DESCRIPTION' ... OK
* preparing 'pkg':
* checking DESCRIPTION meta-information ... OK
* cleaning src
make: Nothing to be done for `clean'.
* installing the package to re-build vignettes
* installing *source* package 'RProtoBuf' ...
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
making DLL ...
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
ConnectionCopyingInputStream.cpp -o ConnectionCopyingInputStream.o
In file included from ConnectionCopyingInputStream.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from ConnectionCopyingInputStream.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
ConnectionCopyingOutputStream.cpp -o ConnectionCopyingOutputStream.o
In file included from ConnectionCopyingOutputStream.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from ConnectionCopyingOutputStream.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
ConnectionInputStream.cpp -o ConnectionInputStream.o
In file included from ConnectionInputStream.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from ConnectionInputStream.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
ConnectionOutputStream.cpp -o ConnectionOutputStream.o
In file included from ConnectionOutputStream.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from ConnectionOutputStream.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
DescriptorPoolLookup.cpp -o DescriptorPoolLookup.o
In file included from DescriptorPoolLookup.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from DescriptorPoolLookup.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c RSourceTree.cpp -o
RSourceTree.o
In file included from RSourceTree.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from RSourceTree.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
RWarningErrorCollector.cpp -o RWarningErrorCollector.o
In file included from RWarningErrorCollector.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from RWarningErrorCollector.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
RconnectionCopyingInputStream.cpp -o RconnectionCopyingInputStream.o
In file included from RconnectionCopyingInputStream.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from RconnectionCopyingInputStream.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
g++ -I"c:/Devel/R-2.10.1/include" -I"c:/Devel/msys/1.0/local/include"
-I"c:/Devel/R-2.10.1/library/Rcpp/include" -O2 -Wall -c
SocketCopyingInputStream.cpp -o SocketCopyingInputStream.o
In file included from SocketCopyingInputStream.cpp:1:
rprotobuf.h:28:1: warning: "O_BINARY" redefined
In file included from rprotobuf.h:26,
from SocketCopyingInputStream.cpp:1:
c:\devel\rtools\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/fcntl.h:67:1:
warning: this is the location of the previous definition
In file included from SocketCopyingInputStream.cpp:2:
SocketCopyingInputStream.h:5:24: error: sys/socket.h: No such file or directory
In file included from SocketCopyingInputStream.h:7,
from SocketCopyingInputStream.cpp:2:
sisocks.h:32:24: error: netinet/in.h: No such file or directory
sisocks.h:34:23: error: arpa/inet.h: No such file or directory
In file included from SocketCopyingInputStream.cpp:2:
SocketCopyingInputStream.h:11:25: error: netinet/tcp.h: No such file or
directory
SocketCopyingInputStream.cpp: In member function 'virtual int
rprotobuf::SocketCopyingInputStream::Read(void*, int)':
SocketCopyingInputStream.cpp:19: error: 'recv' was not declared in this scope
make: *** [SocketCopyingInputStream.o] Error 1
... done
ERROR: compilation failed for package 'RProtoBuf'
* removing 'C:/DOCUME~1/kkuipers/LOCALS~1/Temp/Rinst415685192/RProtoBuf'
ERROR
Installation failed.
Removing 'C:/DOCUME~1/kkuipers/LOCALS~1/Temp/Rinst415685192'
More information about the Rprotobuf-yada
mailing list