Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 305773

Summary: Request for Support for ARM in Java (java-config) & Sun's Java SE for Embedded
Product: Gentoo Linux Reporter: John L. Poole <prestopoole>
Component: New packagesAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: enhancement CC: arm, bernhard, chithanh, lannocc, siarhei.siamashka, xaviermiller
Priority: High    
Version: unspecified   
Hardware: ARM   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log

Description John L. Poole 2010-02-18 17:12:01 UTC
The Advanced RISC Machine ("ARM") is a viable platform for Gentoo, yet Java is not supported.  There is available a working runtime Java environment from Sun for the ARM processor: Java SE for Embedded 6 Runtime Environment. I have installed it and successfully installed and run the Ignite's Openfire Jabber Server setting JAVA_HOME=/usr/local/src/ejre1.6.0_10.  Sun's environment is, however, not free and currently available for 90 day trial and paid licensing thereafter.  (Note: there is an SDHC card one can buy that contains Open Services Gateway initiative (OSGi) and JVM for the SheevPlug.)

For the SheevPlug, what is remarkable is that in other Linux distributions for the SheevaPlug installation of Java is an option with no hassle; just use apt-get....  For Gentoo, Java is blocked.  It is very difficult to recommend to other users that they should install Gentoo on their SheevaPlug when Java is not supported.  

Reproducible: Always

Steps to Reproduce:
1. emerge java-config
Actual Results:  
>>> Failed to emerge dev-java/java-config-2.1.10, Log file:

>>>  '/var/tmp/portage/dev-java/java-config-2.1.10/temp/build.log'

 * Messages for package dev-java/java-config-2.1.10:

 * ERROR: dev-java/java-config-2.1.10 failed:
 *   arch config not found
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_install
 *   environment, line 4195:  Called die
 * The specific snippet of code:
 *       newins config/jdk-defaults-${ARCH}.conf jdk-defaults.conf || die "arch config not found"
 *
 * If you need support, post the output of 'emerge --info =dev-java/java-config-2.1.10',
 * the complete build log and the output of 'emerge -pqv =dev-java/java-config-2.1.10'.
 * The complete build log is located at '/var/tmp/portage/dev-java/java-config-2.1.10/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/java-config-2.1.10/temp/environment'.
 * S: '/var/tmp/portage/dev-java/java-config-2.1.10/work/java-config-2.1.10'
tiny ~ #


Expected Results:  
Desired results: some way to configure a Gentoo's Java environment to integrate Sun's Java SE for Embedded 6 Runtime Environment.

I'm concurrently trying to build gcj for Gentoo -- it is a formidable task that has consumed much of my spare time over the last several months.  I think it is important that Java be available on Gentoo and I've been trying to invest my time to make that happen.  Unfortunately, I do not have the familiarity of way Java is supported on Gentoo to what might be a simple tweak here and there to allow a commercial solution to integrate into the Gentoo environment.

I work for Oracle and the statements and opinions expressed here are my own and do
not necessarily represent those of Oracle Corporation.
Comment 1 John L. Poole 2010-02-18 17:19:21 UTC
Created attachment 220187 [details]
build log
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2010-04-17 17:47:30 UTC
Dunno, what does the java team have to say here?

That 90 day trial kinda sucks, isn't there any other alternative?
Comment 3 Alistair Bush (RETIRED) gentoo-dev 2010-04-19 11:30:23 UTC
(In reply to comment #2)
> Dunno, what does the java team have to say here?
> 
> That 90 day trial kinda sucks, isn't there any other alternative?
> 

icedtea would be the way to go.  It seems that they have support for arm.

The bootstrapping will be the difficult bit.
Comment 4 Alex Buell 2010-11-08 18:36:35 UTC
Is it legal to bootstrap with Sun's environment to generate a icedtea6 binary and use that binary thereafter to bootstrap icedtea6 sources? 
Comment 5 Bernhard Nägele 2011-11-22 11:49:47 UTC
Even if you want to use icedtea for Java-RTE there is the same failure from java-config:
* ERROR: dev-java/java-config-2.1.10 failed (install phase):
* arch config not found

Is there a way to getting this working correctly for ARM architecture?
Comment 6 Bernhard Nägele 2011-11-22 22:04:10 UTC
The same situation with java-config-2.1.11:
 * ERROR: dev-java/java-config-2.1.11 failed (install phase):
 *   arch config not found
Comment 7 luigi.galvani 2012-03-11 10:12:00 UTC
the same situation...

newins: Need two arguments, old file and new file
 * ERROR: dev-java/java-config-2.1.10 failed (install phase):
 *   arch config not found


Any idea for workaround?
Comment 8 Martin Samek 2012-03-11 10:19:20 UTC
I will also welcome this feature.
Comment 9 Andreas Wandinger 2012-04-02 13:20:17 UTC
Hi!

Can confirm that 'dev-java/java-config' does not work:

  beaglebone ~ # emerge java-config

  ...

  !!! newins: config/jdk-defaults-arm.conf does not exist
   * ERROR: dev-java/java-config-2.1.10 failed (install phase):
   *   arch config not found
   * 
   * Call stack:
   *     ebuild.sh, line  85:  Called src_install
   *   environment, line 5013:  Called die
   * The specific snippet of code:
   *       newins config/jdk-defaults-${ARCH}.conf jdk-defaults.conf || die "arch config not found"
   * 
   * If you need support, post the output of 'emerge --info =dev-java/java-config-2.1.10',
   * the complete build log and the output of 'emerge -pqv =dev-java/java-config-2.1.10'.
   * The complete build log is located at '/var/tmp/portage/dev-java/java-config-2.1.10/temp/build.log'.
   * The ebuild environment file is located at '/var/tmp/portage/dev-java/java-config-2.1.10/temp/environment'.
   * S: '/var/tmp/portage/dev-java/java-config-2.1.10/work/java-config-2.1.10'
   * QA Notice: file does not exist:
   * 
   *      newins: config/jdk-defaults-arm.conf does not exist

Tested on a BeagleBone (TI AM335X):

  beaglebone ~ # uname -a
  Linux beaglebone 3.2.0 #1 Mon Apr 2 01:37:19 CEST 2012 armv7l ARMv7 Processor rev 2 (v7l) am335xevm GNU/Linux

We would strongly advocate to have _ANY_ sort of Java on the BeagleBone. But since config-java fails, Sun-/Oracle-/IcedTea-JVM fail too.

Best Wishes,
andy
Comment 10 Benda Xu gentoo-dev 2012-05-10 13:13:57 UTC
*** Bug 392129 has been marked as a duplicate of this bug. ***
Comment 11 Ralph Sennhauser (RETIRED) gentoo-dev 2012-05-10 16:52:18 UTC
Added to trunk and ebuild, using icedtea as default.

  10 May 2012; Ralph Sennhauser <sera@gentoo.org> java-config-2.1.11-r3.ebuild:
  Backport missing jdk-defaults.conf for arm #305773 and amd64-fbsd #415397

Thanks.
Comment 12 Ralph Sennhauser (RETIRED) gentoo-dev 2012-05-14 19:36:53 UTC
*** Bug 396361 has been marked as a duplicate of this bug. ***
Comment 13 John L. Poole 2012-09-09 21:14:45 UTC
Now I am on a BeagleBone and find the status of this bug marked "Resolved Fixed".

Yet, when I try:

emerge  dev-java/icedtea-bin

I get:

============= START ===============
>>> Failed to emerge dev-java/java-config-2.1.10, Log file:

>>>  '/var/tmp/portage/dev-java/java-config-2.1.10/temp/build.log'

 * Messages for package dev-java/java-config-2.1.10:

 * ERROR: dev-java/java-config-2.1.10 failed (install phase):
 *   arch config not found
 *
 * Call stack:
 *     ebuild.sh, line  85:  Called src_install
 *   environment, line 5227:  Called die
 * The specific snippet of code:
 *       newins config/jdk-defaults-${ARCH}.conf jdk-defaults.conf || die "arch config not found"
 *
 * If you need support, post the output of `emerge --info '=dev-java/java-config-2.1.10'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/java-config-2.1.10'`.
 * The complete build log is located at '/var/tmp/portage/dev-java/java-config-2.1.10/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/java-config-2.1.10/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/java-config-2.1.10/work/java-config-2.1.10'
 * S: '/var/tmp/portage/dev-java/java-config-2.1.10/work/java-config-2.1.10'

============= END ===============

It seems to me the issue of ARM not being supported is still unresolved, at least in this case under the BeagleBone.  I am unable to discern from the prior comments how this bug was fixed.  Can someone explain to me what the fix was and what I should do to move past the above error message.
Comment 14 John L. Poole 2012-09-09 21:16:25 UTC
Since this bug was a generic request for java on ARM and the status was changed to "RESOLVED FIXED" and I'm finding what appears to be the same problem on another ARM platform, I'm changing the status to something other and am guessing the "CONFIRMED" basically reopens this bug.
Comment 15 Andreas Wandinger 2012-09-14 10:47:44 UTC
I can confirm, that emerging java on an ARM-platform like the BeagleBone does not work yet!
Comment 16 Shawn A. Wilson 2012-09-15 22:13:20 UTC
Use java-config-2.1.11-r3. It's not flagged with the ARM keyword yet but it installed for me.
Comment 17 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-16 13:39:15 UTC
Keyworded ~arm:

app-admin/eselect-ecj-0.7
dev-java/ecj-gcj-3.6
dev-java/gcj-jdk-4.6.3
dev-java/java-config-2.1.2
virtual/jdk-1.5.0
virtual/jre-1.5-0-r1

Unmasked the java flag in arm profile.

There is a new JDK 7 for ARM available from Oracle in case someone wants to package it:
https://blogs.oracle.com/henrik/entry/oracle_releases_jdk_for_linux
Comment 18 Andreas Wandinger 2012-09-18 00:58:51 UTC
Hi,

thank you very much for the quick reply.
After adding ~arm to java-config-2.1.11-r3, i got these dependencies:

beaglebone portage # emerge =dev-java/java-config-2.1.11-r3
Calculating dependencies... done!
[ebuild  N     ] sys-libs/libstdc++-v3-3.3.6  USE="nls (-multilib)" 
[ebuild  N     ] dev-java/java-config-wrapper-0.16 
[ebuild  N     ] virtual/libstdc++-3.3 
[ebuild  N    *] dev-java/java-config-2.1.11-r3 
[ebuild  N f  *] dev-java/ibm-jdk-bin-1.5.0.12_p5-r1  USE="-X (-alsa) -doc -examples -javacomm (-nsplugin) -odbc" 
[ebuild  N    ~] virtual/jdk-1.5.0 
[ebuild  N    ~] virtual/jre-1.5.0-r1


my keywords look like this:

beaglebone ~ # cat /etc/portage/package.accept_keywords 
=sys-apps/ifplugd-0.28-r9 ~arm
=dev-java/java-config-2.1.11-r3 **
=virtual/jdk-1.5.0 ~arm
=virtual/jre-1.5.0-r1 ~arm
=dev-java/ibm-jdk-bin-1.5.0.12_p5-r1 **

beaglebone ~ # cat /etc/portage/package.license 
>=dev-java/ibm-jdk-bin-1.5.0.12_p5-r1:1.5 IBM-J1.5


Unfortunately sys-libs/libstdc++-v3-3.3.6 refuses to compile with the following error:

/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm: Assembler messages:
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:159: Warning: ignoring attempt to redefine built-in register 'ip'
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:160: Warning: ignoring attempt to redefine built-in register 'sp'
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:161: Warning: ignoring attempt to redefine built-in register 'lr'
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:162: Warning: ignoring attempt to redefine built-in register 'pc'
/usr/armv7a-unknown-linux-gnueabi/bin/ld: unrecognised emulation mode: armelf_linux
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
collect2: ld returned 1 exit status
make[2]: *** [libgcc/./_udivsi3.oS] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build/gcc'
make: *** [all-gcc] Error 2
emake failed
 * ERROR: sys-libs/libstdc++-v3-3.3.6 failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 2709:  Called die
 * The specific snippet of code:
 *       emake all-target-libstdc++-v3 || die
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/libstdc++-v3-3.3.6'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/libstdc++-v3-3.3.6'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build'
 * S: '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6'

>>> Failed to emerge sys-libs/libstdc++-v3-3.3.6, Log file:

>>>  '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/temp/build.log'

 * Messages for package sys-libs/libstdc++-v3-3.3.6:

 * ERROR: sys-libs/libstdc++-v3-3.3.6 failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 2709:  Called die
 * The specific snippet of code:
 *       emake all-target-libstdc++-v3 || die
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/libstdc++-v3-3.3.6'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/libstdc++-v3-3.3.6'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build'
 * S: '/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6'


Right at the moment i have no clue what's wrong with the emulation mode here. Maybe my Keywords are not yet correct, since libstdc++-v3-3.3.6 seems to be a bit outdated. It would be great if someone could provide advice. Thanks :)

Best wishes,
andy
Comment 19 John L. Poole 2012-09-18 01:15:29 UTC
I, too, followed the helpful advice and installed java-config-2.1.11-r3 and had additional packages such as those described in Comment #18.  Since the roadblock here has been resolved using java-config-2.1.11-r3, this bug has come to an end.  I'll research the sys-libs/libstdc issue and see if other bugs already cover the problem and if not, then open a new bug.
Comment 20 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-18 03:34:59 UTC
Please use java-config-2.1.12 which is keyworded ~arm now, along with the other packages in comment 17. ibm-jdk-bin will not work on arm.
Comment 21 John L. Poole 2012-09-18 05:02:43 UTC
bone temp # emerge dev-java/java-config -p

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-libs/libstdc++-v3-3.3.6  USE="nls (-multilib)"
[ebuild  N     ] virtual/libstdc++-3.3
[ebuild  N    ~] dev-java/java-config-2.1.12
[ebuild  N f  *] dev-java/ibm-jdk-bin-1.5.0.12_p5-r1  USE="-X (-alsa) -doc -examples -javacomm (-nsplugin) -odbc"
[ebuild  N    ~] virtual/jdk-1.5.0
[ebuild  N    ~] virtual/jre-1.5.0-r1

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

bone temp #

I'm blocked as I cannot build sys-libs/libstdc++-v3-3.3.6, see Bug #435370.
Comment 22 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-18 05:05:31 UTC
You probably still have old java entries in /etc/portage/package.{accept,}keywords
Remove them to let portage's autounmask figure out the correct packages to emerge =java-config-2.1.12
Comment 23 John L. Poole 2012-09-18 05:13:17 UTC
I do not have a "package.accept" file and I cleaned out the package.keywords.

Here's what a proposed emerge will do:

bone temp # emerge =dev-java/java-config-2.1.12 -p

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-libs/libstdc++-v3-3.3.6  USE="nls (-multilib)"
[ebuild  N     ] virtual/libstdc++-3.3
[ebuild  N    ~] dev-java/java-config-2.1.12
[ebuild  N f  *] dev-java/ibm-jdk-bin-1.5.0.12_p5-r1  USE="-X (-alsa) -doc -examples -javacomm (-nsplugin) -odbc"
[ebuild  N    ~] virtual/jdk-1.5.0
[ebuild  N    ~] virtual/jre-1.5.0-r1

The following keyword changes are necessary to proceed:
#required by dev-java/java-config-2.1.12, required by dev-java/ibm-jdk-bin-1.5.0.12_p5-r1, required by virtual/jdk-1.5.0
=virtual/jre-1.5.0-r1 ~arm
#required by virtual/jre-1.5.0-r1, required by dev-java/java-config-2.1.12, required by dev-java/ibm-jdk-bin-1.5.0.12_p5-r1
=virtual/jdk-1.5.0 ~arm
#required by =dev-java/java-config-2.1.12 (argument)
=dev-java/java-config-2.1.12 ~arm
#required by virtual/jdk-1.5.0, required by virtual/jre-1.5.0-r1, required by dev-java/java-config-2.1.12, required by =dev-java/java-config-2.1.12 (argument)
=dev-java/ibm-jdk-bin-1.5.0.12_p5-r1 **

NOTE: The --autounmask-keep-masks option will prevent emerge
      from creating package.unmask or ** keyword changes.

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

bone temp # cat /etc/portage/package.keywords
bone temp # ls /etc/portage
bin  package.keywords  package.license  package.use  postsync.d  savedconfig
bone temp #
Comment 24 Shawn A. Wilson 2012-09-18 06:18:28 UTC
(In reply to comment #23)

Try to emerge gcj-jdk instead, it should pull in java-config as a dependency (did for me). Alternately, see if `emerge --nodeps java-config` works, as libstdc++ does not appear to be a (direct) dependency.
Comment 25 John L. Poole 2012-09-18 07:25:05 UTC
I tried:
   emerge gcj-jdk

it failed with:
running install_egg_info
Writing /var/tmp/portage/dev-java/java-config-2.1.10/temp/images/2.7/usr/lib/python2.7/site-packages/java_config-2.1.10-py2.7.egg-info
 * Generating '/usr/bin/depend-java-query' wrapper script
 * Generating '/usr/bin/gjl' wrapper script
 * Generating '/usr/bin/java-config-2' wrapper script
!!! newins: config/jdk-defaults-arm.conf does not exist
 * ERROR: dev-java/java-config-2.1.10 failed (install phase):
 *   arch config not found


So I tried:
bone temp # emerge =dev-java/java-config-2.1.12 -p

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ~] app-admin/eselect-ecj-0.7
[ebuild  NS   ~] sys-devel/gcc-4.6.3 [4.5.3-r2] USE="cxx fortran gcj gtk mudflap nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -go -graphite (-hardened) (-libssp) (-multilib) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"
[ebuild  N    ~] dev-java/java-config-2.1.12
[ebuild  N    ~] dev-java/ecj-gcj-3.6  USE="native"
[ebuild  N    ~] dev-java/gcj-jdk-4.6.3
[ebuild  N    ~] virtual/jdk-1.5.0
[ebuild  N    ~] virtual/jre-1.5.0-r1

The following keyword changes are necessary to proceed:
#required by dev-java/java-config-2.1.12, required by dev-java/gcj-jdk-4.6.3, required by virtual/jdk-1.5.0
=virtual/jre-1.5.0-r1 ~arm
#required by virtual/jre-1.5.0-r1, required by dev-java/java-config-2.1.12, required by dev-java/gcj-jdk-4.6.3
=virtual/jdk-1.5.0 ~arm
#required by =dev-java/java-config-2.1.12 (argument)
=dev-java/java-config-2.1.12 ~arm

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

bone temp #

That will not work as I am unable to build gcc (I cannot remember if I have a bug for that or not).  So finally I tried:

bone temp # emerge --nodeps =dev-java/java-config-2.1.12 -p

These are the packages that would be merged, in order:

[ebuild  N    ~] dev-java/java-config-2.1.12

The following keyword changes are necessary to proceed:
#required by =dev-java/java-config-2.1.12 (argument)
=dev-java/java-config-2.1.12 ~arm

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

bone temp #

So I did this to successfully install dev-java/java-config:

 emerge --nodeps =dev-java/java-config-2.1.12

Thank you for your help and persistence.
Comment 26 Shawn A. Wilson 2012-09-18 07:39:56 UTC
(In reply to comment #25)

Yeah, you should have unmasked dev-java/java-config-2.1.12 first regardless of which approach you use, as that's the version that works on ARM (mentioned here already). As you can see, your first attempt was trying to install a version that's known not to work. Glad to hear you've made some progress.
Comment 27 Shawn A. Wilson 2012-09-18 07:44:34 UTC
(In reply to comment #25)

You will have to recompile GCC if you want to build gcj-jdk. This is the only JDK I have successfully merged onto my ARM (Raspberry Pi). It actually just now finished, taking a couple days and using nearly 1GB of swap (this board has only 256MB physical RAM).

I'd be interested to here if you get a different JDK running.