pcmciautils-009 doesn't compile; make: *** [src/yacc_config.o] Error 1

Dominik Brodowski linux at dominikbrodowski.net
Thu Sep 15 15:51:47 EDT 2005


Hello Sander,

On Thu, Sep 15, 2005 at 11:13:41AM +0200, Sander wrote:
> Hello Dominik,
> 
> I saw pcmciautils-009 announced in the archives and tried to compile it
> on an up to date Debian Sid. It bails out with:
> 
> Compiling yacc_config.c:                                              [ERROR]  
>   gcc -pipe -DVERSION="009" -I/usr/src/compile/pcmciautils-009/src -Wall -Wchar
>   -subscripts -Wpointer-arith -Wsign-compare -Wno-pointer-sign -Wdeclaration-af
>   ter-statement -Wshadow -I/usr/lib/gcc/i486-linux-gnu/4.0.2/include -Os -fomit
>   -frame-pointer -D_GNU_SOURCE -c -o src/yacc_config.o src/yacc_config.c
>   src/yacc_config.c:61: error: syntax error before string constant
>   src/yacc_config.c:92:1: warning: "VERSION" redefined
>   <command line>:1:1: warning: this is the location of the previous definition
> 
>   y.tab.c: In function 'yyparse':
>   y.tab.c:1025: warning: implicit declaration of function 'yylex'
> make: *** [src/yacc_config.o] Error 1
> 
> If I remove src/yacc_config.c line 61 (VERSION ..) it compiles.

Could you try out the attached patch, please?

> Btw, during compile it says OK and ERROR RedHat style in the
> colors red, green and yellow. Especially the yellow text is
> not readible in a white xterm and I assume the other colors
> give problems on x/eterms with different color settings.
> IMVHO this eyecandy is a bit distracting.

Simply set "V=true" in the Makefile in the top directory, then the eyecandy
will go away and "normal" build output will appear.

Thanks,

	Dominik


Index: src/pccardctl.c
===================================================================
--- src/pccardctl.c	(Revision 230)
+++ src/pccardctl.c	(Arbeitskopie)
@@ -218,7 +218,7 @@
 }
 
 static void print_header(void) {
-	printf("pcmciautils %s\n", VERSION);
+	printf("pcmciautils %s\n", PCMCIAUTILS_VERSION);
 	printf("Copyright (C) 2004-2005 Dominik Brodowski, (C) 1999 David A. Hinds\n");
 	printf("Report errors and bugs to <linux-pcmcia at lists.infradead.org>, please.\n");
 }
Index: src/lex_config.l
===================================================================
--- src/lex_config.l	(Revision 230)
+++ src/lex_config.l	(Arbeitskopie)
@@ -15,7 +15,6 @@
  */
 
 #undef src
-#undef VERSION
 
 #include <stdio.h>
 #include <stdlib.h>
Index: src/yacc_config.y
===================================================================
--- src/yacc_config.y	(Revision 230)
+++ src/yacc_config.y	(Arbeitskopie)
@@ -19,7 +19,6 @@
 #include <sys/types.h>
 
 #include "startup.h"
-#undef VERSION
 
 /* If bison: generate nicer error messages */ 
 #define YYERROR_VERBOSE 1
Index: Makefile
===================================================================
--- Makefile	(Revision 230)
+++ Makefile	(Arbeitskopie)
@@ -107,7 +107,7 @@
 WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
 WARNINGS += -Wshadow
 
-CFLAGS := -pipe -DVERSION=\"$(VERSION)\"
+CFLAGS := -pipe -DPCMCIAUTILS_VERSION=\"$(VERSION)\"
 YFLAGS := -d
 
 HEADERS = \



More information about the linux-pcmcia mailing list