[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a2ps compile fails on HP-UX 11.11 - solution

From: Geoff Thompson
Subject: a2ps compile fails on HP-UX 11.11 - solution
Date: Thu, 30 Oct 2003 20:04:23 -0800


I downloaded a2ps-4.13 and tried to compile 
it on HP-UX 11.11 and had a couple of problems.

I had a problem in the m4 directory where the
make would just hang at this line:

        rm -f Makefile.am Makefile.amt
        sed -n '1,/^##m4-files-begin/p'  > Makefile.amt

but this was resolved by installing GNU m4 and GNU make. 

I also had a problem in the lib directory which
was not resolved with these utilities. When trying to
compile quotearg.c I see the following:

/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H 
-DSYSCONFFILE=\"/usr/local/etc/a2ps.cfg\" -I.. -I../intl -I.     -c -o 
quotearg_.lo quotearg_.c
cc -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/local/share/locale\" 
-DSYSCONFFILE=\"/usr/local/etc/a2ps.cfg\" -I.. -I../intl -I. -c quotearg_.c 
-Wp,-M.deps/quotearg_.TPlo -o quotearg_.o
(Bundled) cc: "quotearg.c", line 345: error 1000: Unexpected symbol: "mbstate".
(Bundled) cc: "quotearg.c", line 261: warning 30: Character constant contains 
undefined escape sequence.
(Bundled) cc: "quotearg.c", line 345: error 1588: "mbstate_t" undefined.
(Bundled) cc: "quotearg.c", line 346: error 1588: "mbstate" undefined.

I looked at the mbstate_t type and see that the #define
expects it to come from #include <wchar> or a file that
it includes, but that's not working. 

I also see that mbstate_t is in strftime.c and compiling
that also failed. 

I did a web search and found a letter in the GNU archive:



make fails on a2ps 4.13b

From:  Peter Meisel 
Subject:  make fails on a2ps 4.13b 
Date:  Wed, 09 Apr 2003 12:49:42 +0200 
User-agent:  Mozilla/5.0 (X11; U; SunOS sun4u; en-US;rv:1.0.1) Gecko/20020920 

I'm trying to install the new version of a2ps 4.13b. I fetched the sources, 
unzipped and untarred it. I did a configure and then I typed make. I did all 
like you described in tht INSTALL-manual. But I got a error message and i 
cannot figure it out what I have to do, that make will work.

Here the messages:

source='quotearg.c' object='quotearg.lo' libtool=yes \
depfile='.deps/quotearg.Plo' tmpdepfile='.deps/quotearg.TPlo' \
depmode=gcc /bin/sh ../auxdir/depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H 
-DSYSCONFFILE=\"/progs/tools/src/a2ps.4.13b//etc/a2ps.cfg\" -I.. -I../intl -I. 
-g -O2 -c -o quotearg.lo quotearg.c
gcc -DHAVE_CONFIG_H -DLOCALEDIR=\"/progs/tools/src/a2ps.4.13b//share/locale\" 
-DSYSCONFFILE=\"/progs/tools/src/a2ps.4.13b//etc/a2ps.cfg\" -I.. -I../intl -I. 
-g -O2 -c quotearg.c -Wp,-MD,.deps/quotearg.TPlo -o quotearg.o
quotearg.c: In function `quotearg_buffer_restyled':
quotearg.c:345: `mbstate_t' undeclared (first use in this function)
quotearg.c:345: (Each undeclared identifier is reported only once
quotearg.c:345: for each function it appears in.)
quotearg.c:345: parse error before "mbstate"
quotearg.c:346: `mbstate' undeclared (first use in this function)
*** Error code 1
make: Fatal error: Command failed for target `quotearg.lo'
Current working directory /home/meisel/progs/a2ps-4.13/lib
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /home/meisel/progs/a2ps-4.13
*** Error code 1
make: Fatal error: Command failed for target `all-recursive-am'

I try to install on:

SunOS hfuhruhurr 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-5_10

Please can you give me an hint!?

Peter Meisel +49 9131 8523124
Paul-Gordan-Strasse 5 91052 Erlangen


As you can see, he is on a different machine to me and is
using the gcc compiler whereas I am on:

   HP-UX hpbwc2 B.11.11 U 9000/785 2010130448 unlimited-user license

and using HP's compiler.

I looked in /usr/include/wchar.h and found that it references
mbstate_t like the example below, but defines the #include 
specifically like this:

#include <sys/_mbstate_t.h>
extern size_t mbrlen __((const char *, size_t, mbstate_t *));


So I edited quotearg.c like so:

#include <sys/_mbstate_t.h>          <<<<<<<<<<<<<<< ADDED THIS LINE
# include <wchar.h>
# define iswprint(wc) 1
# define mbrtowc(pwc, s, n, ps) 1
# define mbsinit(ps) 1
# define mbstate_t int

and the compile went fine, and it even compiled strftime.c
which was weird. Installed and working fine.

Geoff Thompson               Customer Interaction Solutions
Email:  address@hidden         HP Services - Consulting & Integration
Phone:  408-447-4297         Hewlett Packard, Cupertino, CA
Mobile: 408-204-5297         http://cislab.cup.hp.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]