Pierre Chifflier
2006-07-20 08:14:40 UTC
[please CC me, I'm not subscribed]
Hi,
I am developping an FTP server in C and use Perl as a
scripting/extension language. An interpreter is created and embedded
using perl_alloc() and friends. All seems to work (I am able to run
perl code correctly), except when trying to load some modules.
For ex, the code 'use DBI;' results in an error:
jui 19 12:14:39 <thread -1225401424> <- 'SITE test'
/home/pollux/DEL/sbin/wzdftpd: symbol lookup error:
/usr/lib/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr
What is weird is that this errors calls exit() directy, it does use
the standard perl error mechanism (and so aborting the entire program,
not only the perl interpreter).
The C code causing the problem is simple:
val = eval_pv( "use DBI;", FALSE);
The exact same code works if placed in a separate (standalone)
program, so I suspect a side effect.
I have tried many things without success, and I explained my efforts
in details here:
http://www.wzdftpd.net/wiki/index.php/Scripting_in_Perl#symbol_lookup_error
I have put as many details as possible on this page, if something is
missing just tell me.
To resume, the problem seems related to the fact that the interpreter
is created and contained in a shared library (.so), loaded via
dlopen(). The exact same code, linked differently in the program,
works perfectly.
I am really hopping someone has run into this, any help would be much
appreciated.
Thanks,
Pierre
Hi,
I am developping an FTP server in C and use Perl as a
scripting/extension language. An interpreter is created and embedded
using perl_alloc() and friends. All seems to work (I am able to run
perl code correctly), except when trying to load some modules.
For ex, the code 'use DBI;' results in an error:
jui 19 12:14:39 <thread -1225401424> <- 'SITE test'
/home/pollux/DEL/sbin/wzdftpd: symbol lookup error:
/usr/lib/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr
What is weird is that this errors calls exit() directy, it does use
the standard perl error mechanism (and so aborting the entire program,
not only the perl interpreter).
The C code causing the problem is simple:
val = eval_pv( "use DBI;", FALSE);
The exact same code works if placed in a separate (standalone)
program, so I suspect a side effect.
I have tried many things without success, and I explained my efforts
in details here:
http://www.wzdftpd.net/wiki/index.php/Scripting_in_Perl#symbol_lookup_error
I have put as many details as possible on this page, if something is
missing just tell me.
To resume, the problem seems related to the fact that the interpreter
is created and contained in a shared library (.so), loaded via
dlopen(). The exact same code, linked differently in the program,
works perfectly.
I am really hopping someone has run into this, any help would be much
appreciated.
Thanks,
Pierre