compiling in linux: tmalloc undefined

2005-02-12
2014-01-12
  • make[3]: Entering directory `/mnt/hda4/hog-hda5/src/electronics/ng-spice-rework-15/src'

    ......................................
    /bin/sh ../libtool --mode=link gcc  -g -O2 -Wall   -o ngspice  conf.o ngspice.o ...

    gcc -g -O2 -Wall -o ngspice conf.o ngspice.o spice.o spicelib/devices/dev.o  fro ...
    ..................................

    spicelib/devices/libdev.a(cktcrte.o)(.text+0x82): In function `CKTcrtElt':

    /usr/src/electronics/ng-spice-rework-15/src/spicelib/devices/cktcrte.c:48: undefined reference to `tmalloc'

     
    • I see there are two alloc.c defining tmalloc.

      Your compiler environment must have botched things up.

       
    • ng-spice-rework-14   did work - compiled without a hitch.

      So the compiler environment was botched in 15 somhow, I think.

       
  • marcel hendrix
    marcel hendrix
    2014-01-12

    I saw this problem in Cygwin64 for ngspice-25 when adding extra compiler options,
    like -fwhole-program. It seems that for some optimizations gcc wants to inspect
    the content of libraries a bit better and references symbols it normally doesn't.
    
    -marcel