Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#8977 - Eclipse PKGBUILD has incorrect dependency
Attached to Project:
Arch Linux
Opened by Raymano Garibaldi (raymano) - Thursday, 20 December 2007, 05:01 GMT
Last edited by Greg (dolby) - Thursday, 31 July 2008, 03:07 GMT
Opened by Raymano Garibaldi (raymano) - Thursday, 20 December 2007, 05:01 GMT
Last edited by Greg (dolby) - Thursday, 31 July 2008, 03:07 GMT
|
DetailsDescription:
Eclipse has a dependency to (jdk>=1.5). However the current eclipse in the extra repo only works with jdk 1.6. Steps to reproduce: 1) Install eclipse from extra 2) Downgrade jdk and jre to 1.5 3) Run eclipse from command-line to see the following exception: Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file |
This task depends upon
If possible, I would like to have an eclipse package built from source at 1.5 compatibility level, where the files that need 1.6 as source/target version will have that version set. The dependency should be changed to java-runtime then and eclipse should be able to run with java-gcj-compat also.
If we had jdk1.5 and jre1.5 packages, I would be happy to build using jdk1.5, but fudging the build process for compatibility with other JVMs not in our repos seems to be both pointless and an endless source of work I'm not excited about. It's also not generally the Arch way to be supporting older versions of JVMs when the new ones work with the software, though I can understand the desire in this case, and would like to find a way to do it that isn't overly ugly or burdensome.
I am more than willing to make the dependencies generic so that java-gcj-compat can be used by those who wish it, and I'm even happy to apply any necessary workarounds these users find to enable eclipse compatibility with java-gcj-compat as they come up. However, I do not plan to full-out test and support JVMs other than Sun's.
All that said, Eclipse has always been dependent on the JDK, not just the JRE. Is java-runtime sufficient, or does Eclipse need to have a development kit around? I'll have to play with this if it's not immediately apparent.
I've tried to build eclipse with gcj now, it works quite well though it bails out after 22 minutes with an error in some build.xml file, which is either ant related or something fishy going on.
Eclipse builds eclipse-ecj with the compiler found on the system. It then uses this compiler to compile itself. This compiler has a nice feature: it generates code that matches the runtime that drives it. Some buildfiles don't contain source/target versions, so when built with jre6 it will generate java 1.6 binaries.
I'll take a look at resolving this build issue, if I can get it resolved I could change the dependencies to java-environment and makedepend on java-gcj-compat to make sure java5 code is generated.
About supporting multiple JREs: the gcj/eclipse-ecj combination looks quite promising and is supported by a lot of other packages on archlinux. As long as IcedTea isn't complete, I think it's sane to support gcj/eclipse-ecj as much as we can.
This leaves us with two choices:
- build with java6, set target to 1.5 for everything except the parts that require java6
- build with java5, remove everything that requires java6
I think the first option would be the best for both worlds.
I'll look into this when I get a few minutes. If you discover anything in the meanwhile, post here.
Thanks!
I needed to patch 4 build.xml files to get this thing done. In the meanwhile I cleaned up the PKGBUILD aswel:
- no more /etc/profile.d script for eclipse, just use an eclipse launcher in /usr/bin
- desktop file points to /usr/bin/eclipse
- change makedepend to jdk>=6u3
- change dependency to java-environment
- add versioned depend on gtk2
I'll see what I can do with an i686 build, the PKGBUILD noted something about not being able to build on AMD64 or so.
Thanks for the quick work! If you check in your changes, I can try an i686 build here.