Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Problem with embedded perl

by cyborg (Initiate)
on Jul 11, 2013 at 12:40 UTC ( [id://1043712]=perlquestion: print w/replies, xml ) Need Help??

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

The application 'our-app', is a C-program that embeds the perl-interpreter (of a specific version of perl).

To be able to do this, we've build the version of perl we like to use in a specific directory:

/perl-5.12.3/

And we link perl-5.12.3/CORE/libperl.a to our-app.

We've used the application for some years now, both on Solaris as on Linux.

When the application is used on Solaris, it runs as expected, but, if used on Linux, using e.g. the MD5 perl module, we see this problem:

/perl-5.12.3/auto/Digest/MD5/MD5.so: undefined symbol: Perl_Istack_sp_ +ptr

We've also tested it with an older version of perl, (5.8.8) and we see the same problem, but the missing symbol is called Perl_Tstack_sp_ptr in that case.

We've used 'nm' to check if the missing symbol is defined in our-app: Yes it is!

Any help is appreciated

Replies are listed 'Best First'.
Re: Problem with embedded perl
by NetWallah (Canon) on Jul 11, 2013 at 13:48 UTC
    Extrapolating from what i found on the 'net, it seems that the module (MD5) was not built for the specific linux version that you are running on.

    Several 'net postings indicate that un-installing and re-installing (or re-building via cpan) the erroring modules will fix it.

                 My goal ... to kill off the slow brain cells that are holding me back from synergizing my knowledge of vertically integrated mobile platforms in local cloud-based content management system datafication.

      Thanks for your answer, but... The MD5 module (and all other standard modules) have been built in one go, together with the respective perl-versions.

      We do this building on both Solaris and Linux in the same way, and do not have the problem on Solaris machines

        I'm not just seeking wisdom: I'd even like to contribute to it :-)

        Just found the solution myself: For gcc, I need to pass option -E to the linker (so -Wl,-E to the final compiler-call). The manual page of ld (on Linux) explains why)

Re: Problem with embedded perl ( undefined symbol: Perl_Istack_sp_ )
by Anonymous Monk on Jul 12, 2013 at 08:00 UTC

    We've used 'nm' to check if the missing symbol is defined in our-app: Yes it is!

    Well it shouldn't be, all the symbols are supposed to be defined in perl516.dll

    It looks like you're mixing a threaded+unthreaded or 32bit/64bit perl somehow, or just another LD_LIBRARY_PATH issue

    Like MD5.so was compiled for a different version of perl... Perl_Istack_sp_ptr error

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1043712]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-19 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found