[SR-Users] gmake: *** [cfg.tab.h] Broken Pipe while make kamailio on solaris 10

Andrei Pelinescu-Onciul andrei at iptel.org
Wed Jun 2 19:51:01 CEST 2010


On Jun 03, 2010 at 01:36, JinKevin <kevin.jzh at hotmail.com> wrote:
> 
> 
>  
> 
> > Date: Wed, 2 Jun 2010 16:54:26 +0200
> > From: andrei at iptel.org
> > To: kevin.jzh at hotmail.com
> > CC: sr-users at lists.sip-router.org
> > Subject: Re: [SR-Users] gmake: *** [cfg.tab.h] Broken Pipe while make kamailio on solaris 10
> > 
> > On Jun 02, 2010 at 08:32, JinKevin <kevin.jzh at hotmail.com> wrote:
> > > 
> > > 
> > > 
> > > Hi Andrei,
> > > 
> > > 
> > > 
> > > gcc -dM -E -x c /dev/null
> > > #define __sparc__ 1
> > > 
> > [...]
> > > 
> > > 
> > > isainfo -n
> > > sparcv9
> > > 
> > > 
> > > 
> > > isainfo -b
> > > 64
> > > 
> > > uname -m
> > > sun4u
> > 
> > Now I remembered :-)
> > The problem on sparcv9 is that you can build either sparc32 or sparc64
> > code. The make system tries to use the configured compiler and use its
> > default architecture, in this case sparc32.
> > This changed from older ser or kamailio version, where IIRC
> > 64 bits was always used on sparcv9 (the isainfo arch was used).
> > The change was needed for better cross-compiler support, snow leopard
> > (boots 32 bits kernel, but gcc is configured to produce 64 bit
> > binaries).
> > 
> > So if you have all the needed 64 bits libs installed, you should compile
> > for sparc64.
> > Either make config CC_EXTRA_OPTS=-m64 or
> > make config ARCH=sparc64
> > should do it (don't forget to re-run it after any make proper).
> > 
> > 
> > [...]
> > > 
> > > And bison is also installed, 
> > > 
> > > yacc -V 
> > 
> > 
> > I couldn't reproduce the yacc/bison problem.
> > For me it compiles flawlessly on an old sparcv9 (solaris 9, bison
> > 1.875d).
> > 
> > Could you try running:
> > yacc -d -b cfg cfg.y
> > by hand and see what happens? (any error? cfg.tab.h and cfg.tab.c
> > created?)
> >
> 
>  
> 
> It just reports "Broken Pipe"
> 
> $ yacc -d -b cfg cfg.y
> Broken Pipe

Looks like your bison or bison package is broken.
One cause might be that you don't have GNU m4 installed or it's not in
the PATH (it's used by bison).
See http://old.nabble.com/Broken-pipe-td1225149.html.

>  
> 
> If I removed the bison , then got some other error as below:
> 
> $ yacc -d -b cfg cfg.y
> "cfg.y", line 103: fatal: invalid escape, or illegal reserved word: expect

You can safely comment out  "%expect 5" at line 103. It's just a warning
killer and for some unkown reason the solaris yacc doesn't seem to like
it (bison understands it and berkley yacc just ignores it).
If you want to compile with this yacc version (after removing %expect
from cfg.y), you would need to run something like:
make config YACC=/usr/ccs/bin/yacc



Andrei



More information about the sr-users mailing list