From: Markus N. <mar...@gm...> - 2011-11-10 15:30:26
|
Most of those flags are taken from the apache harmony makefiles. As we borrow a lot of code from them i just took all of the flags and it doesnt seem to have any side effects. Let us know if you run into any more issues. Markus On Nov 10, 2011 5:12 AM, "Ray Leland" <ray...@gm...> wrote: > I got HelloWorld to work without many of the flags, but perhaps I will > need them later. Thank you for the detailed explanation, > Ray > > On Wed, Nov 9, 2011 at 3:29 PM, Markus Neubrand > <mar...@gm...> wrote: > > Hi, > > > > Unfortunately it seems as if the majority of the people using the posix > > target are working under MacOSX. > > > > I am developing under Debian as well right now so I feel your pain. > > > > I have to make the following changes to get the posix target working: > > > > 1. Add the following CFLAGS in the makefile: > > For i386: -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT > > -march=pentium3 -DXMLVM_NO_GC -D_GNU_SOURCE > > For amd64: -DLINUX -DLINUX_X86_64 -DHYX86_64 -DIPv6_FUNCTION_SUPPORT > > -DPOINTER64 -fPIC -DXMLVM_NO_GC -D_GNU_SOURCE > > > > The -D_GNU_SOURCE will fix the S_IFDIR issue. > > > > 2. Add -ldl and -pthread to the libraries and remove -lgc > > > > 3. Uncomment all references to portLibrary in xmlvm-sock.c > > > > 4. Remove gc lib calls in native_org_xmlvm_runtime_FinalizerNotifier.c, > > native_java_lang_System.c and xmlvm.c the linker complains about > > > > This will get the posix target running on Debian. However sockets won't > > work. I attached the changed files I use on an amd64 debian mentioned > above > > > > For some of those issues fixes are easy (e.g. all GC issues need to be > > surrounded properly by #ifndef XMLVM_NO_GC). For the Makefile parameters > > we will have to think about something. Fixing those issues is relatively > low > > on my priority list right now. > > > > Regards, > > Markus > > > > On Wed, Nov 9, 2011 at 3:02 PM, Paul Poley <bay...@gm...> wrote: > >> > >> 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 > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> 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 > >> > > > > > |