swarm-support
[Top][All Lists]
Advanced

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

PowerMac MkLinux porting notes and patches


From: Theodore C. Belding
Subject: PowerMac MkLinux porting notes and patches
Date: Sun, 6 Oct 1996 22:43:09 -0400

I got heatbugs running on my PowerMac, under MkLinux DR2!  Here are some
porting notes for swarm-961002, along with a patch for libtclobjc-1.1b3 and
one for swarm.

My computer is a PowerMac 7100/66 with 32MB RAM and 730MB dedicated hard
drive, running MkLinux DR2 (http://www.mklinux.apple.com).

I first installed Tcl 7.4, Tk 4.0, BLT 2.1, and XPM 3.4h.  This was easy.
Note that Tcl 7.5 and Tk 4.0 (which are included on the DR2 CD) won't work
with swarm-961002.

The next step was to install gcc 2.7.2.1 with the 960906-objc-gcc snapshot
(the version of gcc 2.7.2.1 that comes installed with DR2 doesn't support
Objective C).  To do this, copy the file gcc-2.7.2.1-1.src.rpm from the DR2
CD and install the sources with the command "rpm --install
gcc-2.7.2.1-1.src.rpm".

You'll find the sources in /usr/src/redhat/SOURCES/gcc-2.7.2.1.tar.gz,
along with the file gcc-2.7.2.1.ppc.patch.  Move both of these to some area
with lots of disk space -- you'll need about 110MB.

Type "zcat gcc-2.7.2.1.tar.gz | tar xf -" to uncompress the source files.
Then move the patch into the resulting directory and apply it with the
command "patch -p1 < gcc-2.7.2.1.ppc.patch".

Next, you'll need the file
ftp://ftp.wsct.wsc.com/pub/gnustep/gcc-2.7.2.1-objc-960906.diff.gz
Uncompress it and move it into the gcc-2.7.2.1 directory.  Type "rm
objc/list.h" and then "patch -p1 < gcc-2.7.2.1-objc-960906.diff".   (You'll
get a couple of .rej files, indicating that the patch has failed on the
gcc-info files.  I ignored these).

Now the fun part (complete instructions are in the file INSTALL).  Type
"./configure -prefix=/usr" (this assumes you want the binaries in /usr/bin,
the libraries in /usr/lib, and the include files in /usr/include).  Type
"make LANGUAGES=c" and wait for it to complete.  Then type the following
line (including quotes):
make bootstrap BOOT_CFLAGS="-g -O2 -fsigned-char"
(The -fsigned-char flag is required to compile gcc correctly on MkLinux --
see the MkLinux release notes).  This took about 3 hours to complete on my
Mac.
Now type:
make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2 -fsigned-char"
You can now use gcc to compile Obj C on your Mac!

Next, you need to install libtclobjc 1.1b3.  I've attached a patch
"libtclobjc-1.1b3.diff" to this email that you need to apply, due to
changes in the Obj C runtime's memory allocation functions (the patch
includes an email explaining why the patch is needed).  Note that these
changes affect all platforms; they will be included in gcc 2.8.0 when it is
released.  Apply the patch with the command "patch -p1 <
libtclobjc-1.1b3.diff" from within the directory libtclobjc-1.1b3.  Then
compile and install the libtclobjc as usual.  I haven't tried this with
libtclobjc-1.1b4 but it should work with similar modifications.

Now you can install Swarm itself.  Unpack the source files and apply the
patch "swarm-961002.diff" that I've also attached to this email.  To do
this, enter the swarm directory and type "patch -p1 < swarm-961002.diff".
This patch does two things, which I described in an earlier email.  First,
it adds the flag "-fsigned-char", so that Swarm will compile correctly on
MkLinux (see the MkLinux release notes for details).  Secondly, it fixes a
bug in swarm-961002: In the file src/defobj/Symbol.m, lines  119 and
142 are changed from:
  argptr = va_start( argptr, eventData );
to:
  va_start( argptr, eventData );

You'll have to edit Makefile.conf so that Swarm knows where to find the
headers and libraries that it needs; the patch reflects my setup for
MkLinux.  Finally, type "make" to compile and install Swarm.

You're done!  To try it out, unpack the swarm application source files and
compile heatbugs.  You'll have to edit the Makefile in the heatbugs
directory to tell it where to find the main swarm directory.  Then type
"make" to compile heatbugs and "heatbugs" to run it.

The only thing remaining to make Swarm fully functional on MkLinux is a
port of gdb-4.16, in order to install the patch for gdb Obj C support:
http://www-personal.engin.umich.edu/~streak/objc-960812.diff.gz
gdb-4.15 comes on the DR2 CD, and gdb-4.16 is currently being ported by OSF.

Last I heard, gcc still doesn't compile Obj C under AIX on RS/6000, Power,
or PowerPC platforms.
-Ted

Attachment: libtclobjc-1.1b3.diff
Description: Text document

Attachment: swarm-961002.diff
Description: Text document

--
Ted Belding                      <mailto:address@hidden>
University of Michigan Program for the Study of Complex Systems
<http://www-personal.engin.umich.edu/~streak/>

reply via email to

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