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

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

Thread Previous
From:
H.Merijn Brand
Date:
November 20, 2013 11:05
Subject:
Re: Option to use and create "unique" library names
Message ID:
20131120120444.5094890b@pc09.procura.nl
On Wed, 20 Nov 2013 07:43:11 -0200, Brian Fraser <fraserbn@gmail.com>
wrote:

> On Wed, Nov 20, 2013 at 6:09 AM, H.Merijn Brand <h.m.brand@xs4all.nl> wrote:
> 
> > On Wed, 20 Nov 2013 03:41:55 -0200, Brian Fraser <fraserbn@gmail.com>
> > 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 Util.so, 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/Util.so
> > > becomes Hash/Util/Perl_Hash_Util.so.
> > >
> > > The changes for this are in
> > > http://perl5.git.perl.org/perl.git/shortlog/refs/heads/hugmeir/d_libname_uniqueand
> > > can be tested by compiling perl with -Dd_libname_unique.
> >
> > The change is by far complete, as it is missing
> > • documentation in Porting/Glossaary
> 
> That file says that it's generated by metaconfig?
> https://github.com/castaway/metaconfig/commit/8aca8823163546bf8589275d60d3a4742c7c888chas

Yes, but the snippet you want to add in Configure comes from the same
meta-unit that holds that documentation.

If you want that code in Configure, I will create you a meta-unit that
not only holds that code, but also holds the documentation I referred
to. Both Configure and Porting/Glossary will be regenerated, but *only*
contain the new code if there is a reference to that code (the
regeneration skips unused meta-units)

> the changes for metaconfig, including the description, although the
> branch I pushed has a slightly reworded message for Configure, to avoid
> ruffling people's feathers.
>
> > • documentation in config_h.SH (might not be required in this case)
> 
> Not necessary, it's not a C-visible symbol.
> 
> > • entries in Porting/config*
> 
> Should I only add it to Porting/config.sh, or to all the canned config
> files?

run the script, and it'll show you what to add where :)

> > • entry in uconfig.h
> 
> > run Porting/checkcfgvar.pl
> 
> I did this, both before and after modifying Porting/config.sh, and with
> perls with/without -Dd_libname_unique, and nothing happened. --tap says
> that it's all good. I imagine that's not actually true, since the other
> canned config files are missing the value?

Nothing happened, as there is no entry in any of the used files to the
new variable. First check if it is set in config.sh after Configure,
then check if it is set in uconfig.sh and/or Porting/config.sh

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.19   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About