Home > Archive > PERL Miscellaneous > March 2004 > shared libraries compatibility
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
shared libraries compatibility
|
|
| Ittay Dror 2004-03-28, 10:22 pm |
| Hi,
I want to write a perl script which will run on diverse client
machines. I don't want to force the clients to install any perl
modules, so I want to package them with my script.
So I put the external modules under my app tree and add this path to
@INC when the script starts.
However, I have problems with shared libraries that come with some
modules (specifically HTML::Parser). Sometimes the runtime environment
is not the same as the compile time and I get undefined symbols
(PL_sv_undef in HTML::Parser for Parser.so). Any suggestions as to how
to resolve this issue?
Thanx,
Ittay
| |
| Gunnar Hjalmarsson 2004-03-28, 10:22 pm |
| Ittay Dror wrote:
> I want to write a perl script which will run on diverse client
> machines. I don't want to force the clients to install any perl
> modules, so I want to package them with my script.
>
> So I put the external modules under my app tree and add this path
> to @INC when the script starts.
What do you mean by "external" modules? I think you should distinguish
between standard and non-standard modules, and require that the former
are already installed (which they are in every decent Perl installation).
Since the purpose seems to be to make it easy to install your app,
you'd better not include in your package other modules but plain Perl
modules, i.e. modules that don't need to be compiled.
> However, I have problems with shared libraries that come with some
> modules (specifically HTML::Parser). Sometimes the runtime
> environment is not the same as the compile time and I get undefined
> symbols (PL_sv_undef in HTML::Parser for Parser.so). Any
> suggestions as to how to resolve this issue?
HTML::Parser is both a standard module, and a module that requires
compilation. You should simply not let it be included in your package.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
| |
| Tassilo v. Parseval 2004-03-28, 10:22 pm |
| Also sprach Gunnar Hjalmarsson:
> Ittay Dror wrote:
>
> What do you mean by "external" modules? I think you should distinguish
> between standard and non-standard modules, and require that the former
> are already installed (which they are in every decent Perl installation).
>
> Since the purpose seems to be to make it easy to install your app,
> you'd better not include in your package other modules but plain Perl
> modules, i.e. modules that don't need to be compiled.
>
>
> HTML::Parser is both a standard module, and a module that requires
> compilation. You should simply not let it be included in your package.
HTML::Parser is not a standard module. The fact that it is written in C
will indeed make distributing the script very difficult if he intends to
include all prerequisite modules. It's therefore easier to have the end
user install it on its own. Maybe providing some detailed explanations
on how to do that on the various platforms is better.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
| |
| Gunnar Hjalmarsson 2004-03-28, 10:22 pm |
| Tassilo v. Parseval wrote:
> Also sprach Gunnar Hjalmarsson:
>
> HTML::Parser is not a standard module.
Sorry, I draw a conclusion from the fact that it's included at
http://www.perldoc.com/perl5.8.0/lib/HTML/Parser.html
> The fact that it is written in C will indeed make distributing the
> script very difficult if he intends to include all prerequisite
> modules. It's therefore easier to have the end user install it on
> its own. Maybe providing some detailed explanations on how to do
> that on the various platforms is better.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
| |
| Ittay Dror 2004-03-30, 1:33 am |
| "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message news:<c45vob$4nn$1@nets3.rz.RWTH-Aachen.DE>...
> Also sprach Gunnar Hjalmarsson:
>
> HTML::Parser is not a standard module. The fact that it is written in C
> will indeed make distributing the script very difficult if he intends to
> include all prerequisite modules. It's therefore easier to have the end
> user install it on its own. Maybe providing some detailed explanations
> on how to do that on the various platforms is better.
>
> Tassilo
For various reasons I can't ask the user to install any modules on his
own. I don't really want to install HTML::Parser, but it is required
by the LWP::UserAgent package (parsing html headers). So not using
this module (and others, for the same reason) will require me to
rewrite much of the functionality by myslef, which I really don't
want.
It seems odd to me that there is no solution for such a mature
language like Perl. Has no one ever needed to deploy it in a
multi-platform environment, with no client pre installation?
Ittay
| |
| Tassilo v. Parseval 2004-03-30, 2:33 am |
| Also sprach Ittay Dror:
> "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message news:<c45vob$4nn$1@nets3.rz.RWTH-Aachen.DE>...
[color=darkred]
> For various reasons I can't ask the user to install any modules on his
> own. I don't really want to install HTML::Parser, but it is required
> by the LWP::UserAgent package (parsing html headers). So not using
> this module (and others, for the same reason) will require me to
> rewrite much of the functionality by myslef, which I really don't
> want.
>
> It seems odd to me that there is no solution for such a mature
> language like Perl. Has no one ever needed to deploy it in a
> multi-platform environment, with no client pre installation?
Obviously, there can't be one distribution that works on all platforms.
If no client has a pre-installed perl, the distribution would need to
include the perl binary. And if perl is installed, then it usually has a
standardized way to install Perl modules rather easily (ppm for
ActivePerls, CPAN.pm for the rest).
You can use PAR (see CPAN) to create a standalone distribution of your
programs that will run even on platforms without any perl. However, you
will have to create one for each intended platform (and that means, that
you need to have access to those platforms, too, since PAR cannot
"cross-create" them).
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
|
|
|
|
|