Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bleedperl sfio fails op/sprintf.t #2245

Closed
p5pRT opened this issue Jul 21, 2000 · 11 comments
Closed

bleedperl sfio fails op/sprintf.t #2245

p5pRT opened this issue Jul 21, 2000 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 21, 2000

Migrated from rt.perl.org#3561 (status was 'rejected')

Searchable as RT3561$

@p5pRT
Copy link
Author

p5pRT commented Jul 21, 2000

From @nwc10

Created by @nwc10

I've build bleedperl (.patch says 6417) with sfio (sfio as supplied by
debian, appears to be sfio 1999, newer than sfio98 which was the most
recent I was aware of)

comp/require.t test 23 fails (Out of memory) on stdio and sfio.
However, sfio also causes op/sprintf.t to fail tests 129 and 130​:

not ok 129 >%.0f< >0.6< >1< >0<
not ok 130 >%.0f< >-0.6< >-1< >-0<

I'm not sure whether this is a bug in sfio or the perl test assuming too
much.

All other tests passed.

Nicholas Clark

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl v5.6.0:

Configured by nick at Fri Jul 21 17:20:33 BST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.16-rmk2, archname=armv4l-linux
    uname='linux bagpuss.unfortu.net 2.2.16-rmk2 #8 thu jul 20 12:24:36 bst 2000 armv4l unknown '
    config_args=''
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=define uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=2.95.2 20000220 (Debian GNU/Linux)
    cppflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/sfio'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/sfio'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    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=-lsfio -lnsl -lndbm -ldb -ldl -lm -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'

Locally applied patches:
    


@INC for perl v5.6.0:
    lib
    /usr/local/lib/perl5/5.6.0/armv4l-linux
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/armv4l-linux
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .


Environment for perl v5.6.0:
    HOME=/home/nick
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=en_GB.ISO-8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/local/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


@p5pRT
Copy link
Author

p5pRT commented Jul 21, 2000

From [Unknown Contact. See original ticket]

From​: Nicholas Clark <nick@​ccl4.org>

I've build bleedperl (.patch says 6417) with sfio (sfio as supplied by
debian, appears to be sfio 1999, newer than sfio98 which was the most
recent I was aware of)

Actually, Sfio2000 is available for download from
http​://www.research.att.com/sw/tools/sfio/

-- BKS
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http​://www.hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2000

From [Unknown Contact. See original ticket]

At 19​:48 +0100 2000-07-21, Nicholas Clark wrote​:

However, sfio also causes op/sprintf.t to fail tests 129 and 130​:

not ok 129 >%.0f< >0.6< >1< >0<
not ok 130 >%.0f< >-0.6< >-1< >-0<

I'm guilty of that test. The C standard says, for the f format
"[t]he value is rounded to the appropriate number of digits."
Representing 0.6 as zero when no decimal places are requested does
not look like rounding to me.

I'm not sure whether this is a bug in sfio or the perl test assuming too
much.

My (biassed) vote is for a bug in sfio. Any chance you could see how
sfio2000 (referenced in another follow-up) fares?

@p5pRT
Copy link
Author

p5pRT commented Apr 12, 2010

@chorny - Status changed from 'open' to 'stalled'

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2010

From @gannett-ggreer

On Fri Jul 21 04​:48​:47 2000, nicholas wrote​:

I've build bleedperl (.patch says 6417) with sfio (sfio as supplied by
debian, appears to be sfio 1999, newer than sfio98 which was the most
recent I was aware of)

comp/require.t test 23 fails (Out of memory) on stdio and sfio.
However, sfio also causes op/sprintf.t to fail tests 129 and 130​:

not ok 129 >%.0f< >0.6< >1< >0<
not ok 130 >%.0f< >-0.6< >-1< >-0<

I'm not sure whether this is a bug in sfio or the perl test assuming
too
much.

All other tests passed.

Nicholas Clark

Any tips on the Configure incantation to get Perl configured for sfio?
I compiled sfio.2005-02-01.tgz without much incident (had to patch one
header) but then with Configure I get​:

Checking for GNU cc in disguise and/or its version number...
/tmp/cc8muxYC.o​: In function `main'​:
try.c​:(.text+0x14)​: undefined reference to `_stdprintf'

from ./Configure -des -Dusedevel -Duseperlio -Dusesfio

Attempts to force 'ldflags' to include the library haven't worked either.

--
George Greer

@p5pRT
Copy link
Author

p5pRT commented Jul 25, 2010

The RT System itself - Status changed from 'stalled' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Mar 29, 2012

From @nwc10

Sorry for the delay in replying.

On Sat, Jul 24, 2010 at 09​:00​:04PM -0700, George Greer via RT wrote​:

On Fri Jul 21 04​:48​:47 2000, nicholas wrote​:

I've build bleedperl (.patch says 6417) with sfio (sfio as supplied by
debian, appears to be sfio 1999, newer than sfio98 which was the most
recent I was aware of)

Any tips on the Configure incantation to get Perl configured for sfio?
I compiled sfio.2005-02-01.tgz without much incident (had to patch one
header) but then with Configure I get​:

Checking for GNU cc in disguise and/or its version number...
/tmp/cc8muxYC.o​: In function `main'​:
try.c​:(.text+0x14)​: undefined reference to `_stdprintf'

from ./Configure -des -Dusedevel -Duseperlio -Dusesfio

Attempts to force 'ldflags' to include the library haven't worked either.

No, no good idea. But assuming sfio 2005 is from 2005, then the bug report
predates it, so it may be something changed in sfio 2005 that broke the
core's assumptions.

I think we'd roughly reached the decision that support for sfio as sideways
replacement for stdio hasn't worked for quite a long time, probably isn't
used by anyone any more (hence no bug reports), and not useful to fix.

Hence possibly this ticket should be rejected.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Apr 3, 2012

From @nwc10

On Thu, Mar 29, 2012 at 03​:33​:38PM +0100, Nicholas Clark wrote​:

Sorry for the delay in replying.

On Sat, Jul 24, 2010 at 09​:00​:04PM -0700, George Greer via RT wrote​:

On Fri Jul 21 04​:48​:47 2000, nicholas wrote​:

I've build bleedperl (.patch says 6417) with sfio (sfio as supplied by
debian, appears to be sfio 1999, newer than sfio98 which was the most
recent I was aware of)

Any tips on the Configure incantation to get Perl configured for sfio?
I compiled sfio.2005-02-01.tgz without much incident (had to patch one
header) but then with Configure I get​:

Checking for GNU cc in disguise and/or its version number...
/tmp/cc8muxYC.o​: In function `main'​:
try.c​:(.text+0x14)​: undefined reference to `_stdprintf'

from ./Configure -des -Dusedevel -Duseperlio -Dusesfio

Attempts to force 'ldflags' to include the library haven't worked either.

Oh, interesting. I'm surprised that adding them to ldflags didn't fix it
*That* failure is due to this change in Configure

commit 2d967e3
Author​: Jarkko Hietaniemi <jhi@​iki.fi>
Date​: Sat Mar 3 00​:55​:58 2001 +0000

  Regen files for mainline.
 
  p4raw-id​: //depot/perl@​8996

Inline Patch
diff --git a/Configure b/Configure
index 3166b87..c51e39b 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Fri Feb 23 03:39:53 EET 2001 [metaconfig 3.0 PL70]
+# Generated on Sat Mar  3 02:41:27 EET 2001 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -3146,7 +3146,7 @@ int main() {
        exit(0);
 }
 EOM
-if $cc -o gccvers $ldflags gccvers.c; then
+if $cc -o gccvers $ccflags $ldflags gccvers.c; then
        gccversion=`./gccvers`
        case "$gccversion" in
        '') echo "You are not using GNU cc." ;;
diff --git a/Porting/Glossary b/Porting/Glossary

[etc]

Looks innocent, doesn't it? But it's enough to screw up Configure's
test for "is this gcc", because it adds the -I to the compiler command
line that finds sfio's *replacement* stdio.h (which does things which end
up requiring -llibsfio)

If I remove sfio's replacement stdio.h from that directory, I get further.
Specifically, to the parent of this commit​:

commit 39f7a87
Author​: Jarkko Hietaniemi <jhi@​iki.fi>
Date​: Mon Apr 14 17​:35​:51 2003 +0000

  Introduce PerlIO​::get_layers() to allow people to peek
  at the PerlIO layer stack.
 
  p4raw-id​: //depot/perl@​19203

MANIFEST | 1 +
lib/PerlIO.pm | 73 +++++++++++++++++++++++++++++---
perlio.c | 30 +++++++++++++
perlio.h | 1 +
t/io/layers.t | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++
t/io/open.t | 1 -
universal.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 347 insertions(+), 7 deletions(-)

[although 19 tests fail at that point. Not totally sure why, but it seems
to be trouble seeking. That might be "fair" as I'm using sfio97, which
probably has a bit of future shock on a 64 bit FreeBSD 7.0]

With that commit, it all goes pear shaped​:

In file included from universal.c​:22​:
perliol.h​:5​: error​: expected specifier-qualifier-list before 'PerlIO_funcs'
perliol.h​:21​: error​: expected declaration specifiers or '...' before 'PerlIO_funcs'
perliol.h​:23​: error​: expected ')' before '*' token
perliol.h​:28​: error​: expected ';' before 'IV'
perliol.h​:67​: error​: expected specifier-qualifier-list before 'PerlIOl'
perliol.h​:99​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_unix'
perliol.h​:100​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_perlio'
perliol.h​:101​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_stdio'
perliol.h​:102​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_crlf'
perliol.h​:103​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_utf8'
perliol.h​:104​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_byte'
perliol.h​:105​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_raw'
perliol.h​:106​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_pending'
perliol.h​:108​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before 'PerlIO_mmap'
perliol.h​:114​: error​: expected ')' before '*' token
perliol.h​:128​: error​: expected declaration specifiers or '...' before 'PerlIO_funcs'
perliol.h​:161​: error​: expected declaration specifiers or '...' before 'PerlIO_list_t'
perliol.h​:162​: error​: expected ')' before '*' token
perliol.h​:163​: error​: expected ')' before '*' token
perliol.h​:164​: error​: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
perliol.h​:168​: error​: expected ')' before '*' token
perliol.h​:172​: error​: expected declaration specifiers or '...' before 'PerlIO_funcs'
universal.c​: In function 'XS_PerlIO_get_layers'​:
universal.c​:737​: warning​: unused variable 'popuntil'
universal.c​:788​: warning​: implicit declaration of function 'PerlIO_get_layers'
universal.c​:789​: warning​: initialization makes pointer from integer without a cast
*** Error code 1

Seems to be that this change upsets the build​:

Inline Patch
diff --git a/universal.c b/universal.c
index f5ce23e..6b011cf 100644
--- a/universal.c
+++ b/universal.c
@@ -17,6 +17,10 @@
 #define PERL_IN_UNIVERSAL_C
 #include "perl.h"
 
+#ifdef USE_PERLIO
+#include "perliol.h" /* For the PERLIO_F_XXX */
+#endif
+


Whilst that looks to be fixable, the lack of bug reports is telling use that no\-one has seriously tried to build with \-Dusesfio for at least 9 years\.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2012

From @doy

Rejecting as per Nicholas's comment.

-doy

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2012

From [Unknown Contact. See original ticket]

Rejecting as per Nicholas's comment.

-doy

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2012

@doy - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant