in reply to Re: Am I missing something?
in thread Am I missing something?

Perl 5.8.0 is binary incompatible with 5.8.5
Well, it's supposed to be compatible. We generally only break compatibility when the x in 5.x.y changes.

Dave.

Replies are listed 'Best First'.
Re^3: Am I missing something?
by SCOSwriter (Initiate) on May 31, 2005 at 19:38 UTC
    Before folks start jumping to conclusions please read carfully:

    I really don't think its a binary issue since I'm not even using the binary. I'm linking with the -lperl -lcrypt libs, with includes files loocated typically in /usr/lib/perl5/5.8.X/i586-linux-thread-multi/CORE

    I'm running an embedded perl script in some C++ code, using one of the commonly available example perl stack routines.
    int psCheck( const char* prog_name ) { dSP; int ret; int count = 0; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( sv_2mortal( newSVpv( prog_name, 0 ) ) ); PUTBACK; ret = call_pv("psCheck", G_SCALAR); SPAGAIN; if (ret != 1) croak("Big trouble\n" ; count = POPi; PUTBACK; FREETMPS; LEAVE; return count; }


    The errors:
    adaptermain.cpp: In function `int psCheck(const char*)': *adaptermain.cpp:365: error: `push_scope' undeclared (first use this f +unction) *adaptermain.cpp:365: error: (Each undeclared identifier is reported o +nly once *for each function it appears in.) *adaptermain.cpp:366: error: `save_int' undeclared (first use this fun +ction) *adaptermain.cpp:368: error: `markstack_grow' undeclared (first use th +is function) *adaptermain.cpp:369: error: `stack_grow' undeclared (first use this f +unction) *adaptermain.cpp:369: error: `newSVpv' undeclared (first use this func +tion) *adaptermain.cpp:369: error: `sv_2mortal' undeclared (first use this f +unction) *adaptermain.cpp:372: error: `call_pv' undeclared (first use this func +tion) *adaptermain.cpp:377: error: `croak' undeclared (first use this functi +on) *adaptermain.cpp:379: error: `sv_2iv' undeclared (first use this funct +ion) *adaptermain.cpp:381: error: `free_tmps' undeclared (first use this fu +nction) *adaptermain.cpp:382: error: `pop_scope' undeclared (first use this fu +nction)


    All the routines defined within the MACRO definitions come back as undefined. For example ENTER, which uses push_scope, my compiler (3.3.3) says is undefined. I recall this issue way back when I wrote this code and for the life of me I can't figure out what I did to fix it then.

    I have included the needed <EXTERN.h> and <perl.h> files.

    Whatever is needed to be done, I'm sure it has nothing to do with compilation options, makefiles or code since this was all fine before and I have handled then in my makefiles. It must be an environment issue which I might have been left out (LD_LIBRARY_PATH, or PATH for example).

    This does not seem to be a very generic issue, since google turns up little, that is applicable.
      My immediate suspicion is that for some reason your compiler picking up the perl.h from an older perl installation (probably pre 5.6.0).

      Can you show the exact compiler invocation that the make is doing? And do something like

      find /usr -name 'embed.h' | xargs ls -lurt
      to see which embed.h (if any) was accessed during the compilation? And with that file, do a
      grep push_scope /usr/....../embed.h

      Dave.

      tried compiling without a few flags namely:

      -DPERL_NO_SHORT_NAMES

      Not sure why I was using it and way everything was fine before, but it appears that this was the cause. Now that it compiles lets hope it still runs.