From: Paul P. <bay...@gm...> - 2011-11-09 23:03:02
|
Hi Ray, I currently execute posix targets on Windows/Cygwin & also on OSX, but not on Debian. Here is a sample of an ant block I use: <target name="xmlvm"> <java jar="../xmlvm/dist/xmlvm.jar" failonerror="true" fork="true" maxmemory="1024m"> <arg value="--in=build/bin"/> <arg value="--out=build/xbin"/> <arg value="--target=posix"/> <arg value="--no-cache"/> <arg value="--app-name=HelloWorld"/> </java> </target> I do not have to make any modifications to the make file afterwards. Your issue is likely due to the differences on Debian, as I would bet you're the first one trying that, believe it or not, since I gather most folks are interested in iPhone development on OSX. If you look at some of our code, you'll find some platform specific code (a lot from Apache Harmony). E.g. #if defined (FREEBSD) || defined(MACOSX) It sounds like you have some C experience, so if you would be able to nail down those differences in a patch, I'm sure we could remedy the issue. Thanks, Paul On Wed, Nov 9, 2011 at 3:25 PM, Ray Leland <ray...@gm...> wrote: > 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 > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |