develooper Front page | perl.perl5.porters | Postings from November 2005

[perl #36951] POSIX build fails in bleadperl

Thread Previous | Thread Next
From:
Steve Peters via RT
Date:
November 27, 2005 18:25
Subject:
[perl #36951] POSIX build fails in bleadperl
Message ID:
rt-3.0.11-36951-124909.17.3284392297681@perl.org
> [dcd - Thu Oct 13 23:10:03 2005]:
> 
>   (my reply is at the bottom of the file)
> 
> On Thu, 13 Oct 2005 at 10:20 -0700, Steve Peters via RT <perlbug-
> followup@p...:
> 
> > From: Steve Peters via RT <perlbug-followup@perl.org>
> > To: david.dyck@fluke.com
> > Date: Thu, 13 Oct 2005 10:20:25 -0700
> > Subject: [perl #36951] POSIX build fails in bleadperl
> >
> >> [doughera - Fri Aug 19 13:33:18 2005]:
> >>
> >> On Fri, 19 Aug 2005, David Dyck wrote:
> >>
> >>>> Yes.  This is an older libc5 base 'slackware' system with
> >>>> a 2.4.32-pre1 kernel that has had trouble with signals
> >>>> before.  I think special code had been added to configure
> >>>> to test all the signals individually.  I was surprised when
> >>>> these failures occured in the POSIX build - even though miniperl
> >>>> build fine.
> >>>
> >>> Just wanted to collect some more info for this bug report
> >>>
> >>> The error
> >>>  const-c.inc:2010: `_NSIG' undeclared (first use in this function)
> >>>
> >>> is from the lines
> >>>
> >>> #ifdef SIGRTMAX
> >>>       *iv_return = SIGRTMAX;
> >>>       return PERL_constant_ISIV;
> >>> #else
> >>>       return PERL_constant_NOTDEF;
> >>> #endif
> >>>
> >>> where my <asm/signal.h> (inherited libc5 style
> >>> from the 2.4 kernel sources) has SIGRTMAX
> >>>
> >>> /* These should not be considered constants from userland.  */
> >>> #define SIGRTMIN        32
> >>> #define SIGRTMAX        (_NSIG-1)
> >>
> >> In newer glibc2-based systems, SIGRTMAX is defined to be a C
> library
> >> function: __libc_current_sigrtmax().
> >>
> >>> but _NSIG is only defined when compiling the kernel (#ifdef
> > __KERNEL__)
> >>
> >> only on such hybrid 2.4.x/libc5 systems, I'd bet.  I'd call this a
> > bug in
> >> the headers, but we should still work around it.
> >>
> >> Yes, Configure has previously tested each individual signal, but
> it's
> > not
> >> stored as a really simple config.h #ifdef.  One could do a runtime
> > lookup
> >> for the string "RTMAX" in the sign_name[] array, I suppose.  It'd
> > probably
> >> work just as well to change the test to something like the
> following
> > to
> >> ensure that SIGRTMAX is indeed set to something numeric.
> >>
> >> 	#if defined(SIGRTMAX) && SIGRTMAX > SIGRTMIN
> >>
> > David,
> >
> > Were you able to get this to work when you replace the line
> >
> >    #ifdef SIGRTMAX
> >
> > with
> >
> >    #if defined(SIGRTMAX) && SIGRTMAX > SIGRTMIN
> >
> 
> You were refering to my test program rtmax.c.  With your suggesting
> my test program now prints out.
> 
> SIGRTMIN=32
> #if defined(SIGRTMAX) && SIGRTMAX > SIGRTMIN was false
> 
> $ cat rtmax.c
> #include <signal.h>
> 
> #include <stdio.h>
> int main() {
> #if defined(SIGRTMIN)
>          printf("SIGRTMIN=%d\n", SIGRTMIN);
> #endif
> /* was #if defined(SIGRTMAX) */
> 
> #if defined(SIGRTMAX) && SIGRTMAX > SIGRTMIN
>          printf("SIGRTMAX=%d\n", SIGRTMAX);
> #else
>          printf("#if defined(SIGRTMAX) && SIGRTMAX > SIGRTMIN was
> false\n");
> #endif
> }
> 
> It would be nice to get this idea of yours into the distribution,
> so I wouldn't have to apply the following patch to
>     ext/POSIX/Makefile.PL
> which allows me to build blead perl.
> 
> --- Makefile.PL.orig	Fri Aug 19 12:04:38 2005
> +++ Makefile.PL	Fri Aug 19 12:05:12 2005
> @@ -44,7 +44,7 @@
>         PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX
>         SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT
> SIGALRM
>         SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE
> SIGQUIT
> -      SIGRTMAX SIGRTMIN SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN
> SIGTTOU
> +                        SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN
> SIGTTOU
>         SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX
>         STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX
>         S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID
> S_ISUID
> 

Shoot, I forgot one thing.  Your problems with SIGRTMAX are with the
generated code in the const-c.inc file.  Let me see if I can think of
another way around this.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About