Dear Folks, I am writing to thank you for encouragement and help this list has been to me, and to ask for your comments on this situation.
A small application (call it a copy) based on the persistent.c example from perlembed was working quite happily (modulo threaded Perls) for Perl 5.005_03, 5.6.1 and 5.8.0. On 5.8.1 however, it will not compile, reporting [EMAIL PROTECTED] contrib]$ make mini_epn perl -MExtUtils::Embed -e xsinit gcc -g -O2 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.1/i386-linux-thread-multi/CORE -DHAVE_CONFIG_H -c perlxsi.c `perl -MExtUtils::Embed -e ccopts` gcc -g -O2 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.1/i386-linux-thread-multi/CORE -DHAVE_CONFIG_H -c mini_epn.c `perl -MExtUtils::Embed -e ccopts` mini_epn.c: In function `main': mini_epn.c:116: error: `my_perl' undeclared (first use in this function) mini_epn.c:116: error: (Each undeclared identifier is reported only once mini_epn.c:116: error: for each function it appears in.) make: *** [mini_epn] Error 1 [EMAIL PROTECTED] contrib]$ uname -a Linux kimba.aipo.gov.au 2.4.19-16mdk #1 Fri Sep 20 18:15:05 CEST 2002 i686 unknown unknown GNU/Linux [EMAIL PROTECTED] contrib]$ perl -v | head -3 This is perl, v5.8.1 built for i386-linux-thread-multi (with 1 registered patch, see perl -V for more detail) [EMAIL PROTECTED] contrib]$ The difference between code that compiles (and runs) on the 5.8.1 system is _only_ the name of the Perl interpreter variable, [EMAIL PROTECTED] contrib]$ diff -u mini_epn.c.ok mini_epn.c --- mini_epn.c.ok 2004-02-10 19:01:03.000000000 +1100 +++ mini_epn.c 2004-02-10 19:01:23.000000000 +1100 @@ -23,7 +23,7 @@ #define MAX_COMMANDLINE_LENGTH 160 -static PerlInterpreter *my_perl = NULL; +static PerlInterpreter *perl = NULL; int main(int argc, char **argv, char **env){ @@ -41,17 +41,17 @@ int pclose_result; int i; - if((my_perl=perl_alloc())==NULL){ + if((perl=perl_alloc())==NULL){ snprintf(buffer,sizeof(buffer),"Error: Could not allocate memory for embedded Perl interpreter!\n"); buffer[sizeof(buffer)-1]='\x0'; printf("%s\n", buffer); exit(1); } - perl_construct(my_perl); - exitstatus=perl_parse(my_perl,xs_init,2,embedding,NULL); + perl_construct(perl); + exitstatus=perl_parse(perl,xs_init,2,embedding,NULL); if(!exitstatus){ - exitstatus=perl_run(my_perl); + exitstatus=perl_run(perl); while(printf("Enter file name: ") && fgets(command_line,sizeof(command_line),stdin)){ @@ -114,7 +114,7 @@ } PL_perl_destruct_level = 0; - perl_destruct(my_perl); - perl_free(my_perl); + perl_destruct(perl); + perl_free(perl); exit(exitstatus); } [EMAIL PROTECTED] contrib]$ On 'another' system (different compiler, perl), stan> perl -v | head -3 This is perl, version 5.005_03 built for i386-freebsd stan> cd contrib stan> make mini_epn perl -MExtUtils::Embed -e xsinit gcc -g -O2 -I/usr/libdata/perl/5.00503/mach/CORE -DHAVE_CONFIG_H -c perlxsi.c `perl -MExtUtils::Embed -e ccopts` gcc -g -O2 -I/usr/libdata/perl/5.00503/mach/CORE -DHAVE_CONFIG_H -c mini_epn.c `perl -MExtUtils::Embed -e ccopts` gcc -g -O2 -I/usr/libdata/perl/5.00503/mach/CORE -DHAVE_CONFIG_H perlxsi.o mini_epn.o `perl -MExtUtils::Embed -e ccopts -e ldopts` -o mini_epn stan> uname -a FreeBSD stan.aipo.gov.au 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #24: Tue Dec 23 21:02:27 EST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/STAN i386 stan> and this is I think is the only difference in the code, static PerlInterpreter *perl = NULL; /* on the FreeBSD system */ and on a 5.8.0 system (FreeBSD 5.8.0 Perl port). pc09011> make mini_epn /usr/bin/perl -MExtUtils::Embed -e xsinit gcc -g -O2 -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include -DHAVE_CONFIG_H -c perlxsi.c `/usr/bin/perl -MExtUtils::Embed -e ccopts` gcc -g -O2 -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include -DHAVE_CONFIG_H -c mini_epn.c `/usr/bin/perl -MExtUtils::Embed -e ccopts` gcc -g -O2 -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include -DHAVE_CONFIG_H perlxsi.o mini_epn.o `/usr/bin/perl -MExtUtils::Embed -e ccopts -e ldopts` -o mini_epn pc09011> perl -v | head -3 This is perl, v5.8.0 built for i386-freebsd pc09011> uname -a FreeBSD pc09011.aipo.gov.au 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #20: Tue Dec 23 21:02:00 EST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/STAN i386 pc09011> grep static mini_epn.c static PerlInterpreter *perl = NULL; pc09011> I am completely bamboozled by these results and would appreciate any comments. Yours stupidly, -- ------------------------------------------------------------------------ Stanley Hopcroft ------------------------------------------------------------------------ '...No man is an island, entire of itself; every man is a piece of the continent, a part of the main. If a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friend's or of thine own were. Any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee...' from Meditation 17, J Donne.