[MMTK] Re: building MMTK on Mac OS X
imk@mrc-lmb.cam.ac.uk
imk@mrc-lmb.cam.ac.uk
Wed, 30 May 2001 13:46:42 +0100
--On Tuesday, May 22, 2001 13:45 -0400 "Randy M. Wadkins" <rwadkin@jhmi.edu>
wrote:
> Hi:
> I didn't get as far as you two did. I get the following error
> message when trying to build MMTK. Any thoughts how to fix this?
> Thanks,
> --Randy
>
> [...]
>In file included from Include/MMTK/forcefield.h:18,
> from Src/MMTK_deformation.c:8:
> /usr/include/pthread.h:241: parse error before `destructor'
> /usr/include/pthread.h:241: parse error before `)'
I finally had time to get back to this, and succeeded to compile. The error
mentioned above does not have anything to do with MMTK, I remember having
problems with this before, with other sofware using pthreads. Pthreads
support is rather incomplete as yet in OS X. To get MMTK to compile, install
Numeric 20.0, then replace arrayobject.h as Konrad recently described:
> - replace the file arrayobject.h from Numeric by the one available at
> ftp://dirac.cnrs-orleans.fr/pub/MMTK/arrayobject.h
Then make a backup copy of /usr/include/pthreads.h and apply the following
patch
--- /usr/include/pthread.h.orig Thu Apr 26 19:52:24 2001
+++ /usr/include/pthread.h Tue May 29 20:09:43 2001
@@ -239,7 +239,7 @@
int policy,
const struct sched_param *param));
int pthread_key_create __P((pthread_key_t *key,
- void (*destructor)(void *)));
+ void (*)(void *)));
int pthread_key_delete __P((pthread_key_t key));
int pthread_setspecific __P((pthread_key_t key,
const void *value));
MMTK-2.2b6 seems to compile and work just fine after that, but I'm not
completely sure of possible side-effects of the above modification, so if
you have problems compiling other pthreads-using software, go back to the
older version. I have ventured this after comparing with the IRIX header
file.
Oh, and if you still get any trouble with "_PyArray_API not defined" you can
use python with the -v option to find out the offending module. I had to
recompile Scientific-2.2 after replacing arrayobject.h, but that may just be
because I had been tinkering with that to get it to work already.
Amike salutas c^iujn,
Ivo