[barcode] Solaris9, build fails -> patch offered.

Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk
Fri Feb 6 19:15:40 CET 2004


On Solaris9 with recent tools :
gcc (GCC) 3.3.2
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.9

the build for barcode-0.98 fails thusly (I know from the archives
that confdefs.h is not a problem, I include it for completeness):

creating ./config.status
creating Makefile
Can't open confdefs.h
creating ./config.status
creating doc/Makefile
brains hgs 291 %> gmake
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o library.o library.c
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o ean.o ean.c
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o code128.o code128.c
code128.c: In function `Barcode_128c_encode':
code128.c:219: warning: subscript has type `char'
code128.c:219: warning: subscript has type `char'
code128.c: In function `Barcode_128_encode':
code128.c:467: warning: subscript has type `char'
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o code39.o code39.c
        [some lines elided]
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o codabar.o codabar.c
codabar.c: In function `Barcode_cbr_encode':
codabar.c:130: warning: subscript has type `char'
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o ps.o ps.c
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o pcl.o pcl.c
ar r libbarcode.a library.o ean.o code128.o code39.o code93.o i25.o
msi.o plessey.o codabar.o ps.o pcl.o
ar: creating libbarcode.a
ranlib libbarcode.a
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o main.o main.c
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER    -c -o cmdline.o cmdline.c
gcc -O -c compat/getopt.c -o compat/getopt.o
gcc -g -O2 -Wall  -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1  -DNO_GETOPT
-DNO_LIBPAPER  main.o cmdline.o compat/getopt.o -L. -lbarcode  -o
barcode
awk -f doc/manpager doc/doc.barcode
awk: syntax error near line 23
awk: illegal statement near line 23
awk: syntax error near line 35
awk: illegal statement near line 35
awk: syntax error near line 36
awk: illegal statement near line 36
awk: syntax error near line 41
awk: illegal statement near line 41
awk: syntax error near line 42
awk: illegal statement near line 42
awk: syntax error near line 47
awk: illegal statement near line 47
awk: syntax error near line 48
awk: illegal statement near line 48
awk: syntax error near line 53
awk: illegal statement near line 53
awk: bailing out near line 53
gmake: *** [barcode.1] Error 2
brains hgs 292 %>


I created this patch, the intention of which is to test for GNU AWK:
-----8<-----
--- ./barcode-0.98/configure.in.orig	2000-11-08 18:52:55.000000000 +0000
+++ ./barcode-0.98/configure.in	2004-02-06 15:10:14.966510000 +0000
@@ -3,6 +3,7 @@
 AC_INIT(barcode.h)
 AC_PREREQ(2.12)

+AC_PROG_AWK
 AC_PROG_CC
 AC_PROG_RANLIB
 AC_PROG_INSTALL
--- ./barcode-0.98/Makefile.in.orig	2001-10-17 14:26:21.000000000 +0100
+++ ./barcode-0.98/Makefile.in	2004-02-06 15:11:52.308209000 +0000
@@ -2,6 +2,7 @@
 # This Makefile should run fine with both pmake and gmake
 #

+AWK = @AWK@
 CC = @CC@
 CFLAGS = @CFLAGS@ @DEFS@ @NO_GETOPT@ @NO_LIBPAPER@ @NO_STRERROR@
 RANLIB = @RANLIB@
@@ -55,7 +56,7 @@
 	$(RANLIB) $(LIBRARY)

 $(MAN1) $(MAN3): doc/doc.$(TARGET)
-	awk -f doc/manpager doc/doc.$(TARGET)
+	${AWK} -f doc/manpager doc/doc.$(TARGET)


 # Unfortunately, pmake has no "-C". Also, "pmake -n" doesn't follow the cd.
-----8<-----

This seems to fix the problem for me.

        HTH
        Hugh


More information about the barcode mailing list