Cygwin 64 bit.
The removal of main.c on recipe for libngspice.la, has left undefined variable around
CC libngspice_la-sharedspice.lo
rm -f spinit spinit.tmp
srcdir=''; \
test -f ./spinit.in || srcdir=/pub/devel/ngspice/ngspice-34-1.x86_64/src/ngspice-34/src/; \
sed -e 's|@XSPICEINIT[@]||g' -e 's|@pkglibdir[@]|/usr/lib/ngspice|g' ${srcdir}spinit.in >spin
it.tmp
mv spinit.tmp spinit
....
CCLD libngspice.la
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: frontend/.libs/libfte.a(misccoms.o):misccoms.c:(.rdata$.refptr.history_file[.refptr.history_file]+0x0): undefined reference to `history_file'
./src/frontend/misccoms.c:extern char history_file[];
./src/frontend/misccoms.c:extern char history_file[];
./src/frontend/misccoms.c: write_history(history_file);
./src/main.c:char history_file[512] = {'\0'};
./src/main.c: strcpy(history_file, getenv("HOME"));
./src/main.c: strcat(history_file, "/.");
./src/main.c: strcat(history_file, application_name);
./src/main.c: strcat(history_file, "_history");
./src/main.c: read_history(history_file);
My guess: please do not use configure flag
--with-readline=yes
nor
--with-editline=yes
It is not required for compiling the shared library. In ngspice-35 there also will be another safe-guard against the conflict shown above.
Last edit: Holger Vogt 2021-05-23
thanks, removing the flag works.