> Date: Wed, 2 Jun 2010 19:51:01 +0200
> From: andrei@iptel.org
> To: kevin.jzh@hotmail.com
> CC: sr-users@lists.sip-router.org
> Subject: Re: [SR-Users] gmake: *** [cfg.tab.h] Broken Pipe while make kamailio on solaris 10
>
> On Jun 03, 2010 at 01:36, JinKevin <kevin.jzh@hotmail.com> wrote:
> >
> >
> >
> >
> > > Date: Wed, 2 Jun 2010 16:54:26 +0200
> > > From: andrei@iptel.org
> > > To: kevin.jzh@hotmail.com
> > > CC: sr-users@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@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,
Many thanks!
After comment out the "%expect 5" at line 103, it can go through the "yacc -d -b cfg cfg.y" as below:
====snip=====
gcc -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -Wall    -DNAME='"kamailio"' -DVERSION='"3.0.2"' -DARCH='"sparc64"' -DOS='solaris_' -DOS_QUOTED='"solaris"' -DCOMPILER='"gcc 3.4.6"' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3000002 -DCFG_DIR='"/usr/local/kamailio-3.0/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DF_MALLOC -DUSE_TLS -DTLS_HOOKS -DSTATISTICS -DMALLOC_STATS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DSPARC64_MODE -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H   -c cfg.tab.c -o cfg.tab.o -MMD -MP
/usr/ccs/bin/yaccpar:5: warning: ignoring #pragma ident
/usr/ccs/bin/yaccpar: In function `yyparse':
/usr/ccs/bin/yaccpar:164: warning: label `yynewstate' defined but not used

gcc -m64 -O2  action.o atomic_ops.o basex.o bit_scan.o cfg_core.o cfg_parser.o core_cmd.o crc.o daemonize.o data_lump_rpl.o data_lump.o dns_cache.o dprint.o dset.o dst_blacklist.o endianness.o error.o events.o flags.o forward.o hash_func.o id.o io_wait.o ip_addr.o local_timer.o lock_ops.o lvalue.o main.o md5.o md5utils.o mod_fix.o modparam.o msg_translator.o nonsip_hooks.o pass_fd.o proxy.o pt.o pv_core.o pvapi.o qvalue.o re.o receive.o resolve.o route_struct.o route.o rpc_lookup.o rvalue.o script_cb.o sctp_options.o sctp_server.o select_buf.o select_core.o select.o ser_stun.o shm_init.o signals.o sip_msg_clone.o socket_info.o sr_compat.o sr_module.o stats.o switch.o tcp_main.o tcp_options.o tcp_read.o timer_proc.o timer.o tls_hooks.o tsend.o udp_server.o usr_avp.o ut.o xavp.o mem/dl_malloc.o mem/f_malloc.o mem/ll_malloc.o mem/mem.o mem/memtest.o mem/q_malloc.o mem/sf_malloc.o mem/shm_mem.o parser/hf.o parser/msg_parser.o parser/parse_allow.o parser/parse_body.o parser/parse_content.o parser/parse_cseq.o parser/parse_date.o parser/parse_disposition.o parser/parse_diversion.o parser/parse_event.o parser/parse_expires.o parser/parse_fline.o parser/parse_from.o parser/parse_hname2.o parser/parse_hostport.o parser/parse_identity.o parser/parse_identityinfo.o parser/parse_methods.o parser/parse_nameaddr.o parser/parse_param.o parser/parse_refer_to.o parser/parse_retry_after.o parser/parse_rpid.o parser/parse_rr.o parser/parse_sipifmatch.o parser/parse_subscription_state.o parser/parse_to.o parser/parse_uri.o parser/parse_via.o parser/parser_f.o parser/digest/digest_parser.o parser/digest/digest.o parser/digest/param_parser.o parser/contact/contact.o parser/contact/parse_contact.o parser/sdp/sdp_helpr_funcs.o parser/sdp/sdp.o rand/fastrand.o rand/isaac/rand.o cfg/cfg_ctx.o cfg/cfg_script.o cfg/cfg_select.o cfg/cfg_struct.o cfg/cfg.o lex.yy.o cfg.tab.o  -ldl -lresolv -L/usr/local/lib -lxnet -lnsl  -lrt   -o kamailio
====snip====
Hope this is as expected and I can go forward.
 
Thanks
Kevin
 


搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用!