During make process, i encountered with the following errors.
[modestpe@ggx-srv1 release]$ make
Making all in src
make[1]: Entering directory `/home/modestpe/Downloads/ngspice-27/release/src'
Making all in include/ngspice
make[2]: Entering directory `/home/modestpe/Downloads/ngspice-27/release/src/include/ngspice'
make all-am
make[3]: Entering directory `/home/modestpe/Downloads/ngspice-27/release/src/include/ngspice'
make[3]: Leaving directory `/home/modestpe/Downloads/ngspice-27/release/src/include/ngspice'
make[2]: Leaving directory `/home/modestpe/Downloads/ngspice-27/release/src/include/ngspice'
Making all in misc
make[2]: Entering directory `/home/modestpe/Downloads/ngspice-27/release/src/misc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/modestpe/Downloads/ngspice-27/release/src/misc'
Making all in maths
make[2]: Entering directory `/home/modestpe/Downloads/ngspice-27/release/src/maths'
Making all in cmaths
make[3]: Entering directory `/home/modestpe/Downloads/ngspice-27/release/src/maths/cmaths'
CCLD test_cx_mag
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
/usr/local/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
make[3]: *** [test_cx_mag] Error 1
make[3]: Leaving directory `/home/modestpe/Downloads/ngspice-27/release/src/maths/cmaths'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/modestpe/Downloads/ngspice-27/release/src/maths'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/modestpe/Downloads/ngspice-27/release/src'
make: *** [all-recursive] Error 1
I don't know what to do in order to fix this issues. Any help would be much appreciated.
Please edit your message for readability: mark the output text and format it into code (fourth button from the left).
Did you use 'make clean' before starting 'make'? This sometimes helps.
Hello,
your log shows "/usr/local/lib/libreadline.so", which means you have used a readline library which was not part of your unix distribution. The unresolved externals are functions from the "curses" library, or of one of its substitutes. You have not linked with this library. I suggest to use the resources of your unix distribution instead of trying your homegrown libreadline. Or add the libraries which your libreadline is refering to to the LIBS variable when invoking "configure". This all depends a great many on the arguments you have given to "configure", which you haven't posted in your request.
Thank you Holger, I tried to edit my original post. But I couldn't figure out how to edit my original post. I did use "make clean" and reissue configure commnad
" ../configure --with-x --with-readline=yes --disable-debug LDFLAGS="-L/usr/local/lib/"
"make"
still results in same error messages.
Thank you Robert, I tried to use the following commands. But still same issues. Is this right way to set LIBS variable you mentioned before?
make clean
../configure --with-x --with-readline=yes --disable-debug LDFLAGS="-L/usr/local/lib/"
make
I am using RHEL 7 for my simulation platform with minimum support option from redhat. Therefore, all development libraries has to be built from scratch. Do you think I would better move onto Ubuntu platform which has better software package support? Thanks,
Hello,
I can not remember whether it was LIBS or LDFLAGS, but you can easily find out yourself.
just add V=1 to the make invockation, thus run make V=1
you will then see with which arguments the compiler and linker is exectuted, and infer whether your additional flags have been properly added, have overriden important stuff, or have not been used at all. I think you need something like -lterminfo or -ltermcap or -lcurses or ... I can not guess from here. I don't know whether "readline" is that much important for you, you might simply configure without "readline" and try whether that is a simple work around for you. I can not imagine redhat doesn't provide those libraries, that would be real laughable for today standards. Other distributions for sure do have those libs nicely packaged and readily available,
but you need to "install" them, which means you still have to search and learn which ones to select in their package manager.
Diff:
I reran with V=1 option. It looks to me that gcc is executed with proper library dependency. I installed ncurse and readline as shared libraries. But, I am not quite sure I installed correctly. Do you think there is ways to confirm those are properly installed. I guess setting LDFLAG is right way to designate non-shared library directory. I'd appreciate your help again.
please show the relevant part of the configure output, when it talks about readline curses etc.
then please run ldd /your/libreadline...
on my system this mentions beeing dynamically linked to libtinfo
and if I then run nm -D on/this/libtinfo I can see that the symbols which you are lacking
are provided in this library.
and please remove the trailing / in your -L arguments, as it leads to a // which in your compile log. Thats certainly not your current problem, but it might easily lead to another one.
Hi Robert,
Thank you for your help again. Here is the configure output.
Here is the ldd information for readline
I couldn't take a look at the symbol information on "/libtinfo" since I don't see this.
I guess my libreadline.so has linked to weird library when libreadline get compiled. How do I make sure libreadline linked into libtinfo? Thank you for your help again.
1) In regards to undefined symbo in libreadline.so
It turns out that I need to recompile libreadline. During libreadline compilation, some of variables has to be linkedin to libreadline. But I couldn't figure out how to do so.
2) I moved to ubuntu platform which doesn't have any issues with libreadline.so. However, I encountered with other problems with compiling adms executable. Here is the error messages during make. If you could provide any help, it would be very nice.
Hello,
regarding adms, did you use the proper version of adms ?
try this, not the sourceforge one, neither some tar.gz, use the git Qucs adms repo:
then I usually don't install the adms executable, instead I use them
right from the place where I build them, I do:
Hello Robert,
Thank you so much Robert, I was able to install admsXml and ngspice based on your guideline. So far so good. I am going to develop new transistor model (a-ZnOx based thin-film transistor) and new memory model (pMTJ, perpendicular MagnetoTunnelResistance) on ngspice + admsXml. Thanks.
Fine if it does work now.
Be prepared to rough edges with adms, try to start with very simple .va,
and only slowly and incrementally make it more complex. The translation mechanism is quite
incomplete. Have a look too at the few ngspice internal .va models to get an idea what works
and what doesn't.
Regards,