develooper Front page | perl.perl5.porters | Postings from December 2013

Re: Option to use and create "unique" library names

Thread Previous | Thread Next
Brian Fraser
December 3, 2013 00:05
Re: Option to use and create "unique" library names
Message ID:
On Mon, Dec 2, 2013 at 8:46 AM, Irek Szczesniak <>wrote:

> On Wed, Nov 20, 2013 at 6:41 AM, Brian Fraser <> wrote:
> > Background:
> > Android's linker has some bugg^Wunusual behavior, in that it caches
> loaded
> > libraries, but only uses the basename in the cache.  That means that,
> > as far as its dlopen() is concerned, the libraries for Hash::Util and
> > List::Util,
> > both of which are named, are the same.
> >
> > What we did in the android branch was introduce an option,
> d_libname_unique,
> > that when defined, has Makemaker create an "unique" libname for each
> module,
> > and teaches XSLoader and Dynaloader to look for those; So for example,
> > Hash/Util/ becomes Hash/Util/
> >
> > The changes for this are in
> >
> > and can be tested by compiling perl with -Dd_libname_unique.
> >
> > Any objections to this going in?
> Yes, I do have one. I think this should be fixed in Android and not be
> the burden of every damn platform or language to fix. There are more
> than perl which will stumble over this, and IMHO the Google staff who
> invented this should get the whips where it hurts.

Idealism won't get perl working. We already do the libname fixup for other
two platforms. We jump through a monstrous amount of hoops for most
platforms that we support. Why you think that drawing the line on this one
would be meaningful is beyond me.
Moreso, I'd rather have perl working on every version of Android out there
*now*, rather than sitting around, twiddling my thumbs until -- if ever --
google fixes bionic's linker.
But even that's useless. I can write an Android app using perl with this
workaround (...and some others). By your approach, I'd have to wait for one
hypothetical version that won't get any significant market share in at
least a couple of years.

Google already knows about the bug. You're free to nag them about it. In
fact, Android is open source, so you're free to file a patch.

> If we work around this issue for perl than Google is likely never
> fixing their broken linker.

What do you think this would accomplish? You'd be "telling" Google that a
language that they don't support and doesn't quite work on their system...
Still doesn't work?

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About