[R] lpSolve doesn't compile because of a malloc.h error

vittorio vdemart1 at tin.it
Tue Oct 2 00:28:25 CEST 2007


Under freebsd 6.2-p7 i386, R 2.5.1,gcc-4.2.2 I'm unable to compile package 
lpSolve because:

hpbsd# R CMD INSTALL lpSolve_5.5.8.tar.gz
* Installing to library '/usr/local/lib/R/library'
* Installing *source* package 'lpSolve' ...
** libs
cc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -I/usr/local/include  -D__NO_MATH_INLINES  -fpic  -O2 -fno-strict-aliasing -pipe -march=prescott -c 
colamd.c -o colamd.o
cc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -I/usr/local/include  -D__NO_MATH_INLINES  -fpic  -O2 -fno-strict-aliasing -pipe -march=prescott -c 
commonlib.c -o commonlib.o
................................................................
cc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -I/usr/local/include  -D__NO_MATH_INLINES  -fpic  -O2 -fno-strict-aliasing -pipe -march=prescott -c 
lp_wlp.c -o lp_wlp.o
cc -std=gnu99 -I/usr/local/lib/R/include -I/usr/local/lib/R/include -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -I/usr/local/include  -D__NO_MATH_INLINES  -fpic  -O2 -fno-strict-aliasing -pipe -march=prescott -c 
lpslink55.c -o lpslink55.o
In file included from lpslink55.c:11:
/usr/include/malloc.h:3:2: #error "<malloc.h> has been replaced by <stdlib.h>"
*** Error code 1

Stop in /tmp/R.INSTALL.zVvtvK/lpSolve/src.
ERROR: compilation failed for package 'lpSolve'
** Removing '/usr/local/lib/R/library/lpSolve'
=======================================

Now, both malloc.h and stdlib.h are under /usr/include.

What's wrong with it?

Ciao
Vittorio



More information about the R-help mailing list