swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Building swarm with gcc 4.7


From: Scott Christley
Subject: Re: [Swarm-Support] Building swarm with gcc 4.7
Date: Tue, 17 Apr 2012 10:44:19 -0500

Hello Jason,

If only a couple sed scripts would do the trick ;-)

Actually a good chunk of work has been done.  A few years ago I wrote an objc 
abstraction layer, at that time it was because I wanted Swarm to work on Mac 
OSX, and Apple had recently introduced Objective-C V2, which introduced this 
new API.  It works though it required a significant rewrite of the Swarm core.  
So my understanding is that the GNU folks have been working on their own 
implementation of Objective-C V2 in the intervening years, and that the new GCC 
now uses it, but I have not had a chance to try it at all.  If the GNU version 
has done a good job of duplicating the same API and behavior as Apple's then it 
should be a relatively straight forward task of writing an adaptor layer.  All 
of this code is in the development trunk in the SVN repository, not in the 
source code releases which is likely what you are using.  If you want to take a 
stab just to see if it compiles, then copying the apple adaptor layer file 
(which is just a bunch of #defines) to a GNU V2 file, plus an #if or two to 
pick the right adaptor would do the trick.

On a side note, Java is just an interface layer, the objc core libraries are 
still required.  Also Java does not work on 64-bit, the avcall/ffcall/libffi 
library (I forget some of the details) does not have 64-bit trampoline support, 
which Swarm requires, but then maybe somebody wrote that which would be nice.

As for your user, if you want to give them something to use then you can 
compile Swarm with an earlier version of GCC if you can support older versions, 
or if you have virtualization services then a vm with the older stuff.

cheers
Scott

On Apr 16, 2012, at 4:25 PM, Jason L Tibbitts III wrote:

> I'm a systems administrator who happens to also be a Fedora developer.
> A user here requested that I install Swarm so I had a look.  Around here
> deployment for our Fedora systems is generally done by preparing a
> package which if at all possible follows Fedora's packaging practices,
> deploying that and then if there's interest, submitting the package to
> Fedora so that everyone can benefit.
> 
> I started from the srpm I found at
> http://pj.freefaculty.org/Swarm/Swarm-Packages/Fedora/14/x86_64/ and
> tried to do cleanup and removing of bundled libraries (avcall, libobjc
> at least).  I also tried to enable Java using Fedora's openjdk.
> 
> I'm having some success in that I can get through the package build on
> rawhide and Fedora 17 with Java disabled and with the bundled libobjc
> enabled.  This requires some patching of the autoconf m4 code
> (acffi.m4) to look in the proper place on 64-bit platforms and with the
> current libffi.  I can get mostly through with Java using some other
> patching to acjdk.m4.  However, I'm running into a big problem: the
> traditional Objective C API is simply gone in GCC 4.7.  You can't do
> #include <objc/objc-api.h> at all; the file simply isn't there.  I guess
> #using the bundled and very old (1997) libobjc gets around most of that,
> #though the with-java build still fails because this bit fails:
> 
> (echo "#include <objc/objc.h>"; echo "#include <objc/objc-api.h>"; sort 
> *-head.c | uniq;  echo "void swarm_java_predispatch () {"; sort *-body.c | 
> uniq ; echo "}") > predispatch.c
> /bin/sh ../../libtool --mode=compile gcc -c -g predispatch.c
> 
> predispatch.c:2:27: fatal error: objc/objc-api.h: No such file or directory
> 
> I looked into this and it does seem to be a pretty big effort to move
> over to using objc/runtime.h and fixing up all of the method calls to
> use the new names.  A sufficiently fancy sed call could probably do most
> of it, but I'm pretty far out of my depth here having not ever touched
> Objective C before.
> 
> So, does anyone have any hints?  Has anyone done any of the work needed
> to get things building with the "modern" Objective C API?  Would anyone
> like to work with me to get a package that's acceptable for Fedora?
> -- 
> Jason L Tibbitts III - address@hidden - 713/743-3486 - 660PGH
> System Manager:  University of Houston Department of Mathematics 
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support




reply via email to

[Prev in Thread] Current Thread [Next in Thread]