Summary: | dev-java/sun-jdk-1.5.0.12 libXt got loaded before libXm error with AWT_TOOLKIT=MToolkit | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Volker Hemmann <volkerarmin> |
Component: | [OLD] Java | Assignee: | Java team <java> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | denilsonsa, esqualante, klaas.decanniere, volkerarmin |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6585673 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
the LD_Debug output
as the name says, without prelink this time |
Description
Volker Hemmann
2007-06-13 04:55:58 UTC
Could you please post the output of java-config-2 -L as your user (The one running the java apps) If you using sun-jdk then that is a 64bit jdk not 32. Therefore the emul packages won't do anything... Do you possibly have /usr/lib/ symlinked to /usr/lib32, so it finds it there or what? We are probably missing a dep on libXmu in sun-jdk... (stupid test, I'm sure betelgeuse has better :) grep -R libXm /opt/sun-jdk-1.5.0.12/ Binary file /opt/sun-jdk-1.5.0.12/jre/lib/i386/libawt.so matches Does it help emerging libXmu manually? Works without problems on x86. betelgeuse@pena /usr/portage/dev-java/bcprov $ GENTOO_VM="sun-jdk-1.5" triplea betelgeuse@pena /usr/portage/dev-java/bcprov $ GENTOO_VM="sun-jdk-1.5" java -version java version "1.5.0_12" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04) Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode) (In reply to comment #2) > > We are probably missing a dep on libXmu in sun-jdk... > (stupid test, I'm sure betelgeuse has better :) > grep -R libXm /opt/sun-jdk-1.5.0.12/ > Binary file /opt/sun-jdk-1.5.0.12/jre/lib/i386/libawt.so matches > betelgeuse@pena /usr/portage/dev-java/bcprov $ scanelf -n /opt/sun-jdk-1.5.0.12/jre/lib/i386/libawt.so TYPE NEEDED FILE ET_DYN libmlib_image.so,libjvm.so,libm.so.6,libdl.so.2,libjava.so,libc.so.6 /opt/sun-jdk-1.5.0.12/jre/lib/i386/libawt.so Either it's using dlopen or you are just happen to match some binary. Usually the linkage to X is done through: x11-libs/libXext-1.0.3 /opt/sun-jdk-1.5.0.12/jre/lib/i386/awt_robot /opt/sun-jdk-1.5.0.12/jre/lib/i386/motif21/libmawt.so /opt/sun-jdk-1.5.0.12/jre/lib/i386/xawt/libmawt.so Maybe Flameeyes can tell us better about the symbol usage using his scripts. Please post the output of: ldd /opt/sun-jdk-1.5.0.12/jre/lib/amd64/libfontmanager.so /opt/sun-jdk-1.5.0.12/jre/lib/amd64/libawt.so Alistair: java-config-2 -L The following VMs are available for generation-2: 1) Sun 32bit JRE 1.6.0.01 [emul-linux-x86-java-1.6] 2) WebLogic JRockit 1.6.0 [jrockit-jdk-bin-1.6] *) Sun JDK 1.5.0.12 [sun-jdk-1.5] 4) Sun JDK 1.6.0.01 [sun-jdk-1.6] Vlastimil: /usr/lib is a symlink to /usr/lib64 there is a libXmu in /usr/lib64 but it is complaining about libXm - which is not there. btw: equery belongs /usr/lib64/libXmu.so.6.2.0 x11-libs/libXmu-1.0.3 (/usr/lib64/libXmu.so.6.2.0) Petteri: ldd /opt/sun-jdk-1.5.0.12/jre/lib/ amd64/libfontmanager.so libawt.so => not found libm.so.6 => /lib/libm.so.6 (0x00002b237569f000 ) libjava.so => not found libjvm.so => not found libc.so.6 => /lib/libc.so.6 (0x00002b23758f6000 ) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000 ldd /opt/sun-jdk-1.5.0.12/jre/lib/amd64/libawt.so libmlib_image.so => not found libjvm.so => not found libm.so.6 => /lib/libm.so.6 (0x00002acb66183000) libdl.so.2 => /lib/libdl.so.2 (0x00002acb663da000) libjava.so => not found libc.so.6 => /lib/libc.so.6 (0x00002acb665de000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) (In reply to comment #6) > Vlastimil: > /usr/lib is a symlink to /usr/lib64 > there is a libXmu in /usr/lib64 but it is complaining about libXm - which is > not there. btw: > equery belongs /usr/lib64/libXmu.so.6.2.0 > x11-libs/libXmu-1.0.3 (/usr/lib64/libXmu.so.6.2.0) Yeah I was wrong, libXm comes from openmotif. Maybe installing it would make a difference? Or uninstalling the emul package just to be sure... Hi, I uninstalled emul-linux-x86-xlibs which owns /usr/lib32/openmotif-2.2/libXm.so.* and get the same error. Installing openmotif now... btw, sorry that I did not set hardware to 'amd64' I installed x11-libs/openmotif-2.2.3-r9, no change. Are you using LD_PRELOAD, prelink etc? Also, did this happen with 1.5.0.11 or not. Hi, yes, I use prelink, and no, I don't use LD_Preload and no, it did not happen with sun-jdk-1.5.0.11 or sun-jdk-1.5.0.11-r1 (In reply to comment #11) > Hi, > > yes, I use prelink, and no, I don't use LD_Preload and no, it did not happen > with sun-jdk-1.5.0.11 or sun-jdk-1.5.0.11-r1 I hope you have set PRELINK_PATH_MASK="/opt" as the prelink guide says then. when was that added? I am using prelink for ages - and I can't remember seeing that back then. So no, I don't exclude opt. But I am not sure that prelink has anything to do with the problem - I installed the jdk and tried to use it immidiatly afterwards - so prelink should not have had a chance to ruin it? (btw, why not putting everything prelink related into one config file.. why several? *sigh*) I just run prelink -au and the same thing happens. (In reply to comment #13) > when was that added? I am using prelink for ages - and I can't remember seeing > that back then. No idea, I'm not using prelink :) > So no, I don't exclude opt. > But I am not sure that prelink has anything to do with the problem - I > installed the jdk and tried to use it immidiatly afterwards - so prelink should > not have had a chance to ruin it? If I understand the guide correctly, portage will run prelink itself on the package you are installing. But cronjobs are still needed because updating library means you need to rerun prelink on everything using it. > (btw, why not putting everything prelink related into one config file.. why > several? *sigh*) > > I just run > prelink -au > and the same thing happens. Maybe removing prelink info won't give 100% same binary as before. Just to be sure, I would wipe the /opt/sun-jdk... completely and remerge it again, after creating the exlude=/opt env file, running env-update and source /etc/profile in the same terminal that's going to run emerge (better check that the variable is really in the env). Hi, I created 60prelink in /etc/env.d with PRELINK_PATH_MASK="/opt" in it. After that I quit KDE and relogged. export shows this: declare -x PRELINK_PATH_MASK="/opt" and cat /etc/prelink.conf that: -b /opt The I removed the jdk: rm -rf /opt/sun-jdk-1.5.0.12 and re-emerged it: emerge -a =dev-java/sun-jdk-1.5.0.12 I run java-config-2 -s sun-jdk.1.5 java -version java version "1.5.0_12" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_12-b04, mixed mode) triplea: Runtime link error - it appears that libXt got loaded before libXm, which is not allowed. Exception in thread "main" java.lang.InternalError: libXt loaded before libXm Please attach: LD_DEBUG=libs triplea &> libs_debug.txt another option is to also set LD_DEBUG_OUTPUT="libs_debug.txt" :) Created attachment 121958 [details]
the LD_Debug output
here is the output of LD_DEBUG=libs triplea &> libs_debug.txt
btw, when googling I found a LD_Preload tip.
With LD_PRELOAD=/usr/lib64/openmotif-2.2/libXm.so java -jar Client3.jar (Client3.jar is another affected java app), I get a segfault instead. and with LD_PRELOAD=/usr/lib32/openmotif-2.2/
libXm.so.3.0.2 java -jar Client3.jar
ERROR: ld.so: object '/usr/lib32/openmotif-2.2/libXm.so.3.0.2' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib32/openmotif-2.2/libXm.so.3.0.2' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib32/openmotif-2.2/libXm.so.3.0.2' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib32/openmotif-2.2/libXm.so.3.0.2' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib32/openmotif-2.2/libXm.so.3.0.2' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib32/openmotif-2.2/libXm.so.3.0.2' from LD_PRELOAD cannot be preloaded: ignored.
Runtime link error - it appears that libXt got loaded before libXm,
which is not allowed.
(In reply to comment #18) > Created an attachment (id=121958) [edit] > the LD_Debug output > Well we you do have prelinking in there. Let's try the following: Change PRELINKING to no in /etc/conf.d/prelink and run /etc/cron.daily/prelink This should remove prelinking from all of your binaries. Yes, prelinking is there. After running prelink -au - which should remove everything prelink does, reinstalling the jdk and seeing the same error, I turned prelink back on and prelinked everything. I just don't want to wait ages for apps to start. Created attachment 121966 [details]
as the name says, without prelink this time
Hi,
I set PRELINKING="no"
in /etc/conf.d/prelink and did sh /etc/cron.daily/prelink
afterwards.
Same error, the LD_DEBUg output file is attached.
Weird, I don't get libXt loaded, and if I LD_PRELOAD it, it still doesn't fail. But I'm on x86. OK so I finally reproduced it: AWT_TOOLKIT=MToolkit GENTOO_VM=sun-jdk-1.5 LD_PRELOAD=/usr/lib/libXt.so triplea but it's fine with AWT_TOOLKIT=XToolkit which is the default. Are you overriding it anywhere? (http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html for more info) (In reply to comment #23) > OK so I finally reproduced it: > > AWT_TOOLKIT=MToolkit GENTOO_VM=sun-jdk-1.5 LD_PRELOAD=/usr/lib/libXt.so triplea > Please attach the output of env from the shell where you start triplea Hi, good question - grep tells me and yes I do. I totally forgot that. It is a remnant of the days I played with compiz because some java apps did not work correctly without it. etc/env.d/21java-compiz AWT_TOOLKIT=MToolkit I removed that file - relogin now... report back in a moment. env from console: MANPATH=/home/energyman/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.17.50.0.16/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man:/etc/java-config/system-vm/man/:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/usr/qt/3/doc/man KDE_MULTIHEAD=false DM_CONTROL=/var/run/xdmctl LINGUAS=de TERM=xterm SHELL=/bin/bash XDM_MANAGED=/var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd,method=classic GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/energyman/.gtkrc-2.0:/home/energyman/.kde3.5/share/config/gtkrc-2.0 KDE_NO_IPV6=TRUE GTK_RC_FILES=/etc/gtk/gtkrc:/home/energyman/.gtkrc:/home/energyman/.kde3.5/share/config/gtkrc GS_LIB=/home/energyman/.fonts WINDOWID=39846020 QTDIR=/usr/qt/3 LC_ALL=de_DE@euro ANT_HOME=/usr/share/ant-core KDE_FULL_SESSION=true USER=energyman LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36: PRELINK_PATH_MASK=/opt GDK_USE_XFT=1 SESSION_MANAGER=local/energy:/tmp/.ICE-unix/25585 PAGER=/usr/bin/less CONFIG_PROTECT_MASK=/etc/env.d/java/ /etc/terminfo /etc/terminfo /etc/revdep-rebuild FLTK_DOCDIR=/usr/share/doc/fltk-1.1.7-r1/html XDG_CONFIG_DIRS=/usr/kde/3.5/etc/xdg KONSOLE_DCOP=DCOPRef(konsole-25707,konsole) DESKTOP_SESSION=kde-3.5 PATH=/usr/kde/3.5/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/opt/sancho:/usr/kde/3.5/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/qt/3/bin:/usr/games/bin KONSOLE_DCOP_SESSION=DCOPRef(konsole-25707,session-3) DISTCC_LOG= PWD=/home/energyman JAVA_HOME=/home/energyman/.gentoo/java-config-2/current-user-vm JAVAC=/home/energyman/.gentoo/java-config-2/current-user-vm/bin/javac EDITOR=/bin/nano KDE_IS_PRELINKED=1 KDE_SESSION_UID=1000 QMAKESPEC=linux-g++ KDEDIRS=/usr:/usr/local:/usr/kde/3.5:/usr/kde/3.5:/usr:/usr/local:/usr DISTCC_VERBOSE=0 DCCC_PATH=/usr/lib/distcc/bin JDK_HOME=/home/energyman/.gentoo/java-config-2/current-user-vm SHLVL=2 HOME=/home/energyman CG_COMPILER_EXE=/usr/bin/cgc XCURSOR_THEME=Silver GCC_PATH=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2 PYTHONPATH=/usr/lib64/portage/pym LESS=-R -M --shift 5 G_FILENAME_ENCODING=UTF-8 AWT_TOOLKIT=MToolkit LOGNAME=energyman GCC_SPECS= CVS_RSH=ssh XDG_DATA_DIRS=/usr/share:/usr/kde/3.5/share:/usr/local/share CLASSPATH=. DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-8IhNCz6kKh,guid=353b3dd057c6f3b71d4bfa0046701d56 PKG_CONFIG_PATH=/usr/qt/3/lib64/pkgconfig:/usr/qt/3/lib32/pkgconfig LESSOPEN=|lesspipe.sh %s INFOPATH=/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.17.50.0.16/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.1/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info DISPLAY=:0.0 USB_DEVFS_PATH=/dev/bus/usb OPENGL_PROFILE=nvidia SANE_CONFIG_DIR=/etc/sane.d G_BROKEN_FILENAMES=1 CONFIG_PROTECT=/usr/share/X11/xkb /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown /usr/share/config /usr/share/config COLORTERM= _=/usr/bin/env Hi, without AWT_TOOLKIT=MToolkit it works. I am deeply sorry for wasting your time :( I had completly forgotten that I had that set.. (but I would not even dreamt of it being responsible *sigh*). Strange, that it worked with .11 but not .12. well, at least we know for future (In reply to comment #27) > well, at least we know for future > reopening as this is a regression from an earlier version. Please report this to bugs.sun.com 1.5.0.11 fails here too if I preload libXt and use MToolkit. Even with MToolkit, libXt is not loaded if I don't preload it (or it doesn't log stuff loaded via dlopen?) so if there's a regression, it would be that on amd64 libXt gets loaded in .12 and not in .11... can someone else with amd64 reproduce? :) Also I wonder how even .11 could work with motif toolkit without motif being installed... :) Hi, hm, strange. I know for sure that earlier 1.5.0 releases worked fine - because I am using a java based chat client almost every day - and I had that AWT_TOOLKIT=MToolkit set for ages. So whatever black magic happend on AMD64, for me it stopped working with .12 And I did not had openmotif installed. Hi, I just opend two bug reports, one about the 1.5.0_12 libXt... error and one about the 1.6.0_1 crash at bugs.sun.com Thanks, please provide the URL's here (fill the URL field) when they confirm the reports and send you the URL's. Just to note: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4638291 is an upstream bug that sound very similar to this. It is quite old tho. *** Bug 186672 has been marked as a duplicate of this bug. *** Hi, I had a pretty long and good email exchange with a nice person from sun. The bug got added to their database. This link should become 'alive' in the next two days: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6585673 I'm the reporter for the dupe bug 186672. I've posted a similar issue to My.Opera forums: http://my.opera.com/community/forums/topic.dml?id=187461 Whenever I try to open a Java applet inside Opera, The following message get printed on terminal: Runtime link error - it appears that libXt got loaded before libXm, which is not allowed. This is happening for some months for me. It happened in 1.5.0_11 and also on previous versions (I guess; but sorry, I don't remember when this started to happen). Strange enough, this only happens when running Java applets inside Opera browser. These applets works flawlessly under Firefox. I don't run many Java apps, but I tried "javaws" and "jrisk" and they both work. I know that, sometime in past, java applets used to work in Opera. For more info on my system, look at bug 186672. The issue described in this bug is slightly different from my issue, but I think the fix from upstream should fix both issues at same time. *** Bug 205802 has been marked as a duplicate of this bug. *** *** Bug 181617 has been marked as a duplicate of this bug. *** Build: srm-srv-r4b:~/Desktop # ls opera-10.10.gcc4.qt4.x86_64.rpm srm-srv-r4b:~/Desktop # srm-srv-r4b:~ # opera ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored. /usr/lib/opera/opera: symbol lookup error: /usr/lib/opera/opera: undefined symbol: _ZN12QApplicationC1ERiPPci opera: Fatal error on creating Qt application object srm-srv-r4b:~ # Able to see similar issues on SLES10-64 bit machine JDK-1.5 was EOL'd and removed a while ago. Consider using oracle-jdk-bin-1.7, 1.8 or IcedTea instead. |