swarm-support
[Top][All Lists]
Advanced

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

Re: GNU Java Compiler and Swarm - some tactics


From: jones . peter
Subject: Re: GNU Java Compiler and Swarm - some tactics
Date: Sat, 23 Jun 2001 11:07:03 -0400 (EDT)

> I'm on your tracks now, friend.  Thanks for working out all these
> details.  I know for sure I couldn't do it...
> 
> GCC 3.0 is finally built and installed, "seems to" compile swarm OK. I
...

I'd like to share some tactics to share with anyone else wanting to try this.

1. Redhat has issued a new version of gcc on June 22. It's version 2.96-85.
   RedHat 7.1 users should check the dozen or so other updates that were
   published on that date. It wouldn't hurt to use the latest to seed
   gcc 3.0, in case previous versions produced bad code.

2. GCC RPM binaries are available at www.codesourcery.com, but they're
   snapshots, and seem to be compiled for 386, not 686. They install
   in /usr/local, and they're not guaranteed, unlike an official release.

3. The main site for GCC 3.0 is ftp://ftp.gnu.org/pub/gnu/gcc/gcc-3.0/ .
   Mirrors are listed at http://www.gnu.org/order/ftp.html , but they
   may not always be up to date.
 
4. Before downloading, I suggest creating a user for compiling GCC, and
   a target directory. In other words, one can use linuxconf to create
   a user name "gccbuild", for instance. Still as root, create the
   installation directory "/gcc300", for instance, and then:
   "chown gccbuild /gcc300; chgrp gccbuild /gcc300"
   This will allow the gccbuild user to retrieve the sources, untar,
   create a temporary build directory, configure using "--prefix /gcc300",
   make, and make install, all without becoming root, and not cluttering
   /usr/local. Removal of gcc3.0 is easy: just "rm -rf /gcc300".

5. When building, I found it useful to use:
   "CC=/usr/bin/gcc <untarred-dir>/configure --prefix /gcc300 \
      --enable-languages=java,objc",
   to guarantee using the standard (RedHat's) compiler as a seed.

NB I also tried this on a multi-boot machine where I downloaded the GCC
source to a Windows 98 partition, and decompressed and untarred it on
the Windows98 disk with PowerDesk. Then, I booted Linux, mounted the
Windows98 partition and tried the gcc build. I aborted in the java section,
finding duplicate symbols in two include files. The two files were
identical save the case of the first character of the filename. In other
words, the gcc build seemed to be seeing the same file twice. Maybe
renaming the file in Windows will solve the problem.

6. When Make-ing, I found the "bootstrap-lean" target useful to save disk
   space. Other switches are given in the gcc documentation.

7. I created another user from the purpose of compiling swarm. I created
   a directory "/swarmhome" owned by that user. Using similar tactics,
   I used commands like:
   "PATH=<Java Compiler path>" "CC=/gcc300/bin/gcc -rpath /gcc300/lib" \
      <untarred-dir>/configure \ --prefix=/swarmhome \
      --with-javadir=<Java Runtime Environment directory>
   make
   make install"

   I'm using the Java Development Kit from:
ftp://ftp.tux.org/pub/java/JDK-1.3.0/i386/FCS/j2re-1.3.0-FCS-linux-i386.tar.bz2
"tar -j" can decompress and untar this file.

NB. When I tried the above in a script running as a background process,
I found I had "javac" as a "zombie". I had to kill the make, and resume
it manually. Maybe "make -j1" to prevent multi-threading in make would
prevent the problem; if not, it might be necessary to run javac in the
foreground.

8. After editing the makefile in the "Hello World" demo, I was able to
   run it, despite some messages about undefined symols. But when I
   checked the script the compilation  had generated, I found it contained
   "-L" referenced to directories in the temporary one I had used for
   building gcc3.00. I'll have to track that one down.

9. If a gcc bug is suspected, the first line of attack is to add the
   --save-temps switch. This produces expanded files suitable for
   testing with newer versions.

I hope the above information is useful and saves others a few unproductive
hours. I have reconstructed the above from memory, so I hope there aren't
too many typos.

Peter Jones

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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