Hi,
Tom Fitzsimmons and I (okay, it was mostly Tom ;) worked out how to have a set of alternatives for java, javac, etc. that can use a non-system gcc installation. This will allow you to easily run our Eclipse packages (among others) using your gcc builds.
(I'm assuming here that you have a ~/.rpmmacros similar to [2])
1. check java-1.4.2-gcj-compat out of Fedora CVS [1]. 2. cd into the java-1.4.2-gcj-compat/devel directory 3. make sources; cp *.tar.gz ~/rpmbuild/SOURCES 4. ensure that your gcc build is ahead of the system compiler in your path 5. rpmbuild \ --define "custom 1" \ --define "gcj_prefix <location of your build directory>" \ --define "origin gcj<YOURSUFFIX>" \ -ba java-1.4.2-gcj-compat.spec 6. install the resulting RPM (should be in ~/rpmbuild/RPMS/<ARCH>/) 7. set your java and javac alternatives to be those of your gcc build: sudo /usr/sbin/update-alternatives --set javac \ /usr/lib/jvm/java-1.4.2-gcj<YOURSUFFIX>/bin/javac sudo /usr/sbin/update-alternatives --set java \ /usr/lib/jvm/jre-1.4.2-gcj<YOURSUFFIX>/bin/java 8. verify that /usr/bin/java --version gives the same output as your gij
Now running Eclipse (and other apps that use /usr/bin/java) should use your gcc build.
Andrew
[1] http://cvs.fedora.redhat.com/core.shtml http://cvs.fedora.redhat.com/viewcvs/rpms/java-1.4.2-gcj-compat/
[2] $ cat ~/.rpmmacros %_topdir /home/overholt/rpmbuild $ ls /home/overholt/rpmbuild BUILD RPMS SOURCES SPECS SRPMS
On Wed, 2005-05-11 at 16:56 -0400, Andrew Overholt wrote:
Tom Fitzsimmons and I (okay, it was mostly Tom ;) worked out how to have a set of alternatives for java, javac, etc. that can use a non-system gcc installation. This will allow you to easily run our Eclipse packages (among others) using your gcc builds.
[...] 6. install the resulting RPM (should be in ~/rpmbuild/RPMS/<ARCH>/)
Do you then run java-1.4.2-gcjHEAD-compat in parallel with the stock java-1.4.2-gcj-compat? I would assume so, since eclipse packages require the stock package. This means that installation should be forced due to file conflicts, right?
During the latest rawhide update I noticed some eclipse packages failed to upgrade properly (i.e. I had both version M6.15 and M6.16 installed). I didn't look into it closely, but could this be a result of having both java-1.4.2-gcj-compat and java-1.4.2-gcjHEAD-compat installed?
Thanks for the tip, BTW :)
* Ziga Mahkovec ziga.mahkovec@klika.si [2005-05-17 14:50]:
On Wed, 2005-05-11 at 16:56 -0400, Andrew Overholt wrote:
Tom Fitzsimmons and I (okay, it was mostly Tom ;) worked out how to have a set of alternatives for java, javac, etc. that can use a non-system gcc installation. This will allow you to easily run our Eclipse packages (among others) using your gcc builds.
[...] 6. install the resulting RPM (should be in ~/rpmbuild/RPMS/<ARCH>/)
Do you then run java-1.4.2-gcjHEAD-compat in parallel with the stock java-1.4.2-gcj-compat? I would assume so, since eclipse packages require the stock package. This means that installation should be forced due to file conflicts, right?
During the latest rawhide update I noticed some eclipse packages failed to upgrade properly (i.e. I had both version M6.15 and M6.16 installed). I didn't look into it closely, but could this be a result of having both java-1.4.2-gcj-compat and java-1.4.2-gcjHEAD-compat installed?
Yeah, probably. Some of the files are shared between the two. I guess people trying this will just have to be careful when updating.
Andrew
java-devel@lists.fedoraproject.org