0
1

Dear all,

i'm trying to install Rcplex on ubuntu and i'm not getting very far.

First i installed cplex with the academic licence yesterday, put the ILOG_LICENSE_FILE int its default directory (/usr/ilog/ilm/access.ilm) successfully compilled and executed all the examples in the

/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex/examples/x86-64_sles10_4.1/static_pic

directory. So i assume cplex is installed correctly (should i?).

then i ran forward to the installing instruction on rcplex's website

http://cran.r-project.org/web/packages/Rcplex/INSTALL

tried them:

CPLEXDIR=/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex
CPLEXDIR0=/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex/include/ilcplex
SYSTEM=x86-64_sles10_4.1
LIBFORMAT=static_pic
COPT  = -m64 -fPIC 
#CFLAGS  = $(COPT)  -I$(CPLEXINCDIR)
CPLEXLIBDIR=$CPLEXDIR/lib/$SYSTEM/$LIBFORMAT
#CLNFLAGS  = -L$(CPLEXLIBDIR) -lcplex -lm -pthread

 R CMD INSTALL 
    --configure-args="--with-cplex-include=${CPLEXLIBDIR} 
    --with-cplex-cflags=${COPT} 
    --with-cplex-lib='-L${CPLEXLIBDIR}/static_pic 
    -lcplex -lm -lpthread'" /home/kaveh/Documents/Rcplex_0.3-0.tar.gz

and got an error:

* installing to library ‘/home/kaveh/R/x86_64-pc-linux-gnu-library/2.12’
* installing *source* package ‘Rcplex’ ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
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 ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... no
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 ilcplex/cplex.h usability... no
checking ilcplex/cplex.h presence... no
checking for ilcplex/cplex.h... no
configure: error: CPLEX header cplex.h not found
ERROR: configuration failed for package ‘Rcplex

i'm very puzzled because ilcplex/cplex.h exists.

asked 17 May '11, 06:27

vak's gravatar image

vak
3314
accept rate: 0%


Without any knowledge of R+CPLEX, it seems to me :

--with-cplex-include=${CPLEXLIBDIR}

is wrong i.e it should not be the lib directory but the include directory i.e $(CPLEXINCDIR).

Anyways I could be wrong.

link

answered 17 May '11, 06:43

Bo%20Jensen's gravatar image

Bo Jensen ♦
5.0k2919
accept rate: 14%

Indeed, i simply copy-pasted the (official) R/CRAN website with the instructions. Using your suggestion solved everything. I wish i could up-vote but i don't have enough reps. You basically ended 3 hours of frustrations.

(17 May '11, 07:03) vak

Yes, it should clearly be $(CPLEXINCDIR). He also needs to define CPLEXINCDIR correctly, which is missing.

link

answered 17 May '11, 06:49

BjarniMax's gravatar image

BjarniMax
8641312
accept rate: 13%

1

Indeed, i simply copy-pasted the (official) R/CRAN website with the instructions. Using your suggestion solved everything. I wish i could up-vote but i don't have enough reps. You basically ended 3 hours of frustrations.

(17 May '11, 07:03) vak

You welcome. Any time a make (or automake) error message says that it cannot find some file, its usually a good starting point to check to make sure the include path contains everything it is supposed to.

In your case, the CFLAGS define with the usual -I flag is commented out. Instead the include path is set by using the --with-cplex-include argument, accomplishing the same thing.

(17 May '11, 08:23) BjarniMax

RCplex is an add-on package to the base install of R. I believe you still need to have R installed on the machine in addtion to the INSTALL requirements. According the the RCplex website it needs to be R version > 2.6.0.

link

answered 17 May '11, 08:58

larrydag%201's gravatar image

larrydag 1 ♦
3.2k61326
accept rate: 9%

This is indeed the case. But in this instance is that the instructions on the package's website seem to have been outdated (pending confirmation from the maintainer).

(17 May '11, 13:33) vak

Even still it is far easier to add a package via the base install of R than to add it via shell command line using make tools. By the way having R installed on your machine can be rather handy.

(17 May '11, 17:05) larrydag 1 ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×191
×5

Asked: 17 May '11, 06:27

Seen: 3,586 times

Last updated: 17 May '11, 17:05

OR-Exchange! Your site for questions, answers, and announcements about operations research.