Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126105 - ibm-jdk-bin-1.5.0 causes openoffice-2.0.1 compile failure (jawt.h syntax error before "jboolean")
Summary: ibm-jdk-bin-1.5.0 causes openoffice-2.0.1 compile failure (jawt.h syntax erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 97421 146484 153626 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-13 19:38 UTC by Ed Catmur
Modified: 2007-12-16 10:46 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
jawt-define-fix.patch (jawt-define-fix.patch,377 bytes, patch)
2006-07-20 17:02 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2006-03-13 19:38:01 UTC
Yes, I know Java 1.5 is masked, but ibm-jdk-bin 1.5.0 is the best option for PPC.

Openoffice 2.0.1 compiles and works fine against ibm-jdk-bin 1.5.0, bar one compile error:

Making: ../../unxlngppc.pro/slo/com_sun_star_comp_beans_LocalOfficeWindow.obj
gcc -fsigned-char -fmessage-length=0 -c -I.  -I. -I../inc -I../../inc -I../../unx/inc -I../../unxlngppc.pro/inc -I. -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solver/680/unxlngppc.pro/inc/dont_use_stl -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solver/680/unxlngppc.pro/inc/external -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solver/680/unxlngppc.pro/inc -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solenv/unxlngppc/inc -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solenv/inc -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/res -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solver/680/unxlngppc.pro/inc/dont_use_stl -I/var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/solenv/inc/Xp31 -I/opt/ibm-jdk-bin-1.5.0/include -I/opt/ibm-jdk-bin-1.5.0/include/linux -I/opt/ibm-jdk-bin-1.5.0/include/native_threads/include -I/usr/include     -I. -I../../res -I. -O2 -fno-strict-aliasing   -fsigned-char -pipe -O2 -mcpu=G4 -pipe -fno-strict-aliasing -fPIC -DLINUX -DUNX -DVCL -DGCC -DC300 -DPOWERPC -DGXX_INCLUDE_PATH=/usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.5/include/g++-v3 -DCVER=C300 -D_USE_NAMESPACE -DNPTL -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -DPOWERPC -DPPC -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DOOA680   -DSHAREDLIB -D_DLL_  -DMULTITHREAD  -o ../../unxlngppc.pro/slo/com_sun_star_comp_beans_LocalOfficeWindow.o com_sun_star_comp_beans_LocalOfficeWindow.c
In file included from com_sun_star_comp_beans_LocalOfficeWindow.c:45:
/opt/ibm-jdk-bin-1.5.0/include/jawt.h:302: error: syntax error before "jboolean"
dmake:  Error code 1, while making '../../unxlngppc.pro/slo/com_sun_star_comp_beans_LocalOfficeWindow.obj'
'---* tg_merge.mk *---'

ERROR: Error 65280 occurred while making /var/tmp/portage/openoffice-2.0.1/work/ooo-build-2.0.1.3/build/ooa680-m1/bean/native/unix
make: *** [stamp/build] Error 1

/opt/ibm-jdk-bin-1.5.0/include/jawt.h has:

/*
 * Get the AWT native structure.  This function returns JNI_FALSE if
 * an error occurs.
 */
_JNI_IMPORT_OR_EXPORT_
jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);

Adding CFLAGS="-D_JNI_IMPORT_OR_EXPORT_=" allows the compile to complete. 

I'm guessing this is an ibm-jdk bug rather than an openoffice issue; elsewhere, _JNI_IMPORT_OR_EXPORT_ is only defined (to nothing) in jawt_md.h prior to include of jawt.h. This bug can be expected to recur when any package includes jawt.h.

Uh, so this belongs to java herd rather than openoffice.
Comment 1 Josh Nichols (RETIRED) gentoo-dev 2006-03-15 13:56:04 UTC
As a side note, any 1.5 JDK is hardly a good option for a 'system vm' because of the breakage that will inevitably occur with a number of packages.

Could you please verify that it does build with ibm-jdk-bin-1.4? 
Comment 2 Josh Nichols (RETIRED) gentoo-dev 2006-04-14 21:22:57 UTC
Adding appropriate arch team. 
Comment 3 Mikko Tiihonen 2006-07-12 03:23:20 UTC
The same header bug caused compilation problems with eclipse-sdk too.

The ibm-jdk-1.5.0-SR2 (for which there is no ebuild) does have fixed headers.
The ibm-jdk-1.4.2-SR5 has broken headers.

In my opinion the best way would be to someone just patch the gentoo ibm-jdk headers so that all other jni using programs would also compile cleanly instead of trying to push workarounds for jdk bugs to other projects.
Comment 4 Albert Zeyer 2006-07-13 09:18:56 UTC
I got the same error with IBM-Jdk-1.4.2.5 and with OpenOffice 2.0.3.

I removed the java-USE-flag for OpenOffice and know, it takes much longer to compile (~ 12 hours), but then there is another error:

...
... analyzing modules ...
------------------------------------
... languages de ...
... analyzing files ...
... analyzing files with flag ARCHIVE ...
... analyzing files with flag SCPZIP_REPLACE ...
... analyzing files with flag PATCH_SO_NAME ...
... creating preregistered services.rdb ...
... cleaning the output tree ...
... removing directory /var/tmp/portage/openoffice-2.0.3/work/ooo-build-ooc680-m7/build/ooc680-m7/instsetoo_native/util/OpenOffice//zip/de ...
... removing directory /var/tmp/portage/openoffice-2.0.3/work/ooo-build-ooc680-m7/build/ooc680-m7/instsetoo_native/util/OpenOffice//services.rdb/de_witherror_1 ...

**************************************************
ERROR: ERROR: Could not register all components!
in function: create_services_rdb
**************************************************

**************************************************
ERROR: Saved logfile: /var/tmp/portage/openoffice-2.0.3/work/ooo-build-ooc680-m7/build/ooc680-m7/instsetoo_native/util/OpenOffice//logging/de/log_OOC680__de.log**************************************************
Thu Jul 13 17:27:08 2006 (02:13 min.)
Failed to install:  at ./ooinstall line 129.
make: *** [install] Error 1

!!! ERROR: app-office/openoffice-2.0.3 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_install
  ebuild.sh, line 1013:   Called src_install
  openoffice-2.0.3.ebuild, line 258:   Called die

!!! Installation failed!
!!! If you need support, post the topmost build error, and the call stack if relevant.

Comment 5 Ed Catmur 2006-07-19 23:35:03 UTC
(In reply to comment #4)
> I removed the java-USE-flag for OpenOffice and know, it takes much longer to
> compile (~ 12 hours), but then there is another error:

Probably unrelated, if you turned off USE="java".
Comment 6 Ed Catmur 2006-07-20 17:00:16 UTC
(In reply to comment #3)
> The same header bug caused compilation problems with eclipse-sdk too.
> 
> The ibm-jdk-1.5.0-SR2 (for which there is no ebuild) does have fixed headers.
> The ibm-jdk-1.4.2-SR5 has broken headers.
> 
> In my opinion the best way would be to someone just patch the gentoo ibm-jdk
> headers so that all other jni using programs would also compile cleanly instead
> of trying to push workarounds for jdk bugs to other projects.

OK. I'll write a patch.
Comment 7 Ed Catmur 2006-07-20 17:02:11 UTC
Created attachment 92352 [details, diff]
jawt-define-fix.patch

That was easy. Untested, but it should work. Needs to be applied to all current Gentoo ibm-jdk ebuilds (though as above, apparently the latest ibm-jdk is fixed).
Comment 8 Andreas Proschofsky (RETIRED) gentoo-dev 2006-09-14 10:00:39 UTC
I've seen, that there is now a newer release (1.5.0.2) available, does this fix the problem?

Some feedback from the java-herd would still be great, btw...
Comment 9 Ed Catmur 2006-09-14 13:32:15 UTC
Nah, the patch is still needed.
Comment 10 Howard B. Golden 2006-10-15 10:34:10 UTC
(In reply to comment #9)
> Nah, the patch is still needed.

And it is also needed for ibm-jdk-bin-1.5.0.3 (installed today).

Question: Is it a good idea to apply this patch? This bug seems to have been ignored for a long time (IMO).

Comment 11 François Bissey 2006-10-17 18:22:17 UTC
I am on ppc. I successfully compiled OOo-2.0.4 without the java flag shortly
after OOo-2.0.4 hit the tree without problem. I abstained including the java
flag as it required the new java system. Now that the new java system has made
it into stable on ppc I tried to rebuild OOo-2.0.4 with java.
It default to the ibm-jdk-1.5.03 (on ppc we only have the ibm jdk) and I got a very similar error I haven't tried the patch. Here is where it breaks:
Making: ../../unxlngppc.pro/slo/com_sun_star_comp_beans_LocalOfficeWindow.obj
gcc -fsigned-char -fmessage-length=0 -c -O2 -fno-strict-aliasing   -D_FILE_OFFSET_BITS=64 -I.  -I../../unxlngppc.pro/inc/officebean -I../inc -I../../inc/pch -I../../inc -I../../unx/inc -I../../unxlngppc.pro/inc -I. -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solver/680/unxlngppc.pro/incdont_use_stl -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solver/680/unxlngppc.pro/inc/external -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solver/680/unxlngppc.pro/inc -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solenv/unxlngppc/inc -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solenv/inc -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/res -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solver/680/unxlngppc.pro/incdont_use_stl -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solenv/inc/Xp31 -I/opt/ibm-jdk-bin-1.5.0.3/include -I/opt/ibm-jdk-bin-1.5.0.3/include/linux -I/opt/ibm-jdk-bin-1.5.0.3/include/native_threads/include -I/usr/include     -I/var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/solver/680/unxlngppc.pro/inc/offuh -I. -I../../res -I. -fsigned-char -pipe -D_STLP_STRICT_ANSI  -fPIC -DLINUX -DUNX -DVCL -DGCC -DC300 -DPOWERPC -DCVER=C300 -DNPTL -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -DPOWERPC -DPPC -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4 -DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_ON -DGSTREAMER -DCUI -DSOLAR_JAVA -DOOD680=OOD680   -DSHAREDLIB -D_DLL_  -DMULTITHREAD  -o ../../unxlngppc.pro/slo/com_sun_star_comp_beans_LocalOfficeWindow.o com_sun_star_comp_beans_LocalOfficeWindow.c
In file included from com_sun_star_comp_beans_LocalOfficeWindow.c:42:
/opt/ibm-jdk-bin-1.5.0.3/include/jawt.h:302: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jboolean'
dmake:  Error code 1, while making '../../unxlngppc.pro/slo/com_sun_star_comp_beans_LocalOfficeWindow.obj'
'---* tg_merge.mk *---'

ERROR: Error 65280 occurred while making /var/tmp/portage/openoffice-2.0.4/work/ooo/build/OOO_2_0_4/bean/native/unix
make: *** [stamp/build] Error 1

!!! ERROR: app-office/openoffice-2.0.4 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  openoffice-2.0.4.ebuild, line 271:   Called die

!!! Build failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=ibm-jdk-bin-1.5  CLASSPATH="" JAVA_HOME="/opt/ibm-jdk-bin-1.5.0.3"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info
---------------
And here is my emerge --info:
Portage 2.1.1-r1 (default-linux/ppc/ppc32/2006.1/G4, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r9 ppc)
=================================================================
System uname: 2.6.16-gentoo-r9 ppc 7450, altivec supported
Gentoo Base System version 1.12.5
Last Sync: Tue, 17 Oct 2006 20:20:01 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=7450 -mtune=7450 -pipe -maltivec -mabi=altivec -fno-strict-aliasing"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mcpu=7450 -mtune=7450 -pipe -maltivec -mabi=altivec -fno-strict-aliasing"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.vic.keypoint.com.au http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo http://mirror.tucdemonic.org/gentoo/"
LC_ALL="C"
LINGUAS="fr en_GB"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/science /usr/portage/local/layman/ebuild-exchange"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="ppc X a52 aac aalib alsa altivec amr arts asf audiofile berkdb bitmap-fonts bonobo bzip2 cairo cddb cdf cdparanoia cdr cli cracklib crypt cups curl divx dlloader dri dts dv dvd dvdr dvdread elibc_glibc emboss encode esd expat f77 ffmepg fftw firefox flac foomaticdb fortran gdbm gif gmedia gmp gpm graphviz gs gstreamer gtk gtk2 gtkhtml hal idn ieee1394 imagemagick imlib imlib2 input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jbig jpeg jpeg2k kde kdehiddenvisibility kdexdeltas kernel_linux lcms libg++ libwww linguas_en_GB linguas_fr live lzo mad mikmod mjpeg mng mp3 mp4 mpeg musepack musicbrainz ncurses netcdf network nls nptl nptlonly ogg openal openexr opengl oss pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime rdesktop readline reflection ruby samba sdl session slang slp sndfile spell spl ssl svg szip tcl tcltk tcpd tetex theora tiff tk truetype truetype-fonts type1-fonts udev unicode usb userland_GNU vcd video_cards_fbdev video_cards_nv vorbis wmf wmp x264 xine xml xml2 xmms xorg xv xvid zeroconf zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-10-31 23:26:05 UTC
*** Bug 153626 has been marked as a duplicate of this bug. ***
Comment 13 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-11-22 05:30:18 UTC
Patch applied in ibm-jdk-bin-1.5.0.3-r1. Version 1.4.2.6 is fine on its own. Thanks everyone!
Comment 14 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-12-18 03:40:06 UTC
I was wrong, at least on amd64 the 1.4.2.6 version is broken too (x86 was fine). Fixed by the same patch in 1.4.2.7.
Comment 15 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-12-18 03:40:44 UTC
*** Bug 97421 has been marked as a duplicate of this bug. ***
Comment 16 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-12-16 10:46:15 UTC
*** Bug 146484 has been marked as a duplicate of this bug. ***