unable to compile perl.c in stable 20020923 release

Russ Allbery rra at stanford.edu
Thu Sep 26 22:44:10 UTC 2002


John Covici <covici at ccs.covici.com> writes:

> OK, I got past that error -- thanks much, but I encountered another
> one.

> gcc -g -O2 -I../include   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.8.0/CORE  -c cc.c
> cc.c: In function `CCsignal':
> cc.c:1615: `my_perl' undeclared (first use in this function)
> cc.c:1615: (Each undeclared identifier is reported only once
> cc.c:1615: for each function it appears in.)

Could you try this patch?  It looks like Perl 5.8.0 is redefining standard
functions in some odd way, and this patch should isolate the effects of
that.

I'm not planning on moving to Perl 5.8.x until 5.8.1 here at Stanford and
it hasn't made it into Debian testing yet, so I'm not set up to test.

diff -u -p -r1.70.2.2 cc.c
--- cc.c	2002/08/26 01:45:13	1.70.2.2
+++ cc.c	2002/09/26 22:42:54
@@ -630,40 +630,6 @@ CCfilter(av)
 #endif /* defined(DO_TCL) */
 
 
-#if defined(DO_PERL)
-
-#include <EXTERN.h>
-#include <perl.h>
-
-extern CV *perl_filter_cv ;
-
-STATIC STRING
-CCperl(av)
-    char	*av[];
-{
-    extern int	PerlFilterActive;
-
-    switch (av[0][0]) {
-    default:
-	return "1 Bad flag";
-    case 'y':
-	if (PerlFilterActive)
-	    return "1 Perl filter already enabled";
-        else if (perl_filter_cv == NULL)
-            return "1 Perl filter not defined" ;
-	PerlFilter(TRUE);
-	break;
-    case 'n':
-	if (!PerlFilterActive)
-	    return "1 Perl filter already disabled";
-	PerlFilter(FALSE);
-	break;
-    }
-    return NULL;
-}
-#endif /* defined(DO_PERL) */
-
-
 #if defined(DO_PYTHON)
 STATIC STRING
 CCpython(av)
@@ -2098,3 +2064,41 @@ STATIC STRING CClowmark(char *av[])
     ICDwrite();
     return ret;
 }
+
+
+
+/* This is last because Perl 5.8.0 does some really odd things with
+   redefinitions of standard functions. */
+
+#if defined(DO_PERL)
+
+#include <EXTERN.h>
+#include <perl.h>
+
+extern CV *perl_filter_cv ;
+
+STATIC STRING
+CCperl(av)
+    char	*av[];
+{
+    extern int	PerlFilterActive;
+
+    switch (av[0][0]) {
+    default:
+	return "1 Bad flag";
+    case 'y':
+	if (PerlFilterActive)
+	    return "1 Perl filter already enabled";
+        else if (perl_filter_cv == NULL)
+            return "1 Perl filter not defined" ;
+	PerlFilter(TRUE);
+	break;
+    case 'n':
+	if (!PerlFilterActive)
+	    return "1 Perl filter already disabled";
+	PerlFilter(FALSE);
+	break;
+    }
+    return NULL;
+}
+#endif /* defined(DO_PERL) */

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list