Subject: | IO.xs fails compile: sv_undef undeclared |
Cc: | gbarr [...] pobox.com |
I'm trying to build version 1.20 and am getting the following error:
gcc -c -fno-strict-aliasing -O2 -march=i386 -mcpu=i686 -
DVERSION=\"1.20\" -DXS_VERSION=\"1.20\" -fPIC -
I/usr/lib/perl5/5.6.0/i386-linux/CORE -DI_POLL IO.c
IO.xs: In function `XS_IO__Seekable_getpos':
IO.xs:208: `sv_undef' undeclared (first use in this function)
IO.xs:208: (Each undeclared identifier is reported only once
IO.xs:208: for each function it appears in.)
IO.xs: In function `XS_IO__File_new_tmpfile':
IO.xs:252: `sv_undef' undeclared (first use in this function)
make: *** [IO.o] Error 1
Below is a patch that fixes the problem:
--- IO.xs Mon Feb 10 20:38:24 2003
+++ IO.xs.orig Mon Feb 10 20:36:38 2003
@@ -205,7 +205,7 @@
ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
}
else {
- ST(0) = &PL_sv_undef;
+ ST(0) = &sv_undef;
errno = EINVAL;
}
@@ -249,7 +249,7 @@
SvREFCNT_dec(gv); /* undo increment in newRV() */
}
else {
- ST(0) = &PL_sv_undef;
+ ST(0) = &sv_undef;
SvREFCNT_dec(gv);
}
My perl -V is:
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.17-8smp, archname=i386-linux
uname='linux porky.devel.redhat.com 2.2.17-8smp #1 smp fri nov 17
16:12:17 e
st 2000 i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -
Dcccdlflag
s=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -
Dd_dosuid -Dd_
semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -
Dman3ext=3pm -Uusel
argefiles'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=unde
f
useperlio=undef d_sfio=undef uselargefiles=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usesocks=undef
Compiler:
cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96
20000731 (R
ed Hat Linux 7.1 2.96-78)
cppflags='-fno-strict-aliasing'
ccflags ='-fno-strict-aliasing'
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='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.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:
Built under linux
Compiled at Apr 3 2001 11:27:33
%ENV:
PERL5LIB="/home/ekkis/.cpan/lib/perl5/5.6.0:/home/ekkis/.cpan/lib/perl5/
site
_perl/5.6.0"
@INC:
/home/ekkis/.cpan/lib/perl5/5.6.0
/home/ekkis/.cpan/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.