[R-sig-ME] compiling CHOLMOD c code

Ryan King c.ryan.king at gmail.com
Tue Jul 27 19:43:17 CEST 2010


Hello list,
Like most mixed model implementations, my little project tries to use
CHOLMOD for the underlying calculation.  I haven't had to use raw c
libraries before.  Unfortunately, I need/want access to some CHOLMOD
functions not used by Matrix or lme4.   My procedure was to make all
the UF sparse suite packages into archives
make in each of the following:
UFconfig/
CHOLMOD/Lib/
AMD/Lib/
CAMD/Lib/
CCOLAMD/Lib/
CHOLMOD/Lib/
COLAMD/Lib/
metis-4.0/Lib/

then move the archives to my working directory and link the results all together
R CMD SHLIB  *.a mylikec.c ../sparsesuite/metis-4.0/Lib/*.o -o
bigsmush.so -llapack -lblas

However, the result won't load

> dyn.load("bigsmush.so")
Error in dyn.load("bigsmush.so") :
  unable to load shared library 'bigsmush.so':
  bigsmush.so: undefined symbol: camd_malloc


Grep says that camd_malloc is declared
CAMD/Include/camd.h:329:EXTERN void *(*camd_malloc) (size_t) ;		    /*
pointer to malloc */

and defined in both
CAMD/Source/camd_global.c:51:void *(*camd_malloc) (size_t) = malloc ;
CHOLMOD/Partition/cholmod_camd.c:185:    camd_malloc = Common->malloc_memory ;


as long as I don't compile with the -DNMALLOC option, which I don't
think that I did.  Any help as to what I need to to?

Thanks,
Ryan King
Dept Health Studies,
University of Chicago




More information about the R-sig-mixed-models mailing list