Friday, January 23, 2009

Major distribution bug in Java support for unix sockets?

If you're trying to use local unix sockets using libmatthew with a Java program (as it's the case for JOLIE and thus MetaService), you might get a similar error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/libunix-java.so: /usr/lib/libunix-java.so: undefined symbol: __stack_chk_fail_local

I get it using the libmatthew-java package from openSUSE 11.1. It looks like Ubuntu users are suffering of the same problem (there causing a bug in dbus-java). If you read their bug thread, you'll find that they appoint the problem to a compilation flag. I've tried to simply download libmatthew sources from here and compiling them: they just work (except that you have to fix the Makefile by substituting the java compiler flag -source 5.0 with -source 1.5).

This problem really looks worth going into some official update repository for each bugged distro. I have already filed a bug for openSUSE, but I cannot confirm it for other distros. Could *you* (dear reader) check for it and send an appropriate bug report? =)

UPDATE: the bug has been fixed! Thanks to all the people involved! =) If you're using openSUSE 11.1, you can fetch a backport from the Java repository (http://download.opensuse.org/repositories/Java:/packages/openSUSE_11.1/).

3 comments:

Matt Johnson said...

This is an interesting bug. I'm the upstream for this and also the Debian packager (afaict it works fine in Debian) which packages are taken for Ubuntu.

It's particularly interesting since this is the first I've seen of it. Don't people report bugs upstream these days....

(I probably won't watch for updates here, feel free to email about it if anyone knows what's going on)

Matt Johnson said...

Oh, and the Suse BTS requires creating a login or I'd have posted there too. Feel free to follow up asking to coordinate with me. I'm happy to issue and upstream patch release which all distros can use..

fmontesi said...

Hi Matt, thank you very much for commenting.

As far as I understood it, it's a problem with the stack-protector flag of gcc, as you can see in the Ubuntu bug report I've linked in my blogpost.

I've mentioned your interest in the openSUSE bug tracker as you asked. =)

(/me sends this comment also by mail)