Mailing List Archive

Compile problems
I am trying to get Embperl
(tried 1.2.0 1.2.1 and 1.3b2)
to compile with Perl 5.6
Apache 1.3.9 and mod_perl 1.22,
but when I do the make test I get to the ascii test and it dies.
Did I compile Perl wrong? I used the defaults. All other modules are
compiling fine. (DBI DBD::mysql MD5 mod_perl etc.)

make test ----------------------

PERL_DL_NONLAZY=0 /usr/local/bin/perl -Iblib/arch -Iblib/lib
-I/usr/local/lib/perl5/5.6.0/i586-linux -I/usr/local/lib/perl5/5.6.0
test.pl

loading... ok

Testing offline mode...

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

perl -V ------------------------

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:

Platform:
osname=linux, osvers=2.0.35, archname=i586-linux
uname='linux mothership 2.0.35 #2 fri aug 21 18:23:23 edt 1998 i586
unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef 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=egcs-2.90.29 980515 (egcs-1.0.3
release)
cppflags='-I/usr/local/include'
ccflags ='-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=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lndbm -lgdbm -ldbm -ldb -ldl -lm -lc
libc=/lib/libc.so.5.4.44, 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_LARGE_FILES
Built under linux
Compiled at Mar 26 2000 23:10:56
@INC:
/usr/local/lib/perl5/5.6.0/i586-linux
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i586-linux
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl

test.log --------------------------------------------

[7698]MEM: Load test/html/ascii in HTML::Embperl::DOC::_1
[7698]REQ: Embperl 1.2.0 starting... Mon Mar 27 13:14:50 2000

[7698]REQ: No Safe Eval All Opcode allowed mode = Offline (4)
[7698]REQ: Package = HTML::Embperl::DOC::_1
[7698]ENV: QTDIR=/usr/local/qt
[7698]ENV: LESS=-M
[7698]ENV: QUERY_STRING=
[7698]ENV: ignoreeof=10
[7698]ENV: MAKELEVEL=1
[7698]ENV:
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.cmd=01;3$

[7698]ENV: OSTYPE=Linux
[7698]ENV: CPLUS_INCLUDE_PATH=/usr/local/qt/include:
[7698]ENV:
MANPATH=/usr/local/qt/man:/usr/local/man:/usr/man/preformat:/usr/man:/usr/X11R6/man:/usr/openwin/man

[7698]ENV: EMBPERL_ALLOW=asc|\.htm$
[7698]ENV: SSH_CLIENT=209.208.31.88 61185 22
[7698]ENV: LESSOPEN=|lesspipe.sh %s
[7698]ENV: LIBRARY_PATH=/usr/local/qt/lib:
[7698]ENV: LD_LIBRARY_PATH=/usr/local/qt/lib:
[7698]ENV: LOGNAME=root
[7698]ENV:
PATH=/usr/local/qt/bin:/lnxdata/download/fred/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/bin:/usr/sbin:/usr/lib/$

[7698]ENV: SHELL=/bin/sh
[7698]ENV: MAIL=/var/spool/mail/root
[7698]ENV: LS_OPTIONS= --color=auto -F -b -T 0
[7698]ENV: _=/usr/local/bin/perl
[7698]ENV: OPENWINHOME=/usr/openwin
[7698]ENV: SHLVL=2
[7698]ENV: SSH_TTY=/dev/ttypa
[7698]ENV: HOSTNAME=mothership.gina.net
[7698]ENV: MFLAGS=
[7698]ENV: MAKEFLAGS=
[7698]ENV: USER=root
[7698]ENV: HOSTTYPE=i386
[7698]ENV: HOME=/root
[7698]ENV: PERL_DL_NONLAZY=0
[7698]ENV: TERM=xterm
[7698]ENV: MINICOM=-c on
[7698]Formdata... length = 0
[7698]Open test/tmp/out.htm for output...
[7698]Reading test/html/ascii as input using PerlIO ...
[7698]PERF: input = test/html/ascii
[7698]PERF: Time: 10 ms Evals: 0 No Evals to cache
[7698]Request finished. Mon Mar 27 13:14:50 2000
. Entry-SVs: 11273 -OBJs: 4 Exit-SVs: 11369 -OBJs: 7
[7698]CUP: ***** Cleanup package: HTML::Embperl::DOC::_1 *****
[7698]CUP: Source -> No Perl in Source <-
Re: Compile problems [ In reply to ]
On Mon, 27 Mar 2000, Aaron Johnson wrote:

> I am trying to get Embperl
> (tried 1.2.0 1.2.1 and 1.3b2)
> to compile with Perl 5.6
> Apache 1.3.9 and mod_perl 1.22,
> but when I do the make test I get to the ascii test and it dies.
> Did I compile Perl wrong? I used the defaults. All other modules are
> compiling fine. (DBI DBD::mysql MD5 mod_perl etc.)
>
> make test ----------------------
>
> PERL_DL_NONLAZY=0 /usr/local/bin/perl -Iblib/arch -Iblib/lib
> -I/usr/local/lib/perl5/5.6.0/i586-linux -I/usr/local/lib/perl5/5.6.0
> test.pl
>
> loading... ok
>
> Testing offline mode...
>
> ascii... make: *** [test_dynamic] Segmentation
> fault
>
[snip]

Hi,
If it's any consolation, I got similar problems at this same
point with perl 5.6.0 on Win32, compiled with the the fork emulation
and threads disabled.

best regards,
randy kobes
RE: Compile problems [ In reply to ]
Hi,

>
> I am trying to get Embperl
> (tried 1.2.0 1.2.1 and 1.3b2)
> to compile with Perl 5.6
> Apache 1.3.9 and mod_perl 1.22,
> but when I do the make test I get to the ascii test and it dies.
> Did I compile Perl wrong? I used the defaults. All other modules are
> compiling fine. (DBI DBD::mysql MD5 mod_perl etc.)
>

I didn't have the time to test Perl 5.6. I guess some of the internals have
changed...

As soon as I get some free time, I will try it out. In the meantime, could
you make a stackbacktrace with gdb?

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: Compile problems [ In reply to ]
>
> If you send me a bit more instruction on how to do that I can.
> I have been extermely lucky with Perl and its modules in that
> most of time they
> compile out of the "box" and I don't program C so you will have
> to guide me a
> bit.
>

Do a

perldoc Faq.pod

and search for

"bactrace"

(It's a typo in the Faq.pod). This paragraph explain how to get a backtrace
and the next explains how to build a debug version of Embperl.


> I am getting ready to intergrate the attachments into the Mail object this
> month. I will send the changes along when I am done.
>

Great!

Gerald
Re: Compile problems [ In reply to ]
Gerald,

Ok. Is this what you are looking for?

Starting program: /usr/local/bin/perl test.pl

loading... ok

Testing offline mode...

ascii...
Program received signal SIGSEGV, Segmentation fault.
0x805e179 in Perl_gv_fetchfile ()
(gdb) bt
#0 0x805e179 in Perl_gv_fetchfile ()
#1 0x400f2044 in XS_HTML__Embperl_GVFile ()
#2 0x8097ae7 in Perl_pp_entersub ()
#3 0x8092bfa in Perl_runops_standard ()
#4 0x805b119 in S_run_body ()
#5 0x805aebd in perl_run ()
#6 0x8058bf1 in main ()
#7 0x8058afe in ___crt_dummy__ ()

I will resend with debug enabled if it is.

Aaron Johnson

Gerald Richter wrote:

> >
> > If you send me a bit more instruction on how to do that I can.
> > I have been extermely lucky with Perl and its modules in that
> > most of time they
> > compile out of the "box" and I don't program C so you will have
> > to guide me a
> > bit.
> >
>
> Do a
>
> perldoc Faq.pod
>
> and search for
>
> "bactrace"
>
> (It's a typo in the Faq.pod). This paragraph explain how to get a backtrace
> and the next explains how to build a debug version of Embperl.
>
> > I am getting ready to intergrate the attachments into the Mail object this
> > month. I will send the changes along when I am done.
> >
>
> Great!
>
> Gerald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
RE: Compile problems [ In reply to ]
Aaron,

>
> Ok. Is this what you are looking for?
>

Yes, that is exactly what I need !

>...
> I will resend with debug enabled if it is.
>

That would be great. If you could do this, I think I would be able to fix
the bug, even without installing Perl 5.6 here

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: Compile problems [ In reply to ]
Gerald,

Here is the output from the debug version. I didn't see a LDDFLAGS but I saw
LDDLFLAGS, is that where I add the -g? (I added it there and nothing bad
happend :^)

Hope this helps.

0x805e165 in Perl_gv_fetchfile ()
(gdb) bt
#0 0x805e165 in Perl_gv_fetchfile ()
#1 0x400f2044 in XS_HTML__Embperl_GVFile (cv=0x81eb360) at Embperl.xs:76
#2 0x8097ad3 in Perl_pp_entersub ()
#3 0x8092be6 in Perl_runops_standard ()
#4 0x805b105 in S_run_body ()
#5 0x805aea9 in perl_run ()
#6 0x8058bf1 in main ()
#7 0x8058afe in ___crt_dummy__ ()

Aaron Johnson

Gerald Richter wrote:

> Aaron,
>
> >
> > Ok. Is this what you are looking for?
> >
>
> Yes, that is exactly what I need !
>
> >...
> > I will resend with debug enabled if it is.
> >
>
> That would be great. If you could do this, I think I would be able to fix
> the bug, even without installing Perl 5.6 here
>
> 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: Compile problems [ In reply to ]
> Here is the output from the debug version. I didn't see a
> LDDFLAGS but I saw
> LDDLFLAGS, is that where I add the -g? (I added it there and nothing bad
> happend :^)
>
> Hope this helps.
>

Yes

Does it change anything, if you change line 75 in Embperl.xs from

if (gv && SvTYPE(gv) == SVt_PVGV)

to

if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))


?

Gerald
Re: Compile problems [ In reply to ]
It produced the same results. Failed on the read? of the ascii file.

(gdb) bt
#0 0x805e165 in Perl_gv_fetchfile ()
#1 0x400f2048 in XS_HTML__Embperl_GVFile (cv=0x81eb360) at Embperl.xs:76
#2 0x8097ad3 in Perl_pp_entersub ()
#3 0x8092be6 in Perl_runops_standard ()
#4 0x805b105 in S_run_body ()
#5 0x805aea9 in perl_run ()
#6 0x8058bf1 in main ()
#7 0x8058afe in ___crt_dummy__ ()

This is the block for any one that doesn't want to dig into the source and to
show which lines are which after the modification suggested: (lines according
to pico anyway)

>72 CODE:
>73 RETVAL = "" ;
>74 if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
>75 {
>76 GV * fgv = GvFILEGV(gv) ;
>77 if (fgv && SvTYPE(fgv) == SVt_PVGV)
>78 {
>79 char * name = GvNAME (fgv) ;
>80 if (name)
>81 RETVAL = name ;
>82 }
>83 }
>84OUTPUT:

Aaron Johnson


Gerald Richter wrote:

> > Here is the output from the debug version. I didn't see a
> > LDDFLAGS but I saw
> > LDDLFLAGS, is that where I add the -g? (I added it there and nothing bad
> > happend :^)
> >
> > Hope this helps.
> >
>
> Yes
>
> Does it change anything, if you change line 75 in Embperl.xs from
>
> if (gv && SvTYPE(gv) == SVt_PVGV)
>
> to
>
> if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
>
> ?
>
> Gerald
RE: Compile problems [ In reply to ]
>
> It produced the same results.

ok, it isn't so easy as I hoped...

I am going to install Perl 5.6 here and let you know when have any news.

> Failed on the read? of the ascii file.

No, it fails in cleanup, when it tries to determinate the filename of a the
sourcefile of a variable

Gerald
RE: Embperl and Perl 5.6 (was: Compile problems) [ In reply to ]
Hi,

I just commit a few changes to the CVS that makes Embperl work with Perl
5.6. Either fetch it via annonymous CVS or wait until a new tarball is
generated at http://perl.apache.org/from-cvs/embperl.

The patch I send today morning (my time) was nearly correct. The correct
version is

change line 75 in Embperl.xs from

if (gv && SvTYPE(gv) == SVt_PVGV)

to

if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv) && GvGP (gv) -> gp_file )


After this change Embperl work with Perl 5.6. make test still fails due to
changed error message in Perl 5.6. Theses are also corrected in the CVS
version.

Enjoy

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
-------------------------------------------------------------