Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269347 - <www-client/opera-10.50 java support on amd64
Summary: <www-client/opera-10.50 java support on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 275423 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-11 00:02 UTC by shade
Modified: 2010-07-02 17:01 UTC (History)
7 users (show)

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


Attachments
Add 'server' subdir to LD_LIBRARY_PATH (opera-amd64-java.diff,565 bytes, patch)
2009-07-10 12:44 UTC, Michał Górny
Details | Diff
Patch adding necessary directory into install.sh (opera-javapath.patch,765 bytes, patch)
2009-07-29 21:41 UTC, Michał Górny
Details | Diff
Diff to add the patch into ebuild (opera-10.00_pre4502.ebuild.diff,408 bytes, patch)
2009-07-29 21:42 UTC, Michał Górny
Details | Diff
Look for amd64 JRE/JDK on amd64 (opera-sunjava-machine.patch,826 bytes, patch)
2009-08-27 13:43 UTC, Michał Górny
Details | Diff
Look for amd64 JRE/JDK on amd64 (fixed indent) (opera-sunjava-machine.patch,829 bytes, patch)
2009-08-27 13:44 UTC, Michał Górny
Details | Diff
Diff to add patches into the ebuild (opera-10.00_rc4570.ebuild.diff,457 bytes, patch)
2009-08-27 13:47 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description shade 2009-05-11 00:02:38 UTC
Java sucks :) yea, its plugin isnt working on amd64 opera.
So few steps hot to make it work in dirty way. (dunno if ill brake something, im just using java for that plugin not anything more!)

checked with opera 10.00_pre4340 and sun-jdk-1.6.0.13


Reproducible: Always

Steps to Reproduce:
1.ln -s /opt/sun-jdk-1.6.0.13/jre/lib/ /opt/sun-jdk-1.6.0.13/jre/lib/amd64/ #this will make opera find jbjwm.so
2.ln -s /opt/sun-jdk-1.6.0.13/jre/lib/amd64/server/libjvm.so /opt/sun-jdk-1.6.0.13/jre/lib/amd64/ #same here
3. go to tools> preferences >content> enable java, click java options and set path to /opt/sun-jdk-1.6.0.13/jre/lib/amd64/ then click volidate #standard .gentoo/java-config will not work or setting it to /opt/sun-jdk-1.6.0.13 where points that link.

Actual Results:  
We can se ugly dancing suns pupet on http://www.java.com/en/download/help/testvm.xml
Comment 1 shade 2009-05-11 00:04:12 UTC
i would forget. Step 4 restart opera! Without restarting it will not work.
Comment 2 Serkan Kaba (RETIRED) gentoo-dev 2009-05-11 08:06:14 UTC
How does Opera run Java, if its via Sun's java plugin 64 bit is only supported for Firefox 3.
Comment 3 shade 2009-05-11 08:11:41 UTC
Yes its via sun's java plugin for 64 bit system. They say that plugin is only suppoerted on FF3 but konqueror runs it to without any problem (without doing any dirty stuff). Plugin is plugin. Opera have just problem with paths.

java-config-2 -L
The following VMs are available for generation-2:
*)	Sun JDK 1.6.0.13 [sun-jdk-1.6]
Comment 4 Serkan Kaba (RETIRED) gentoo-dev 2009-05-11 10:36:41 UTC
(In reply to comment #3)
> konqueror runs it to without any problem (without doing
> any dirty stuff). Plugin is plugin. Opera have just problem with paths.
No konqueror doesn't use the plugin, it runs a JVM process.
Comment 5 Alistair Bush (RETIRED) gentoo-dev 2009-05-11 11:02:23 UTC
$ ldd $(find ~/.gentoo/java-config-2/current-user-vm/ -iname '*libjava.so')
        linux-vdso.so.1 =>  (0x00007fff99ffe000)                                                                   
        libjvm.so => not found                                                                                     
        libverify.so => /home/alistair/.gentoo/java-config-2/current-user-vm/jre/lib/amd64/libverify.so (0x00007f4c91cef000)                                                                                                                          
        libnsl.so.1 => /lib/libnsl.so.1 (0x00007f4c91ad7000)                                                               
        libdl.so.2 => /lib/libdl.so.2 (0x00007f4c918d3000)                                                                 
        libc.so.6 => /lib/libc.so.6 (0x00007f4c9157d000)                                                                   
        /lib64/ld-linux-x86-64.so.2 (0x00007f4c91f5b000)                                                                   
        libjvm.so => not found 

and then

$ LD_LIBRARY_PATH="/opt/sun-jdk-1.6.0.14_beta6/jre/lib/amd64/server/" opera

and boom,  we have a java applet clock here
http://www.opera.com/media/applets/clock/

Sadly this is systematic of a far larger problem.  A completely java one.

Comment 6 Alistair Bush (RETIRED) gentoo-dev 2009-05-11 11:04:33 UTC
I should also note, that I set up the opera to point to the java plugin at
/opt/sun-jdk-1.6.0.14_beta6/jre/lib/amd64/

sorry for the bugspam.

Comment 7 shade 2009-05-11 12:59:36 UTC
Ok, i was all wrong, but my action made good reaction. Thx Alistair for less dirty way. Can you say are java applets crashing when using them on more than one window (not tabs, file>new window) with u14b6?
Comment 8 Jack 2009-05-26 20:35:08 UTC
jack@jacktop ~ $ opera --debugjava
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.
opera: X Shared memory extension is not available. ZPixmap not supported
opera: [java] failed to load libawt.so: libawt.so: cannot open shared object file: No such file or directory
opera: [java] failed to load libjawt.so: libjawt.so: cannot open shared object file: No such file or directory
opera: [java] failed to load a suitable awt library.  Java will not work.
which: no soundwrapper in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin)
jack@jacktop ~ $ LD_LIBRARY_PATH="/opt/sun-jdk-1.6.0.13/jre/lib/amd64/server/" opera --debugjava
ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.
opera: X Shared memory extension is not available. ZPixmap not supported
opera: [java] failed to load libawt.so: libawt.so: cannot open shared object file: No such file or directory
opera: [java] failed to load libjawt.so: libjawt.so: cannot open shared object file: No such file or directory
opera: [java] failed to load a suitable awt library.  Java will not work.
which: no soundwrapper in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin)
Comment 9 Jack 2009-05-27 11:09:50 UTC
my comment #8 is missing the first part.

i was going to write:
i still have problems with opera and java (64 bit)
i am using opera-9.64 and sun-jre-1.6.0.13

and i get the following error:
opera --debugjava
ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.
opera: X Shared memory extension is not available. ZPixmap not supported
opera: [java] failed to load libawt.so: libawt.so: cannot open shared object
file: No such file or directory
opera: [java] failed to load libjawt.so: libjawt.so: cannot open shared object
file: No such file or directory
opera: [java] failed to load a suitable awt library.  Java will not work.
which: no soundwrapper in
(/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin)
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-07-10 12:44:02 UTC
Created attachment 197452 [details, diff]
Add 'server' subdir to LD_LIBRARY_PATH
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-07-10 12:47:16 UTC
With above patch applied to /usr/bin/opera, it finds the library easily.

(In reply to comment #2)
> How does Opera run Java, if its via Sun's java plugin 64 bit is only supported
> for Firefox 3.

Running applets via plugin is only dirty hack. Opera instead of using such hacks uses the JRE libraries.
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-07-29 21:41:07 UTC
Created attachment 199601 [details, diff]
Patch adding necessary directory into install.sh

What's interesting ${S}/opera script has javapath correctly updated while ${S}/install.sh does not. Uploading patch to update it.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-07-29 21:42:51 UTC
Created attachment 199602 [details, diff]
Diff to add the patch into ebuild
Comment 14 Antek Grzymała (antoszka) 2009-08-27 12:14:09 UTC
Should applying the ebuild patch (and having the other patch in ${FILESDIR}) make java working on opera-10.00_rc4570 without any additional steps? It doesn't work for me. I get the following when launching opera:

$ 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.
opera: libjava.so: cannot open shared object file: No such file or directory

This stuff (once it's working correctly) should definitely be integrated into the tree.
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 12:35:24 UTC
(In reply to comment #14)
> Should applying the ebuild patch (and having the other patch in ${FILESDIR})
> make java working on opera-10.00_rc4570 without any additional steps?

You need to set correct java directory inside Opera too, and then restart Opera.

It'd be a lot easier if eselect-java (or sth related) could create some symlink to current java version so that such symlink could be used within Opera. Currently you have to update the javadir on each java update.
Comment 16 Antek Grzymała (antoszka) 2009-08-27 12:55:55 UTC
(In reply to comment #15)

> You need to set correct java directory inside Opera too, and then restart
> Opera.
> 
> It'd be a lot easier if eselect-java (or sth related) could create some symlink
> to current java version so that such symlink could be used within Opera.
> Currently you have to update the javadir on each java update.

I did, and the validation button on the Opera preferences window says the path is correct. Still no go for the test at: http://www.java.com/en/download/help/testvm.xml – says “Something is wrong. Java is not working.”
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 13:12:14 UTC
(In reply to comment #15)
> You need to set correct java directory inside Opera too, and then restart
> Opera.
> 
> It'd be a lot easier if eselect-java (or sth related) could create some symlink
> to current java version so that such symlink could be used within Opera.
> Currently you have to update the javadir on each java update.

Ok, I was wrong two times. First, you should be able to leave out java path in Opera empty, and then the wrapper should be able to find it using environment vars. But that is broken and works only for x86, I'll supply a patch for that in a while.

Second, eselect java-vm creates symlink to selected JRE/JDK, and you can find it in /etc/java-config-2/current-system-vm.

(In reply to comment #16)
> I did, and the validation button on the Opera preferences window says the path
> is correct. Still no go for the test at:
> http://www.java.com/en/download/help/testvm.xml – says “Something is wrong.
> Java is not working.”

Did you restart Opera and turned on java support again (F12, enable java) — Opera disables it totally each time it isn't able to run java.
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 13:43:15 UTC
Created attachment 202398 [details, diff]
Look for amd64 JRE/JDK on amd64

And that's another patch, it makes Opera wrapper script look for libjava.so in 'amd64' on x86_64 Linux and BSDs (I've tested it only on Linux).

With this patch, user should no longer have to provide Java path on amd64 in Opera as Opera will be able to find the current VM if the path isn't set.

Note that after applying this patch, 64-bit Opera won't find 32-bit Java libraries automagically anymore.
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 13:44:55 UTC
Created attachment 202400 [details, diff]
Look for amd64 JRE/JDK on amd64 (fixed indent)

Fixed to match upstream indent style.
Comment 20 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 13:47:11 UTC
Created attachment 202401 [details, diff]
Diff to add patches into the ebuild
Comment 21 Antek Grzymała (antoszka) 2009-08-27 15:19:19 UTC
(In reply to comment #20)

> Created an attachment (id=202401) [edit]
> Diff to add patches into the ebuild

I tried your latest modifications and it still doesn't work. The „Java path” field now validates correctly with the default path; about:plugins shows:

Java(TM) Plug-in 1.6.0_16
/usr/lib64/nsbrowser/plugins/javaplugin.so

But java applets won't run. Obviously I did turn on „[x] Enable Java” in preferences → advanced → content (otherwise I wouldn't be able to validate Java path).
Comment 22 Antek Grzymała (antoszka) 2009-08-27 15:25:15 UTC
When I launch an Opera instance [ ] Enable Java is deselected and I have to re-enable it manually each time. As to debugging I only get the following:

$ opera --debugjava
opera: [Java] Adding '/etc/java-config-2/current-system-vm/jre/lib/plugin.jar' to classpath.

Runtime link error - it appears that libXt got loaded before libXm,
which is not allowed.
Comment 23 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 17:54:39 UTC
(In reply to comment #21)
> Java(TM) Plug-in 1.6.0_16
> /usr/lib64/nsbrowser/plugins/javaplugin.so

Forget about the plugin, Opera doesn't require nor use it.

(In reply to comment #22)
> Runtime link error - it appears that libXt got loaded before libXm,
> which is not allowed.

Do you have any specific LD_PRELOAD or something?
Comment 24 Antek Grzymała (antoszka) 2009-08-27 18:00:03 UTC
No, definitely not. Any other debug info you'd like me to paste in?
Comment 25 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-08-27 20:28:53 UTC
(In reply to comment #24)
> No, definitely not. Any other debug info you'd like me to paste in?

I don't really have an idea what could it be. I've tested Qt4-shared, Qt3-shared & Qt4-bundled, and java works in all of them.

Which xorg version do you have?
Comment 26 Dawid Stawiarski 2009-09-03 13:23:35 UTC
it's funny, but if you take opera tarball from distfiles, unpack it (in user's home dir for example), and run ./opera (without running install.sh first) java plugin works out of the box. however, the same opera installed with gentoo's ebuild fails to load libjvm.so, as reported above.

tested on: opera-10.00 & jdk-1.6.0_u16.
Comment 27 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-09-03 13:52:30 UTC
(In reply to comment #26)
> it's funny, but if you take opera tarball from distfiles, unpack it (in user's
> home dir for example), and run ./opera (without running install.sh first) java
> plugin works out of the box. however, the same opera installed with gentoo's
> ebuild fails to load libjvm.so, as reported above.

As I mentioned before, we're using install.sh to generate wrapper script instead of using included one, and the template inside install.sh is outdated.
Comment 28 Jeroen Roovers (RETIRED) gentoo-dev 2009-09-03 14:26:17 UTC
OK, so maybe some changes of ours to the wrapper script /usr/bin/opera are breaking Java support?
Comment 29 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-09-03 14:39:29 UTC
(In reply to comment #28)
> OK, so maybe some changes of ours to the wrapper script /usr/bin/opera are
> breaking Java support?

No, this is upstream bug where template inside install.sh is outdated. I've reported both of issues related to the bug as DSK-262808 & DSK-262815.
Comment 30 Antek Grzymała (antoszka) 2009-09-03 16:18:08 UTC
> > No, definitely not. Any other debug info you'd like me to paste in?
> 
> I don't really have an idea what could it be. I've tested Qt4-shared,
> Qt3-shared & Qt4-bundled, and java works in all of them.
> 
> Which xorg version do you have?

x11-base/xorg-x11-7.4
x11-base/xorg-server-1.6.3

I don't suppose this should make a difference though.
Comment 31 Antek Grzymała (antoszka) 2009-09-03 16:31:24 UTC
I tried your two patches on the final release of opera-10.00 (build 4585 without Unite) and also moved from qt-static (which I had when making my previous comments) to qt-shared (because of another unrelated bug in the static version). When I try loading a page with an applet now, the whole program just bombs out and I'm left with the crash report tool.

So much for java (and flash for that matter which *never* seems to work quite correctly even if it does at all)...
Comment 32 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-09-03 16:36:04 UTC
@Antek: One more question (I think I missed that one): which JRE/JDK are you using?
Comment 33 Antek Grzymała (antoszka) 2009-09-03 16:57:41 UTC
(In reply to comment #32)
> @Antek: One more question (I think I missed that one): which JRE/JDK are you
> using?

dev-java/sun-jdk, I tried both 1.6.0.15 and 1.6.0.16.
Comment 34 Antek Grzymała (antoszka) 2009-09-03 17:29:35 UTC
Here's the crash as seen from the shell.

$ opera
Warning: Cannot convert string "MetaCtrl<Key>Insert" to type VirtualBinding
opera [crash logging]: CRASH!!
/opt/opera/lib/opera/10.00/opera got signal SIGSEGV at address 7FF158E6F7DF

Log was created here:
/var/tmp/crash20090903192713.txt

(operapluginwrapper-native:21558): Gdk-WARNING **: GdkWindow 0x10000bd unexpectedly destroyed

(operapluginwrapper-native:21558): Gdk-WARNING **: GdkWindow 0x10000bc unexpectedly destroyed

(operapluginwrapper-native:21558): Gdk-WARNING **: GdkWindow 0x10000bb unexpectedly destroyed

(operapluginwrapper-native:21558): Gdk-WARNING **: GdkWindow 0x10000b8 unexpectedly destroyed
The program 'operapluginwrapper-native' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 23702 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Killed
Comment 35 Jeroen Roovers (RETIRED) gentoo-dev 2009-09-22 14:21:28 UTC
*** Bug 275423 has been marked as a duplicate of this bug. ***
Comment 36 Pun 2009-12-02 19:54:23 UTC
I managed to get http://www.opera.com/media/applets/clock/ show the applet by symlinking  sudo ln -s /opt/sun-jdk-1.6.0.17/jre/lib/amd64/server /opt/sun-jdk-1.6.0.17/jre/lib/amd64/client and setting the java path in Opera to /opt/sun-jdk-1.6.0.17/jre/lib/amd64 . I guess opera always tries to use the client vm which does not exist for amd64.
Comment 37 Michael Weber (RETIRED) gentoo-dev 2010-01-05 10:31:45 UTC
if you have sun-jdk, just add an /etc/cron.daily/opera-env containing
 #!/bin/sh
 echo LDPATH="`find /opt/*jdk* \( -name libjvm.so -o -name libawt.so \) \ 
  -exec dirname \{\} \; | sort -r | uniq | tr "\n" ":"`" > /etc/env.d/99xmw
 env-update

This will find the currently installed version of jdk and add the correct 
/opt/sun-jdk-.../jre/lib/amd64/server/ dir to ld.so.conf/cache. This is more reliable in case of jdk updates as manual created env.d files.
Comment 38 marek wojciechowski 2010-05-04 19:36:33 UTC
On amd64 java do not work for me in opera-10.53_pre6330 despite java plugin  seems to be properly loaded (it is visible on opera plugin list). When i try to use this plugin opera says it's not loaded (sic!)

I have jre-1.6.0.

Someone knows the problem? And maybe also solution...
Comment 39 Michael Weber (RETIRED) gentoo-dev 2010-05-06 21:57:38 UTC
(In reply to comment #38)
> Someone knows the problem? And maybe also solution...

Can you please provide any test-URL for other to reproduce the problem? 

Comment 40 Jeroen Roovers (RETIRED) gentoo-dev 2010-05-06 22:55:19 UTC
Ew, this bug is becoming more and more messy. It's originally about versions up to 10.10, which do NOT use the Java plugin but use Java directly (which is a problem if the path isn't properly set).

>=10.50 does use the Java plugin but it isn't working properly yet. According to the latest information[1], this is a known issue, which makes comment #38 irrelevant to this bug report. (Filing a new bug report won't help either - there's nothing I can do about it and Opera developers are already aware of the issue.)

This bug report will likely be fixed when something >10.50 finally goes final.


[1] http://my.opera.com/desktopteam/blog/2010/05/05/startup-crashes-be-gone
Comment 41 marek wojciechowski 2010-05-09 15:18:55 UTC
it really seems, this is upstream problem, i didn't realize this, sorry for messing ...
Comment 42 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-02 16:30:30 UTC
Could anyone test whether Java support now works out of the box on amd64?
Comment 43 shade 2010-07-02 16:35:20 UTC
(In reply to comment #42)
> Could anyone test whether Java support now works out of the box on amd64?
> 

Works fine and fully out of the box. Even better than in firefox.
Comment 44 Ole Markus With (RETIRED) gentoo-dev 2010-07-02 16:39:32 UTC
Seems to be working fine!
Comment 45 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-02 17:01:49 UTC
Thanks.