gerald-lindsly / rmongodb

R driver for MongoDB
http://cnub.org/rmongodb.ashx
Apache License 2.0
83 stars 44 forks source link

ERROR: compilation failed for package ‘rmongodb’ #10

Closed cybunk closed 11 years ago

cybunk commented 11 years ago

On this computer I' on Max os X 10.7 and when I tried to install rmongodb 1.0.3 from the source ( http://cran.r-project.org/web/packages/rmongodb/index.html ), I have the same problem than I found on this page : http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/rmongodb-00install.html

When I tried to compile myself with the git sources and the mongo-c-driver interface you provide on git (mongo-c-driver-src.zip) I have the following problem :

* installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
* installing *source* package ‘rmongodb’ ...
** libs
*** arch - i386
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c api.c -o api.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c api_bson.c -o api_bson.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c api_gridfs.c -o api_gridfs.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c api_mongo.c -o api_mongo.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c bcon.c -o bcon.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c bson.c -o bson.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c encoding.c -o encoding.o
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c env_posix.c -o env_posix.o
env_posix.c: In function ‘mongo_env_write_socket’:
env_posix.c:59: warning: implicit declaration of function ‘__mongo_set_error’
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c env_standard.c -o env_standard.o
env_standard.c: In function ‘mongo_env_sock_init’:
env_standard.c:159: warning: implicit declaration of function ‘sigaction’
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -D_MONGO_USE_GETADDRINFO -DR_SAFETY_NET -fPIC  -g -O2  -c env_win32.c -o env_win32.o
env_win32.c:27:53: error: ws2tcpip.h: No such file or directory
env_win32.c:28:22: error: winsock2.h: No such file or directory
env_win32.c: In function ‘mongo_env_close_socket’:
env_win32.c:37: warning: implicit declaration of function ‘closesocket’
env_win32.c: In function ‘mongo_env_write_socket’:
env_win32.c:45: warning: implicit declaration of function ‘send’
env_win32.c:47: warning: implicit declaration of function ‘__mongo_set_error’
env_win32.c:47: warning: implicit declaration of function ‘WSAGetLastError’
env_win32.c: In function ‘mongo_env_read_socket’:
env_win32.c:62: warning: implicit declaration of function ‘recv’
env_win32.c: In function ‘mongo_env_set_socket_op_timeout’:
env_win32.c:75: warning: implicit declaration of function ‘setsockopt’
env_win32.c:75: error: ‘SOL_SOCKET’ undeclared (first use in this function)
env_win32.c:75: error: (Each undeclared identifier is reported only once
env_win32.c:75: error: for each function it appears in.)
env_win32.c:75: error: ‘SO_RCVTIMEO’ undeclared (first use in this function)
env_win32.c:82: error: ‘SO_SNDTIMEO’ undeclared (first use in this function)
env_win32.c: In function ‘mongo_env_socket_connect’:
env_win32.c:94: error: ‘MONGO_ERR_LEN’ undeclared (first use in this function)
env_win32.c:97: error: storage size of ‘ai_hints’ isn’t known
env_win32.c:107: error: ‘AF_UNSPEC’ undeclared (first use in this function)
env_win32.c:108: error: ‘SOCK_STREAM’ undeclared (first use in this function)
env_win32.c:109: error: ‘IPPROTO_TCP’ undeclared (first use in this function)
env_win32.c:111: warning: implicit declaration of function ‘getaddrinfo’
env_win32.c:118: error: dereferencing pointer to incomplete type
env_win32.c:119: warning: implicit declaration of function ‘socket’
env_win32.c:119: error: dereferencing pointer to incomplete type
env_win32.c:119: error: dereferencing pointer to incomplete type
env_win32.c:120: error: dereferencing pointer to incomplete type
env_win32.c:123: error: ‘MONGO_SOCKET_ERROR’ undeclared (first use in this function)
env_win32.c:129: warning: implicit declaration of function ‘connect’
env_win32.c:129: error: dereferencing pointer to incomplete type
env_win32.c:129: error: dereferencing pointer to incomplete type
env_win32.c:138: error: dereferencing pointer to incomplete type
env_win32.c:141: error: ‘TCP_NODELAY’ undeclared (first use in this function)
env_win32.c:152: warning: implicit declaration of function ‘freeaddrinfo’
env_win32.c:159: warning: implicit declaration of function ‘mongo_clear_errors’
env_win32.c: In function ‘mongo_env_sock_init’:
env_win32.c:166: error: ‘WSADATA’ undeclared (first use in this function)
env_win32.c:166: error: expected ‘;’ before ‘wsaData’
env_win32.c:167: error: ‘WORD’ undeclared (first use in this function)
env_win32.c:167: error: expected ‘;’ before ‘wVers’
env_win32.c:174: error: ‘wVers’ undeclared (first use in this function)
env_win32.c:174: warning: implicit declaration of function ‘MAKEWORD’
env_win32.c:175: warning: implicit declaration of function ‘WSAStartup’
env_win32.c:175: error: ‘wsaData’ undeclared (first use in this function)
make: *** [env_win32.o] Error 1
ERROR: compilation failed for package ‘rmongodb’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rmongodb’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rmongodb’

Do you have any idea ?

gerald-lindsly commented 11 years ago

With the new version, rmongodb_1.0.5, clean build and test reported under OS X.