ropensci / rzmq

R package for ZMQ
https://docs.ropensci.org/rzmq
84 stars 30 forks source link

Unable to install on SUSE Linux Enterprise Server 11 SP3 #23

Closed Anne623 closed 8 years ago

Anne623 commented 8 years ago

Hi, I install rzmq with R version 3.2.3 on SUSE Linux Enterprise Server 11 SP3, while failed:

vm3:# R CMD INSTALL rzmq
* installing to library ‘/usr/local/R/lib64/R/library’
* installing *source* package ‘rzmq’ ...
file ‘src/Makevars’ has the wrong MD5 checksum
** libs
I/usr/local/R/lib64/R/include -DNDEBUG -I../inst/cppzmq -I/usr/local/include       -c interface.cpp -o interface.o
make: I/usr/local/R/lib64/R/include: Command not found
make: [interface.o] Error 127 (ignored)
-shared -L/usr/local/R/lib64/R/lib -L/usr/local/lib64 -o rzmq.so interface.o -lzmq -L/usr/local/R/lib64/R/lib -lR
/bin/sh: line 2: -shared: command not found
make: *** [rzmq.so] Error 127
ERROR: compilation failed for package ‘rzmq’
* removing ‘/usr/local/R/lib64/R/library/rzmq

The etc/Makeconf setting is below:

CC = gcc -std=gnu99
CFLAGS = -g -O2 $(LTO)
CPICFLAGS = -fpic
CPPFLAGS = -I/usr/local/include
CXX = g++
CXXCPP = $(CXX) -E
CXXFLAGS = -g -O2 $(LTO)
CXXPICFLAGS = -fpic
CXX1X = 
CXX1XFLAGS = 
CXX1XPICFLAGS = 
CXX1XSTD =

I have installed stringi , dose something need to set for rzmq?

I have install zeromq:

vm3:/ # rpm -qa | grep mq
libzmq3-3.2.2-13.1
zeromq-devel-3.2.2-13.1
zeromq-3.2.2-13.1
xrobin commented 8 years ago

This is because rzmq needs C++11 and you are trying to compile with and old version of GCC that doesn't support C++11. Try to install GCC 4.7 (it is in the SUSE repositories) and edit etc/Makeconf so that you refer to gcc-4.7 in the CXX1X line:

CXX1X = g++-4.7 CXX1XFLAGS = -g -O2 $(LTO) CXX1XPICFLAGS = -fpic CXX1XSTD = --std=c++11

You may have to fiddle a bit with these variables...

Anne623 commented 8 years ago

yes, it works for me.