[vlc-devel] reenabling java bindings

Rémi Denis-Courmont rdenis at simphalempin.com
Fri Dec 12 14:33:46 CET 2008

On Fri, 12 Dec 2008 09:03:08 +0100, Filippo Carone <filippo at carone.org>
> There's surely something I'm missing in the way java loads libraries,
> since checking the java source code I've seen it uses dlopen (are there
> any other means to load a library?).

Link at build time, and let the run-time linker do the job.
That's how VLC loads libvlc, and how libvlc loads libvlccore.

> Using dlopen should ensure that when libvlccore is initialized


> and loads plugins, no runtime linking problems should occur,

If and _only_ if libvlc(core) is loaded in the global namespace

> but the opposite happens.

With RTLD_LOCAL, it cannot work.

> So I ask to make that plugin linking against libvlccore configurable
> with a specific switch from configure and disabled by default, until
> loading from java is sorted out (I locally reverted the changes on that
> commit, and the java bindings work again as expected). I will proceed
> with this modification after a general agreement on this change.

I disagree. The way plugins link back into libvlccore makes this approach
fundamentally unsafe: a plugin must link against the libvlccore image that
loaded the plugin. We have had multiple reports of obnoxious crashes due to
that, and that's not counting those people who ran away without bothering
to report the problem.

And then, there is the dummy build-time dependency hell (not nice for us
developpers) and breakage of libvlc(core) static linking.

Rémi Denis-Courmont

More information about the vlc-devel mailing list