Paul Reich - 2005-12-03

Trying to compile ng-spice with --enable-xpsice.
I get:

if gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../src/include    -O2 -m3dnow
-march=athlon-xp -mcpu=athlon-xp -funroll-loops -fomit-frame-pointer -ansi -fPIC -pipe -Wall
-MT hsm1init.o -MD -MP -MF ".deps/hsm1init.Tpo" -c -o hsm1in it.o hsm1init.c; \ then mv -f ".deps/hsm1init.Tpo" ".deps/hsm1init.Po"; else rm -f ".deps/hsm1init.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../src/include    -O2 -m3dnow
-march=athlon-xp -mcpu=athlon-xp -funroll-loops -fomit-frame-pointer -ansi -fPIC -pipe -Wall
-MT hsm1ld.o -MD -MP -MF ".deps/hsm1ld.Tpo" -c -o hsm1ld.o hsm1ld.c; \   then mv -f ".deps/hsm1ld.Tpo" ".deps/hsm1ld.Po"; else rm -f ".deps/hsm1ld.Tpo";                                                           exit 1; fi
  hsm1ld.c: In function `HSM1load':
  hsm1ld.c:1380: error: incompatible types in return
  hsm1ld.c:1380: error: syntax error at end of input
  hsm1ld.c:173: warning: unused variable `tol4'
  hsm1ld.c:173: warning: unused variable `tol3'
  hsm1ld.c:173: warning: unused variable `tol2'
  hsm1ld.c:173: warning: unused variable `tol'
  make[5]: *** [hsm1ld.o] Error 1
  make[5]: *** [hsm1ld.o] Error 1
  make[5]: Leaving directory `/home/paul/devel/geda/ng-spice-rework-18/src/spiceli                                                          b/devices/hisim'
  make[4]: *** [all-recursive] Error 1
  make[4]: Leaving directory `/home/paul/devel/geda/ng-spice-rework-18/src/spiceli                                                          b/devices'
  make[3]: *** [all-recursive] Error 1
  make[3]: Leaving directory `/home/paul/devel/geda/ng-spice-rework-18/src/spiceli                                                          b'
  make[2]: *** [all-recursive] Error 1
  make[2]: Leaving directory `/home/paul/devel/geda/ng-spice-rework-18/src'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/paul/devel/geda/ng-spice-rework-18'
  make: *** [all] Error 2
[paul@localhost ng-spice-rework-17]$

The system used here is Fedora core 1 with GCC-3.3.2 on kernel 2.6.13.  The code in hsim1ld.c
seems quite convoluted.  It ends with a statement

    return(OK)

but there isn't an "OK" defined anywhere. Think
it might have been written for some other dialect?
It's pretty tough taking an old code base and bringing it up to date.  I'll help.....

Regards,

Paul

Will post some patches for other issues too....