Isn't the message rather clear?  You need to edit the package sources and 
replace malloc.h by stdlib.h (or remove the former if the latter is 
already there, as in this case).

And BTW, 'gcc-4.2.2' is unreleased, but imminent (as R 2.6.0 is).

On Mon, 1 Oct 2007, vittorio wrote:

> 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
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to