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

Bug 172618

Summary: dev-java/swt 3.2-r2 built fails when building with installed ibm-jdk-1.6.0 vm and active ibm-jdk-1.5.0
Product: Gentoo Linux Reporter: S.R.Mueller <srm>
Component: [OLD] DevelopmentAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: PPC   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description S.R.Mueller 2007-03-28 23:09:53 UTC
When trying to build dev-java/swt-3.2-r2 with installed ibm-jdk-1.6.0,
emerge seems to be unable to choose the correct vm that was choosen by java-config-2 (or eselect) and tries to built using version 1.6.0

spec: Linux <foo> 2.6.20.2 #2 Mon Mar 12 21:04:38 CET 2007 ppc 7447A, altivec supported PowerBook5,6 GNU/Linux


Reproducible: Always

Steps to Reproduce:
1. install ibm-jdk-1.6.0 regarding bug #148999 (https://bugs.gentoo.org/show_bug.cgi?id=148999#c40)
2. java-config-2 -S <number_of_any_vm>
3. emerge swt

Actual Results:  
 * Using: ibm-jdk-bin-1.6
>>> Unpacking source...
 * Unpacking src.zip to /var/tmp/portage/dev-java/swt-3.2-r2/work
 * Applying swt-3.2-gcc-4.x-warning-fix.patch ...                                                               [ ok ]
 * Applying swt-3.2-remove-stripping.patch ...                                                                  [ ok ]
 * Applying swt-3.2-cairo-signedness-x86.patch ...                                                              [ ok ]
>>> Source unpacked.
Rewriting source attributes
Using Sax to rewrite the build.xml files
Rewriting ./build.xml
Rewriting target attributes
Using Sax to rewrite the build.xml files
Rewriting ./build.xml
>>> Compiling source in /var/tmp/portage/dev-java/swt-3.2-r2/work ...
 * Building AWT library
cc -O -Wall -DSWT_VERSION=3232  -DLINUX -DGTK -I/opt/ibm-jdk-bin-1.6.0.0/include -I/opt/ibm-jdk-bin-1.6.0.0/include/linux -fPIC    -c -o swt_awt.o swt_awt.c
In file included from /opt/ibm-jdk-bin-1.6.0.0/include/linux/jawt_md.h:14,
                 from swt_awt.c:12:
/opt/ibm-jdk-bin-1.6.0.0/include/jawt.h:269: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jboolean'
swt_awt.c: In function 'Java_org_eclipse_swt_awt_SWT_1AWT_getAWTHandle':
swt_awt.c:28: warning: implicit declaration of function 'JAWT_GetAWT'
make: *** [swt_awt.o] Error 1

!!! ERROR: dev-java/swt-3.2-r2 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 4722:   Called src_compile
  swt-3.2-r2.ebuild, line 111:   Called die

!!! Failed to build AWT support
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/dev-java/swt-3.2-r2/temp/build.log'.

!!! When you file a bug report, please include the following information:
GENTOO_VM=ibm-jdk-bin-1.6  CLASSPATH="" JAVA_HOME="/opt/ibm-jdk-bin-1.6.0.0"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info


Expected Results:  
successfull build

circumvent this behaviour by adding "JAVA_PKG_FORCE_VM=ibm-jdk-bin-1.5" to the ebuild (wrt http://www.gentoo.org/proj/en/java/java-devel.xml)
eclipse works fine when choosing 1.6.0 as system-vm.

Output from java-config-2 -L

The following VMs are available for generation-2:
1)      IBM JDK 1.4.2.7 [ibm-jdk-bin-1.4]
*)      IBM JDK 1.5.0.3 [ibm-jdk-bin-1.5]
3)      IBM JDK 1.6.0.0 [ibm-jdk-bin-1.6]
4)      IBM JRE 1.4.2.6 [ibm-jre-bin-1.4]
Comment 1 S.R.Mueller 2007-03-28 23:10:22 UTC
Created attachment 114831 [details]
emerge --info
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-03-29 06:26:44 UTC

*** This bug has been marked as a duplicate of bug 146484 ***
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-03-29 08:29:27 UTC
This is because system vm doesn't control build vm anymore, read "Preferred VM"
at http://www.gentoo.org/doc/en/java.xml#doc_chap4
Comment 4 S.R.Mueller 2007-03-29 09:49:06 UTC
(In reply to comment #3)
> This is because system vm doesn't control build vm anymore, read "Preferred VM"
> at http://www.gentoo.org/doc/en/java.xml#doc_chap4
> 

Ok, /etc/java-config-2/build/jdk.conf was completely commented out.
So i manually added *=ibm-jdk-bin-1.5 to the file and dev-java/swt* will build without any errors.

So, would it be nice logic to make java-config-2 -S or eselect java-vm adding the appropriate entries to /etc/java-config-2/build/jdk.conf ??

regards