这在 10.04 上运行良好,但现在我无法让它再次运行......
cplex 似乎已正确安装(但如果有人能建议一种方法来确保确实如此,我将不胜感激)
任何想法 ?
CPLEXDIR=/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex
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=-fPIC \
--with-cplex-lib='-L$CPLEXLIBDIR/static_pic \
-lcplex -lm -lpthread'" ~/Documents/Rcplex_0.3-0.tar.gz
* installing to library ‘~/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’
* removing ‘~/R/x86_64-pc-linux-gnu-library/2.12/Rcplex’
然而,当我检查
cd cd /root/ILOG/CPLEX_Studio_AcademicResearch122/cplex/include/ilcplex
ls
cplex.h ilm.h ilocarray.h ilocplex.h ilocplexi.h iloextrmgr.h ilogoals.h solution.xsd solution.xsl
答案1
好的,记录一下。指导说要用 Make 文件中 CFLAGS 后面找到的任何内容替换 CPLEXDIR,在我们的例子中是
/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex
不太安静吧。以前是这样,但现在是:
/root/ILOG/CPLEX_Studio_AcademicResearch122/cplex/include
在上面的代码中修复它,它就可以飞了。