Mailing List Archive

Can't build Embperl 1.3b4 with threaded perl5.6.0
I'm trying to build Embperl with a threaded perl5.6.0. I get the following
error while running make:

epeval.c: In function `EMBPERL_EvalDirect':
epeval.c:45: `thr' undeclared (first use in this function)
epeval.c:45: (Each undeclared identifier is reported only once
epeval.c:45: for each function it appears in.)
epeval.c: In function `EvalAll':
epeval.c:132: `thr' undeclared (first use in this function)
epeval.c: In function `EvalAllNoCache':
epeval.c:248: `thr' undeclared (first use in this function)
epeval.c: In function `CallCV':
epeval.c:404: `thr' undeclared (first use in this function)
make: *** [epeval.o] Error 1

I didn't find anything in the embperl list archives about this but there were a
couple messages in the mod_perl archives, namely:

http://forum.swarthmore.edu/epigone/modperl/swenkulstal/uk7btq6cjh5.fsf@omni.uio
.no

which suggests adding dTHR; to the beginning of any function that results in
this error. I try adding dTHR; to EvalDirect in epeval.c but still ended up
with the same error.


--
Jason Bodnar + jbodnar@team-linux.com + Team Linux

Bart: I had a fight with Milhouse.

Homer: That four-eyes with the big nose? You don't need friends like
that.

Lisa: How Zen.

-- Homer Simpson
Homer Defined
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
> I'm trying to build Embperl with a threaded perl5.6.0. I get the following
> error while running make:
>..
> which suggests adding dTHR; to the beginning of any function that results
in
> this error. I try adding dTHR; to EvalDirect in epeval.c but still ended
up
> with the same error.
>

dTHR was the solution for perl 5.005, but all these function already contain
a dSP, which implies dTHR.

For Perl 5.6 try dTHX instead (see also man perlguts at the very end). If
this work, let me know where you had to add it, so I can put it in the next
release, if this doesn't work I need to know first how your Perl is build
(which flags to configure, output of Perl -V)

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
Okay I added dTHX to the following subs in epeval.c:

EvalDirect()
EvalAll()
EvalAllNoCache()
CallCV()


Everything builds just fine now but when I run make test it blows up:

$ make test
PERL_DL_NONLAZY=0 /usr/local/bin/perl -Iblib/arch -Iblib/lib
-I/usr/local/lib/perl5/5.6.0/i686-linux-thread -I/usr/local/lib/perl5/5.6.0
test.pl

loading... ok

Testing offline mode...

#0 ascii... make: *** [test_dynamic] Segmentation fault


Should I build it with debugging turned on? If so is it possible to run the
tests under gdb?

Here's my perl details:

$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.15-4mdk, archname=i686-linux-thread
uname='linux jbodnar.teamlinux.net 2.2.15-4mdk #1 wed may 10 15:31:30 cest
2000 i686 unknown '
config_args='-Dusethreads -Duse5005threads -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=define useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.95.3 19991030 (prerelease)
cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include'
ccflags ='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: USE_THREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Aug 10 2000 12:20:37
@INC:
/usr/local/lib/perl5/5.6.0/i686-linux-thread
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux-thread
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.



On 17-Aug-2000 Gerald Richter wrote:
>
>
>> I'm trying to build Embperl with a threaded perl5.6.0. I get the following
>> error while running make:
>>..
>> which suggests adding dTHR; to the beginning of any function that results
> in
>> this error. I try adding dTHR; to EvalDirect in epeval.c but still ended
> up
>> with the same error.
>>
>
> dTHR was the solution for perl 5.005, but all these function already contain
> a dSP, which implies dTHR.
>
> For Perl 5.6 try dTHX instead (see also man perlguts at the very end). If
> this work, let me know where you had to add it, so I can put it in the next
> release, if this doesn't work I need to know first how your Perl is build
> (which flags to configure, output of Perl -V)
>
> Gerald
>
>
> -------------------------------------------------------------
> Gerald Richter ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: richter@ecos.de Voice: +49 6133 925151
> WWW: http://www.ecos.de Fax: +49 6133 925152
> -------------------------------------------------------------

--
Jason Bodnar + jbodnar@team-linux.com + Team Linux

Foul temptress. I'll bet she thinks Ziggy's gotten too preachy, too!

-- Homer Simpson
The Last Temptation of Homer
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
>
> Should I build it with debugging turned on? If so is it possible to run
the
> tests under gdb?
>

Yes, it's very easy with 1.3b4, do

perl Makefile.PL debug
make testgdb

in gdb say

r

-> here you should get the SIGSEGV
now say

BT

and you should see the stackbacktrace which I would like to see

Gerald
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
here's the debug session:

$ make testgdb
PERL_DL_NONLAZY=0 gdb -x dbinitembperl /usr/local/bin/perl
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux"...
(gdb) r
Starting program: /usr/local/bin/perl -Iblib/arch -Iblib/lib
-I/usr/local/lib/perl5/5.6.0/i686-linux-thread -I/usr/local/lib/perl5/5.6.0
test.pl
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

loading... ok

Testing offline mode...

#0 ascii...
Program received signal SIGSEGV, Segmentation fault.
0x80aa431 in Perl_sv_unref ()
(gdb) BT
#0 0x80aa431 in Perl_sv_unref ()
#1 0x80a6514 in Perl_sv_force_normal ()
#2 0x80a3045 in Perl_sv_setiv ()
#3 0x401f474a in ?? () from
/usr/src/HTML-Embperl-1.3b4/blib/arch/auto/HTML/Embperl/Embperl.so
#4 0x80923de in Perl_mg_get ()
#5 0x80a4eb2 in Perl_sv_2bool ()
#6 0x80b038a in Perl_pp_not ()
#7 0x809aa4c in Perl_runops_standard ()
#8 0x805bfc9 in S_run_body ()
#9 0x805bcdc in perl_run ()
#10 0x8058fc2 in main ()
#11 0x400c7cae in __libc_start_main () from /lib/libc.so.6




On 17-Aug-2000 Gerald Richter wrote:
>>
>> Should I build it with debugging turned on? If so is it possible to run
> the
>> tests under gdb?
>>
>
> Yes, it's very easy with 1.3b4, do
>
> perl Makefile.PL debug
> make testgdb
>
> in gdb say
>
> r
>
> -> here you should get the SIGSEGV
> now say
>
> BT
>
> and you should see the stackbacktrace which I would like to see
>
> Gerald

--
Jason Bodnar + jbodnar@team-linux.com + Team Linux

Dammit, I'm no supervising technician. I'm a technical supervisor. It's
too late to teach this old dog new tricks.

-- Homer Simpson
Homer's Odyssey
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
> #3 0x401f474a in ?? () from
> /usr/src/HTML-Embperl-1.3b4/blib/arch/auto/HTML/Embperl/Embperl.so

This ?? would be the interesting point. For some reason GDB doesn't show the
symbol name. Does it change anything if you type "share" before you type the
"BT" ?

Gerald
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
On 17-Aug-2000 Gerald Richter wrote:
>> #3 0x401f474a in ?? () from
>> /usr/src/HTML-Embperl-1.3b4/blib/arch/auto/HTML/Embperl/Embperl.so
>
> This ?? would be the interesting point. For some reason GDB doesn't show the
> symbol name. Does it change anything if you type "share" before you type the
> "BT" ?

Looks like this might help:

(gdb) share
Symbols already loaded for /lib/libnsl.so.1
Symbols already loaded for /lib/libdb.so.3
Symbols already loaded for /usr/lib/libgdbm.so.2
Symbols already loaded for /lib/libdl.so.2
Symbols already loaded for /lib/libm.so.6
Symbols already loaded for /lib/libpthread.so.0
Symbols already loaded for /lib/libc.so.6
Symbols already loaded for /lib/libcrypt.so.1
Symbols already loaded for /lib/ld-linux.so.2
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Reading symbols from
/usr/src/HTML-Embperl-1.3b4/blib/arch/auto/HTML/Embperl/Embperl.so...done.
Reading symbols from
/usr/local/lib/perl5/5.6.0/i686-linux-thread/auto/Opcode/Opcode.so...done.
(gdb) BT
#0 0x80aa431 in Perl_sv_unref ()
#1 0x80a6514 in Perl_sv_force_normal ()
#2 0x80a3045 in Perl_sv_setiv ()
#3 0x401f474a in EMBPERL_mgGetoptDisableFormData (pSV=0x80fe0f0, mg=0x8186508)
at epmain.c:335
#4 0x80923de in Perl_mg_get ()
#5 0x80a4eb2 in Perl_sv_2bool ()
#6 0x80b038a in Perl_pp_not ()
#7 0x809aa4c in Perl_runops_standard ()
#8 0x805bfc9 in S_run_body ()
#9 0x805bcdc in perl_run ()
#10 0x8058fc2 in main ()
#11 0x400c7cae in __libc_start_main () from /lib/libc.so.6


--
Jason Bodnar + jbodnar@team-linux.com + Team Linux

Laser effects, mirrored balls -- John Williams must be rolling around
in his grave.

-- Homer Simpson
The Springfield Connection
Re: Can't build Embperl 1.3b4 with threaded perl5.6.0 [ In reply to ]
> Looks like this might help:
>

yes, it does

> #3 0x401f474a in EMBPERL_mgGetoptDisableFormData (pSV=0x80fe0f0,
mg=0x8186508)
> at epmain.c:335

That's a callback where Embperl is called from Perl. With USE_THREADS in
Perl 5.6 Embperl gets other parameters passed then without. That's the
reason why it crashs.

I try to fix it in the next few days and let you know when there is anything
new

Gerald