From: Ray L. <ray...@gm...> - 2011-11-09 21:25:19
|
Hello all, I am new to XMLVM and I am trying to compile a simple Hello World to c (I am on Debian) with: $ java -Xmx1G -jar dist/xmlvm.jar --in=HelloWorld.class --target=posix But I get a lot of compilation problems. Currently I am running into an undefined portLibrary, which I believe it should be defined in one of Harmony's files, but I could not find it with a simple grep on the generated posix/src directory. The error message is: gcc -w -std=gnu99 -DALL_INTERIOR_POINTERS -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -DUSE_MMAP -DUSE_MUNMAP -DNO_DYLD_BIND_FULLY_IMAGE -I../src -DXMLVM_NO_GC -DLINUX -c ../src/xmlvm-util.c -o build/obj/xmlvm-util.o ../src/xmlvm-sock.c: In function ‘hysock_getnameinfo’: ../src/xmlvm-sock.c:769: error: ‘portLibrary’ undeclared (first use in this function) ../src/xmlvm-sock.c:769: error: (Each undeclared identifier is reported only once ../src/xmlvm-sock.c:769: error: for each function it appears in.) make: *** [build/obj/xmlvm-sock.o] Error 1 Following are some steps I have already taken: 1. I added -DXMLVM_NO_GC to the CFLAGS to simplify things. 2. I changed S_IFDIR to __S_IFDIR in src/native_java_io_File.h (I am not so sure why the definition in sys.stat.h does not work). 3. Also changed --std=c99 to --std=gnu99 in CFLAGS, for otherwise I got an undefined ip_mreq. 4. I added -DLINUX to the CFLAGS, for otherwise the definition in hycomp.h does not kick in. Could someone tell me what are the steps needed to compile a simple HelloWorld with --target=posix? Surely I am not the first to try that... Ray |