After some help from people at stackoverflow (http://stackoverflow.com/questions/872726/errors-while-compiling-neko-vm-os-x ) I've now gotten one step further to the compiling of neko on osx.

What i had to do was to add this before #include "vm.h":

#include <dlfcn.h>

That's because the dlfcn.h redefines the bool into "_Bool" (in /usr/ lib/gcc/i686-apple-darwin9/4.0.1/include/stdbool.h) while the neko.h header has it defined as "int".

Now on the other hand i'm stuck when it tries to compile mod_tora2, i get this output:

Compiling mod_tora2...
gcc -O3 -fPIC -arch ppc -arch i386 -D_LARGEFILE64_SOURCE -I../common - c -I../../vm -I/usr/include/apache2 -I/usr/include/apr-1 ../common/ socket.c
In file included from ../common/socket.h:24,
                 from ../common/socket.c:21:
../common/osdef.h:49:21: error: endian.h: No such file or directory
../common/osdef.h:53:3: warning: #warning In file included from ../ common/socket.h:24,
                 from ../common/socket.c:21:
../common/osdef.h:49:21: error: endian.h: No such file or directory
../common/osdef.h:53:3: warning: #warning BYTBYTE_ORDER unknown, assuming BIG_ENDIAN
E_ORDER unknown, assuming BIG_ENDIAN
lipo: can't figure out the architecture type of: /var/folders/dC/ dCpFc1gRG5eLbInYcfxU5++++TI/-Tmp-//ccr20aWb.out
Called from tools/install.neko line 397
Called from tools/install.neko line 358
Uncaught exception - Error 256 : aborted
make[1]: *** [libs] Error 1
make: *** [universal] Error 2

Since i'm currently not planning on using mod_tora can i skip this in the compile somehow?

Cheers!

/bob

On May 16, 2009, at 19:58, Robert Sköld wrote:

Hey, I'm trying to compile on my macbook (osx 10.5.6) and getting some compile errors.

I can't say I'm used to compile alot of c source code so i need some help with this.

First, since i've installed the libgc using macports i had to add " - L/opt/local/lib -I/opt/local/include" to the CFLAGS to avoid those errors.

Second, it complained about not finding malloc.h, and after som googling it seems it's not available in osx (?) so it might be ignored, so i changed the malloc include in jit_x86.c to:

#ifndef NEKO_MAC
#       include <malloc.h>
#endif

And now i'm completely stuck, because it stops at the compiling of the threads.c saying:

vm/threads.c:202: error: conflicting types for 'neko_thread_register'
vm/neko_vm.h:37: error: previous declaration of 'neko_thread_register' was here

I've tried googling this and some say it's because of lack of a "prototype" and some say it's because of a header include being done several times, and i can't really find any of those.

It might be related to the bool typedef though, because when i compile with -x c++ i get other errors (although off course those might be earlier than the "conflicting types" issue. The error i get as cpp is:

vm/threads.c: In function 'void* ThreadMain(void*)':
vm/threads.c:112: error: invalid conversion from 'int (*)(int, void*)' to 'void*' vm/threads.c:112: error: initializing argument 2 of 'int clean_c_stack(int, void*)'
vm/threads.c: In function 'mt_local* neko_alloc_local()':
vm/threads.c:252: error: invalid conversion from 'void*' to 'mt_local*'

I'd appreciate some ideas on what i might be able to do here, i don't really know where to go from here.

Thanks!

/bob

ps. i'm trying to make a macport of neko and haxe which is why i'm doing this in the first place :)



--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to