Perl interpreter linking question

Perl interpreter linking question

am 31.08.2011 04:47:33 von Patrick Galbraith

Hi all,

I have a question, not so much a mod_perl question as it is a question
about how mod_perl handles library issues, linking, etc, since it is a
perl interpreter built into Apache, and I have a similar project I'm
trying to work on for a client.

The project is that they want to have a bash builtin that is a Perl
interpreter. The idea being that they don't have to spawn separate
processes for Perl, no startup cost.

They do have this simple perl interpreter they built that does is
enabled as a bash builtin, it works fine for straight perl calls, but
when they include a perl module that is itself a C/XS perl module,
even something as simple as Env::C, it segfaults, unless of course
they do LD_PRELOAD=/path/to/libperl.so bash script_with_builtin_call.
That works, but they don't want to have the requirement of LD_PRELOAD

Have you ever heard of such a project? One way of maybe getting this
to work is to link bash to libperl.so, but even if I build bash linked
to perl, ldd doesn't show it as linked.

So, the crux of the question is: how does mod_perl do it? Mod_perl has
to be able to interpret code that loads other C-modules in turn. Is
this something that needs to be linked into Apache, or just the
interpreter?

Thanks for any tips or advice!

Regards,

Patrick