On Jun 02, 2010 at 08:32, JinKevin <kevin.jzh(a)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?)
Andrei