Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137742 - sci-libs/vtk-5.0.0 Java wrapper build can't find libmawt.so under Java 5.0
Summary: sci-libs/vtk-5.0.0 Java wrapper build can't find libmawt.so under Java 5.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Markus Dittrich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 08:26 UTC by Howard B. Golden
Modified: 2007-05-09 13:34 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Howard B. Golden 2006-06-23 08:26:34 UTC
While building sci-libs/vtk-5.0.0 Java wrapper under Java 5.0 (Sun JDK 1.5.0), the ebuild fails with the following error messages:

Scanning dependencies of target VTKJavaExecutable
Building CXX object Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/VTKJava.o
Linking CXX executable ../../bin/VTKJavaExecutable
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: libmawt.so, needed by /opt/sun-jdk-1.5.0/jre/lib/i386/libjawt.so, not found (try using -rpath or -rpath-link)
/opt/sun-jdk-1.5.0/jre/lib/i386/libjawt.so: undefined reference to `awt_Unlock@SUNWprivate_1.1'
/opt/sun-jdk-1.5.0/jre/lib/i386/libjawt.so: undefined reference to `awt_GetComponent@SUNWprivate_1.1'
/opt/sun-jdk-1.5.0/jre/lib/i386/libjawt.so: undefined reference to `awt_GetDrawingSurface@SUNWprivate_1.1'
/opt/sun-jdk-1.5.0/jre/lib/i386/libjawt.so: undefined reference to `awt_FreeDrawingSurface@SUNWprivate_1.1'
/opt/sun-jdk-1.5.0/jre/lib/i386/libjawt.so: undefined reference to `awt_Lock@SUNWprivate_1.1'
collect2: ld returned 1 exit status
make[2]: *** [bin/VTKJavaExecutable] Error 1
make[1]: *** [Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/all] Error 2

This has been reported upstream. See http://public.kitware.com/pipermail/vtkusers/2004-March/072375.html and the following messages in the thread.

I don't have time right now to prepare a patch or workaround, but I will try to do so this weekend.

Portage 2.1.1_pre1-r1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.16-gentoo-r8 i686)
=================================================================
System uname: 2.6.16-gentoo-r8 i686 AMD Athlon(tm) XP 2200+
Gentoo Base System version 1.12.1
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
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-r2
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/jetty/etc /opt/openjms/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/bind /var/qmail/alias /var/qmail/control /var/spool/fax/etc /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.llarian.net/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j1"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X X509 a52 aac acpi alsa amd ansi apache2 apm arts artswrappersuid artworkextra asf avi bcmath berkdb bitmap-fonts browserplugin bzip2 c++ cairo calendar caps cdda cddb cdf cdparanoia chroot cjk clamav cli cln cpudetection crypt css ctype cups curl curlwrappers dba dbase dbus dbx dio directfb djbfft dnd doc dri dv dvd dvdr dvdread dvi dynagraph ecc eds emacs emboss encode erandom esd evo examples exif fastcgi fbcon fdftk ffmpeg firefox flac flatfile font-server foomaticdb fortran ftp gb gcj gcl gd-external gdbm gif ginac glep gmp gnome gnomedb gnuplot gnustep gnutls gpm gprof graphviz gstreamer gtk gtk2 hal haskell iconv icq idea idl idn imagemagick imap imlib inifile innodb insecure-drivers ipv6 isdnlog ithreads jabber java javacomm javamail javascript jce jms jpeg jython kde kdeenablefinal kdepim kdexdeltas kerberos kexi kqemu latex ldap leim libclamav libg++ libgda libwww lids live lm_sensors log4j ltsp mad maildir mailwrapper mbox mdb memlimit mikmod mime mmap mmx motif mozdevelop mozilla moznoirc moznomail mozsvg mozxmlterm mp3 mpeg mpi mplayer mysql ncurses netboot nls nptl nptlonly nsplugin oav objc ocaml odbc ofx ogg openexr opengl oss pam parse-clocks patented pcntl pcre pda pdf pdflib perl pg-hier pg-intdatetime pic plotutils png posix postgres ppds pppd prelude pwdb python pyzor qdbm qemu-fast qmail qt qt3 qt4 quicktime rdesktop readline reflection rhino rss ruby samba sasl sdk sdl session sguil sharedmem simplexml skey slp soap sockets socks5 source spell spl sql sqlite sqlite3 sse ssl subversion svg svga syslog sysvipc t1lib tcltk tcpd tetex theora threads tidy tiff tokenizer toolbar truetype truetype-fonts type1 type1-fonts udev unicode usb utf8 verbose vhosts video_cards_ati vorbis wddx win32codecs winbind wxwindows xemacs xine xml xmlrpc xmms xorg xpm xv xvmc yahoo yv12 zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_radeon video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-06-23 08:39:42 UTC
Maybe it's compatible only with 1.4 jdk, as many packages are... which is why 1.5 is hardmasked. In that case it should depend on =virtual/jdk-1.4 though.
Comment 2 Markus Dittrich (RETIRED) gentoo-dev 2006-06-23 15:11:18 UTC
Hi Howard,

Thanks for your report and I am looking forward to your patch:)

Best,
Markus
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-06-25 06:35:04 UTC
*** Bug 137935 has been marked as a duplicate of this bug. ***
Comment 4 Sebastiaan 2006-11-17 03:07:06 UTC
I have the same issues (more similar to the duplicate bug 137935). I am not using the Sun jdk, but the blackdown 1.4.2. So the explaination that the Java version is too new does not apply, afaik.

Furthermore, it seems to compile correctly on x86, but not on amd64.

Another thing is that even when I set the jdk to Sun with java-config (&& env-update && source /etc/profile), emerge quits with the message that it has used blackdown-jdk:

 GENTOO_VM=blackdown-jdk-1.4.2  CLASSPATH="" 
 JAVA_HOME="/opt/blackdown-jdk-1.4.2.03" 
 JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""

Comment 5 Markus Dittrich (RETIRED) gentoo-dev 2007-05-01 17:05:04 UTC
Is this still an issue with vtk-5.0.3 or can this bug
be closed?

Thanks,
Markus
Comment 6 Sebastiaan 2007-05-07 14:31:55 UTC
After getting over bug 176847, I have been able to build vtk-5.0.3 with +java on both amd64, but I am getting a similar error on libawt.so on i386:

[ 59%] Building CXX object Rendering/CMakeFiles/vtkRenderingJava.dir/vtkXOpenGLRenderWindowJava.o
Linking CXX shared library ../bin/libvtkRenderingJava.so
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ljawt
collect2: ld returned 1 exit status
make[2]: *** [bin/libvtkRenderingJava.so.5.0.3] Error 1
make[1]: *** [Rendering/CMakeFiles/vtkRenderingJava.dir/all] Error 2
make: *** [all] Error 2

I am using blackdown-jdk-1.4.2-03 here (and sun-jdk-1.5.0.11 on amd64). The forums report some problems with libawt, but none offer a solution.
Comment 7 Sebastiaan 2007-05-08 06:24:53 UTC
Also works for i86 when using sun-jdk-1.5.0.11, so I guess this bug can be closed when noted that vtk does not work with blackdown.
Comment 8 Markus Dittrich (RETIRED) gentoo-dev 2007-05-08 13:06:43 UTC
(In reply to comment #7)
> Also works for i86 when using sun-jdk-1.5.0.11, so I guess this bug can be
> closed when noted that vtk does not work with blackdown.
> 

Hi Sebastiaan,

Thanks a lot for testing. Please correct me if I am wrong,
but vtk-5.0.3 current depends on =virtual/jdk-1.5* hence
blackdown-jdk-1.4* shouldn't be allowed in the first place.

Thanks,
Markus
Comment 9 Sebastiaan 2007-05-08 14:39:08 UTC
In that case there is a bug in the ebuild, since you have to set the java environment with java-config manually to a jdk-1.5. Is there not a way to enforce this, or at least inform the user?
Comment 10 Markus Dittrich (RETIRED) gentoo-dev 2007-05-09 10:34:03 UTC
(In reply to comment #9)
> In that case there is a bug in the ebuild, since you have to set the java
> environment with java-config manually to a jdk-1.5. Is there not a way to
> enforce this, or at least inform the user?
> 

The proper javac version should be determined by the java* eclasses
automagically based on what is specified in DEPEND/RDEPEND. As
a matter of fact, on all my dev boxes >=virtual/jdk-1.5 is selected
properly even if the system-vm is set to blackdown-1.4.
If you start the emerge, what do you see right below the qt3/qt4
warnings. In my case it is

* Using: sun-jdk-1.6

despite

vtk # java-config -f
blackdown-jdk-1.4.2


If your setup continues to use blackdown-jdk-1.4* could you try
plopping 

java-pkg_javac-args

right at the beginning of src_compile and see if that helps.

Thanks,
Markus
Comment 11 Sebastiaan 2007-05-09 13:16:04 UTC
To track, I do:
# java-config -S 1
Now using blackdown-jdk-1.4.2 as your generation-2 system JVM

Checkup:
# java-config -L
The following VMs are available for generation-2:
*)      Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
2)      Blackdown JRE 1.4.2.03 [blackdown-jre-1.4.2]
3)      Sun JDK 1.5.0.11 [sun-jdk-1.5]
# java-config -f
blackdown-jdk-1.4.2

Emerging:
# emerge -1av vtk
(...)
 * Using: sun-jdk-1.5

And of course builds successfully this time (without modifications)...

I guess my java subsystem needed a re-initiation or something. Seems this ebuild works fine.
Comment 12 Markus Dittrich (RETIRED) gentoo-dev 2007-05-09 13:34:59 UTC
(In reply to comment #11)
 > I guess my java subsystem needed a re-initiation or something. Seems this
> ebuild works fine.
> 

Great and thanks for testing! I'll close this bug as fixed then.
Please re-open should there be any additional java issues
like this cropping up.

Best,
Markus