Re: [R] Compilation failures: mgcv, spatstat, Matrix, cluster

From: Paul Roebuck <roebuck_at_odin.mdacc.tmc.edu>
Date: Sun 14 Aug 2005 - 10:25:24 EST

On Sat, 13 Aug 2005, Michael Kubovy wrote:

> With Version 2.1.1 (2005-06-20) on Power Mac G5 running Mac OS X
> 10.4.2 (8C46):
>
> Some compilations work (e.g., MatchIt, RGraphics, Zelig), and some
> don't, e.g., mgcv, spatstat, and the following (Matrix, cluster):
>
> trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/src/contrib/
> Matrix_0.98-3.tar.gz'
> Content type 'application/x-tar' length 626712 bytes
> opened URL
> ==================================================
> downloaded 612Kb
>
> * Installing *source* package 'Matrix' ...
> ** libs
>
> The downloaded packages are in
> /private/tmp/RtmpPddsAE/downloaded_packages
> gcc-3.3 -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/
> include -I/usr/local/include -I./Metis -fno-common -g -O2 -c
> HBMM.c -o HBMM.o
> In file included from HBMM.c:2:
> iohb.h:6:19: malloc.h: No such file or directory
> make: *** [HBMM.o] Error 1
> ERROR: compilation failed for package 'Matrix'

Didn't check package for actually functioning correctly, but the following changes will allow compilation on OS X 10.3. In ANSI C, the standard memory allocation routines are declared in <stdlib.h>; <malloc.h> is obsolete for that purpose and isn't guaranteed to exist.

Matrix/src/mmio.c:

    Add #include <stdlib.h>
    Remove #include <malloc.h>

Matrix/src/iohb.h:

    Remove #include <malloc.h>



SIGSIG -- signature too long (core dumped)

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Aug 14 10:35:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:48 EST