harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Tanzer <stru...@guglhupf.net>
Subject Re: [jchevm] Porting JCHEVM to OSX/PPC
Date Tue, 29 Nov 2005 20:21:02 GMT
The good news first: it compiles now. The problem I described in the
previous mail was that libjc was linked with the option "-module" (so
it can be dlopen()ed) and this is not portable. I removed the -module
and now it compiles.

I stripped out lots of ELF specific stuff, so my version could be 
interesting for a port to windows too. I just don't want to commit it
to "trunk" yet because it's completely untested.

@Archie Cobbs: Is the "-module" really important for libjc? If yes we'd
have to find a portable solution for this...

To make it compile I left the funtion "_jc_dynamic_invoke(...)" in the
file "libjc/arc/ppc/arch_functions.c" empty, but this function is needed
to run JCHEVM (it calls C functions and is needed for JNI AFAICS). Maybe
somebody with more PPC experience can help me with porting this function
from i386.

Cheers, David.

On Sat, 2005-11-26 at 11:44 +0100, David Tanzer wrote:
> Hi Again.
> 
> Now it compiles, but the linking fails:
> 
> Making all in jc
> /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -g -O3 -pipe -Wall  
> -Waggregate-return -Wcast-align -Wchar-subscripts -Wcomment -Wformat - 
> Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wnested- 
> externs -Wno-long-long -Wparentheses -Wpointer-arith -Wredundant- 
> decls -Wreturn-type -Wswitch -Wtrigraphs -Wuninitialized -Wunused - 
> Wwrite-strings -g -O2  -pthread -o jc  main.o ../libjc/libjc.la -ldl - 
> lpopt -lcrypto -lz -lm
> 
> *** Warning: Linking the executable jc against the loadable module
> *** libjc.so is not portable!
> ** Warning, lib libjc.so is a module, not a shared library
> 
> ** And there doesn't seem to be a static archive available
> ** The link will probably fail, sorry
> gcc -g -O2 -g -O3 -pipe -Wall -Waggregate-return -Wcast-align -Wchar- 
> subscripts -Wcomment -Wformat -Wimplicit -Wmissing-declarations - 
> Wmissing-prototypes -Wnested-externs -Wno-long-long -Wparentheses - 
> Wpointer-arith -Wredundant-decls -Wreturn-type -Wswitch -Wtrigraphs - 
> Wuninitialized -Wunused -Wwrite-strings -g -O2 -o .libs/jc main.o  - 
> pthread ../libjc/.libs/libjc.so -L/sw/lib -ldl /sw/lib/libpopt.dylib / 
> sw/lib/libintl.dylib /sw/lib/libiconv.dylib -lcrypto -lz -lm
> powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-pthread'
> /usr/bin/ld: ../libjc/.libs/libjc.so is input for the dynamic link  
> editor, is not relocatable by the static link editor again
> collect2: ld returned 1 exit status
> make[1]: *** [jc] Error 1
> make: *** [all-recursive] Error 1
> 
> Something similar is discussed here:
> http://www.cocoadev.com/index.pl?ApplicationLinkingIssues
> 
> Maybe somebody here on this list knows how to handle this.
> Cheers, David.
> 
> On Thu, 2005-11-24 at 17:22 +0100, David Tanzer wrote:
> > Hi Archie,
> > 
> > Thanks for your help so far. etc/makedist.sh runs now, and I have 
> > removed some more elf specific stuff from libjc/ (I hope I didn't 
> > destroy too much ;)). The build now hangs at libjc/gc_root.c where
> > _JC_REGISTER_OFFS is used for the first time. AFAICS this relies on
> > the i386 registers, so I guess this one will become more tricky to
> > port. I'll have a closer look into that over the weekend.
> > 
> > Cheers, David.
> > 
> > On Wed, 2005-11-23 at 11:56 -0600, Archie Cobbs wrote:
> > > David Tanzer wrote:
> > > > Thanks, your infos brought me a little bit further. Not etc/makedist.sh

> > > > fails when it invokes jcjavah for the first time: the
> > > >   _JC_MUTEX_LOCK(...)
> > > > called from libjc/class_bytes.c (line 102) fails because of EINVAL, I'll
> > > > have a look at this in the next few days. Maybe you have some hints for
> > > > me where I could start?
> > > 
> > > Oops, fortunately that's an easy fix.. should be fixed now...
> > > svn update and try again.
> > > 
> > > -Archie
> > > 
> > > __________________________________________________________________________
> > > Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com
-- 
David Tanzer, Haghofstr. 29, A-3352 St. Peter/Au, Austria/Europe
http://deltalabs.at -- http://dev.guglhupf.net -- http://guglhupf.net
My PGP Public Key: http://guglhupf.net/david/david.asc
--
Real Programmers don't write in FORTRAN.  FORTRAN is for pipe stress freaks and
crystallography weenies.  FORTRAN is for wimp engineers who wear white socks.

Mime
View raw message