logofish has asked for the wisdom of the Perl Monks concerning the following question:

Hello guys, I want to connect MySQL with perl. and when I run my perl script, there is a error like this : /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr Is there anybody could tell me how to solve this problem? Thanks in advance! my system: Red Hat Linux Enterprise 5 and my perl: perl-5.8.8
  • Comment on perl: symbol lookup error:/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr

Replies are listed 'Best First'.
Re: perl: symbol lookup error:/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr
by moritz (Cardinal) on Jun 30, 2008 at 08:59 UTC
    How did you install DBI?

    And what's your code?

      I don't know if it's any help but *if* you're embedding perl in a shred libray, and *if* that library is, in tern calling "use DBI", and *if* you're developing on a unix system... then that shared library, in addition to setting up DynaLoader xs_init stuff, needs to add this to xs_init:
      #ifdef unix dlopen("libperl.so", RTLD_LAZY|RTLD_GLOBAL); #endif
      or else it won't work.