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

Patch for h2xs.t in Perl 5.8.4 #7297

Closed
p5pRT opened this issue May 16, 2004 · 8 comments
Closed

Patch for h2xs.t in Perl 5.8.4 #7297

p5pRT opened this issue May 16, 2004 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented May 16, 2004

Migrated from rt.perl.org#29623 (status was 'resolved')

Searchable as RT29623$

@p5pRT
Copy link
Author

p5pRT commented May 16, 2004

From mats@sm5sxl.net

Created by mats@sm5sxl.net

The '$header' variable in the parameter list at line 120 in
lib/h2xs.t is incorrectly placed (it should be the last one). It will
cause the h2xs test to fail as follows​:

-----------------------------------------------------------------
not ok 95 - running /usr/local/src/perl-5.8.4/perl "-I../lib" "-I../../lib" ../utils/h2xs -f -n h2xst h2xst.h -b 5.8.4 2>&1
# Failed test (../lib/h2xs.t at line 169)
# got​: 'Defaulting to backwards compatibility with perl 5.8.4
# If you intend this module to be compatible with earlier perl versions, please
# specify a minimum perl version with the -b option.
#
# Can't open h2xst/-b.h​: No such file or directory
# '
# expected​: 'Writing h2xst/ppport.h
# Writing h2xst/lib/h2xst.pm
...
------------------------------------------------------------------

Below is a patch to fix it.

Mats Peterson <mats@​sm5sxl.net>

----- cut here -----
*** h2xs.t.orig Tue Aug 12 11​:42​:37 2003
--- h2xs.t Sun May 16 15​:13​:38 2004
***************
*** 117,123 ****
  Writing $name/MANIFEST
  EONOXSFILES
 
! "-f -n $name $header -b $thisversion", $], <<"EOXSFILES",
  Writing $name/ppport.h
  Writing $name/lib/$name.pm
  Writing $name/$name.xs
--- 117,123 ----
  Writing $name/MANIFEST
  EONOXSFILES
 
! "-f -n $name -b $thisversion $header", $], <<"EOXSFILES",
  Writing $name/ppport.h
  Writing $name/lib/$name.pm
  Writing $name/$name.xs
----- cut here -----

Perl Info

Flags:
    category=utilities
    severity=high

Site configuration information for perl v5.8.4:

Configured by mats at Sun May 16 11:34:37 CEST 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=freebsd, osvers=4.6.2-release-p12, archname=i386-freebsd
    uname='freebsd pc10.snowbee.foo 4.6.2-release-p12 freebsd 4.6.2-release-p12 #0: sat nov 1 10:44:06 cet 2003 mats@pc10.snowbee.foo:usrobjusrsrcsyspc10 i386 '
    config_args='-Dprefix=/opt/perl -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
    optimize='-O',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release) [FreeBSD]', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    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, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.4:
    /usr/home/mats/lib/perl
    /opt/perl/lib/5.8.4/i386-freebsd
    /opt/perl/lib/5.8.4
    /opt/perl/lib/site_perl/5.8.4/i386-freebsd
    /opt/perl/lib/site_perl/5.8.4
    /opt/perl/lib/site_perl
    .


Environment for perl v5.8.4:
    HOME=/root
    LANG=sv_SE.ISO_8859-1
    LANGUAGE (unset)
    LC_COLLATE=C
    LC_MESSAGES=C
    LC_TIME=C
    LD_LIBRARY_PATH=/usr/home/mats/lib:/usr/local/netpbm/lib
    LOGDIR (unset)
    PATH=/opt/perl/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/local/mysql/bin:/usr/local/apache/bin:/usr/local/j2sdk/bin:/usr/local/netpbm/bin:/usr/local/imagick/bin:/usr/home/mats/bin:/usr/home/mats/scripts:/root/scripts:/root/bin
    PERLLIB=/usr/home/mats/lib/perl
    PERL_BADLANG (unset)
    SHELL=/bin/csh

@p5pRT
Copy link
Author

p5pRT commented May 16, 2004

From mats@sm5sxl.net

Created by mats@sm5sxl.net

The '$header' variable in the parameter list at line 120 in
lib/h2xs.t is incorrectly placed (it should be the last one). It will
cause the h2xs test to fail as follows​:

-----------------------------------------------------------------
not ok 95 - running /usr/local/src/perl-5.8.4/perl "-I../lib" "-I../../lib" ../utils/h2xs -f -n h2xst h2xst.h -b 5.8.4 2>&1
# Failed test (../lib/h2xs.t at line 169)
# got​: 'Defaulting to backwards compatibility with perl 5.8.4
# If you intend this module to be compatible with earlier perl versions, please
# specify a minimum perl version with the -b option.
#
# Can't open h2xst/-b.h​: No such file or directory
# '
# expected​: 'Writing h2xst/ppport.h
# Writing h2xst/lib/h2xst.pm
...
------------------------------------------------------------------

Below is a patch to fix it.

Mats Peterson <mats@​sm5sxl.net>

----- cut here -----
*** h2xs.t.orig Tue Aug 12 11​:42​:37 2003
--- h2xs.t Sun May 16 15​:13​:38 2004
***************
*** 117,123 ****
  Writing $name/MANIFEST
  EONOXSFILES
 
! "-f -n $name $header -b $thisversion", $], <<"EOXSFILES",
  Writing $name/ppport.h
  Writing $name/lib/$name.pm
  Writing $name/$name.xs
--- 117,123 ----
  Writing $name/MANIFEST
  EONOXSFILES
 
! "-f -n $name -b $thisversion $header", $], <<"EOXSFILES",
  Writing $name/ppport.h
  Writing $name/lib/$name.pm
  Writing $name/$name.xs
----- cut here -----

Perl Info

Flags:
    category=install
    severity=high

Site configuration information for perl v5.8.4:

Configured by mats at Sun May 16 11:34:37 CEST 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=freebsd, osvers=4.6.2-release-p12, archname=i386-freebsd
    uname='freebsd pc10.snowbee.foo 4.6.2-release-p12 freebsd 4.6.2-release-p12 #0: sat nov 1 10:44:06 cet 2003 mats@pc10.snowbee.foo:usrobjusrsrcsyspc10 i386 '
    config_args='-Dprefix=/opt/perl -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
    optimize='-O',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release) [FreeBSD]', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    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, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.4:
    /usr/home/mats/lib/perl
    /opt/perl/lib/5.8.4/i386-freebsd
    /opt/perl/lib/5.8.4
    /opt/perl/lib/site_perl/5.8.4/i386-freebsd
    /opt/perl/lib/site_perl/5.8.4
    /opt/perl/lib/site_perl
    .


Environment for perl v5.8.4:
    HOME=/root
    LANG=sv_SE.ISO_8859-1
    LANGUAGE (unset)
    LC_COLLATE=C
    LC_MESSAGES=C
    LC_TIME=C
    LD_LIBRARY_PATH=/usr/home/mats/lib:/usr/local/netpbm/lib
    LOGDIR (unset)
    PATH=/opt/perl/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/local/mysql/bin:/usr/local/apache/bin:/usr/local/j2sdk/bin:/usr/local/netpbm/bin:/usr/local/imagick/bin:/usr/home/mats/bin:/usr/home/mats/scripts:/root/scripts:/root/bin
    PERLLIB=/usr/home/mats/lib/perl
    PERL_BADLANG (unset)
    SHELL=/bin/csh

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

From @rgs

mats@​sm5sxl.net (via RT) wrote​:

The '$header' variable in the parameter list at line 120 in
lib/h2xs.t is incorrectly placed (it should be the last one). It will
cause the h2xs test to fail as follows​:
...
Below is a patch to fix it.

I've applied your patches to the development version of perl, thanks
(change #22828).

What I don't explain, is, why does this test work for me ? I can see
that h2xs uses Getopt​::Long with the configuration option pass_through,
so your patch looks fine, but it may only hide a deeper bug.

*** h2xs.t.orig Tue Aug 12 11​:42​:37 2003
--- h2xs.t Sun May 16 15​:13​:38 2004
***************
*** 117,123 ****
Writing $name/MANIFEST
EONOXSFILES

! "-f -n $name $header -b $thisversion", $], <<"EOXSFILES",
Writing $name/ppport.h
Writing $name/lib/$name.pm
Writing $name/$name.xs
--- 117,123 ----
Writing $name/MANIFEST
EONOXSFILES

! "-f -n $name -b $thisversion $header", $], <<"EOXSFILES",
Writing $name/ppport.h
Writing $name/lib/$name.pm
Writing $name/$name.xs

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

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

@p5pRT p5pRT closed this as completed May 18, 2004
@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

@rgs - Status changed from 'open' to 'resolved'

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

From mats@sm5sxl.net

permute Whether command line arguments are allowed to
  be mixed with options. Default is enabled unless
  environment variable POSIXLY_CORRECT has been set,
  in which case "permute" is disabled.

I have POSIXLY_CORRECT in my environment. That's the answer.
But I think it's a good idea to put the $header variable last
in any case, since it's common practice to do so.

Mats

From rt-rgarciasuarez=free.fr@​perl.org Tue May 18 15​:28​:18 2004
Date​: 18 May 2004 13​:28​:08 -0000
Subject​: [perl #29623] [RESOLVED] Patch for h2xs.t in Perl 5.8.4
From​: "Rafael Garcia-Suarez via RT" <perlbug-followup@​perl.org>
Reply-To​: perlbug-followup@​perl.org
To​: mats@​sm5sxl.net

According to our records, your request regarding
"Patch for h2xs.t in Perl 5.8.4"
has been resolved.

If you have any further questions or concerns, please respond to this message.

For other topics, please create a new ticket.

Please don't feel obligated to say "Thanks" or "Kudos" or "I owe you a beer" -- if you respond to this message it will reopen the ticket. If you must, please send email directly to the person who handled your ticket, and not to the tracking system.

<URL​: http​://rt.perl.org​:80/rt3/Ticket/Display.html?id=29623 >

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

From mats@sm5sxl.net

Thanks. Yes, that seems really weird indeed.
Logically it shouldn't work to place arguments in the middle of
options should it? I mean, it's common practice to put the arguments
after the options... oh well.
I hope you'll solve that problem, it's over my head​:)

Regards,
Mats

What I don't explain, is, why does this test work for me ? I can see
that h2xs uses Getopt​::Long with the configuration option pass_through,
so your patch looks fine, but it may only hide a deeper bug.

*** h2xs.t.orig Tue Aug 12 11​:42​:37 2003
--- h2xs.t Sun May 16 15​:13​:38 2004
***************
*** 117,123 ****
Writing $name/MANIFEST
EONOXSFILES

! "-f -n $name $header -b $thisversion", $], <<"EOXSFILES",
Writing $name/ppport.h
Writing $name/lib/$name.pm
Writing $name/$name.xs
--- 117,123 ----
Writing $name/MANIFEST
EONOXSFILES

! "-f -n $name -b $thisversion $header", $], <<"EOXSFILES",
Writing $name/ppport.h
Writing $name/lib/$name.pm
Writing $name/$name.xs

@p5pRT
Copy link
Author

p5pRT commented May 18, 2004

From @sciurius

[Quoting Mats Peterson, on May 18 2004, 15​:31, in "Re​: [perl #29623] Pa"]

Thanks. Yes, that seems really weird indeed.
Logically it shouldn't work to place arguments in the middle of
options should it? I mean, it's common practice to put the arguments
after the options... oh well.

Getopt​::Long allows command line arguments and options to be mixed by
default.

-- Johan

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