LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   the question of ngspice.I confused! (http://www.linuxquestions.org/questions/debian-26/the-question-of-ngspice-i-confused-815874/)

genime 06-23-2010 05:18 AM

the question of ngspice.I confused!
 
I use the ubuntu10.04,and download the ng-spice-rework-20.tar.gz,I use:
./configure --enable-xgraph --with-readline=yes
but it tells me "error: Couldn't find GNU readline headers."
and can't 'make' ,how can I solve it?

I also tried:
./configure --enable-x --with-x
make
sudo make install
but it tells me "no graphics interface" However I want the graphics interface .

I had added the following libraries:
g++
libgtk2.0-dev
libxaw7-dev

You can download it:http://sourceforge.net/projects/ngspice/
Thank you!
genime

knudfl 06-23-2010 08:35 AM

Welcome to LQ. .. .. :)

This will bring you a little further ...

sudo apt-get install \
libreadline6-dev libx11-dev libice-dev libxext-dev libxmu-dev

./configure \
--enable-xgraph --with-readline=yes --enable-x --with-x
.. is OK.
..

genime 06-23-2010 11:28 AM

Then I 'make',but appear follows can't continue:


make all-recursive
make[1]: Entering directory `/tmp/ng-spice-rework-20/ngspice-20'
Making all in xgraph
make[2]: Entering directory `/tmp/ng-spice-rework-20/ngspice-20/xgraph'
make all-am
make[3]: Entering directory `/tmp/ng-spice-rework-20/ngspice-20/xgraph'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -MT xgX.o -MD -MP -MF ".deps/xgX.Tpo" -c -o xgX.o xgX.c; \
then mv -f ".deps/xgX.Tpo" ".deps/xgX.Po"; else rm -f ".deps/xgX.Tpo"; exit 1; fi
xgX.c:46:26: error: bitmaps/dot.11: No such file or directory
xgX.c:48:28: error: bitmaps/mark1.11: No such file or directory
xgX.c:49:28: error: bitmaps/mark2.11: No such file or directory
xgX.c:50:28: error: bitmaps/mark3.11: No such file or directory
xgX.c:51:28: error: bitmaps/mark4.11: No such file or directory
xgX.c:52:28: error: bitmaps/mark5.11: No such file or directory
xgX.c:53:28: error: bitmaps/mark6.11: No such file or directory
xgX.c:54:28: error: bitmaps/mark7.11: No such file or directory
xgX.c:55:28: error: bitmaps/mark8.11: No such file or directory
xgX.c:58: error: ‘dot_width’ undeclared here (not in a function)
xgX.c:59: error: ‘dot_height’ undeclared here (not in a function)
xgX.c:60: error: ‘mark1_width’ undeclared here (not in a function)
xgX.c:61: error: ‘mark1_height’ undeclared here (not in a function)
xgX.c:62: error: ‘mark1_x_hot’ undeclared here (not in a function)
xgX.c:63: error: ‘mark1_y_hot’ undeclared here (not in a function)
xgX.c: In function ‘init_once’:
xgX.c:145: error: ‘dot_bits’ undeclared (first use in this function)
xgX.c:145: error: (Each undeclared identifier is reported only once
xgX.c:145: error: for each function it appears in.)
xgX.c:148: error: ‘mark1_bits’ undeclared (first use in this function)
xgX.c:150: error: ‘mark2_bits’ undeclared (first use in this function)
xgX.c:152: error: ‘mark3_bits’ undeclared (first use in this function)
xgX.c:154: error: ‘mark4_bits’ undeclared (first use in this function)
xgX.c:156: error: ‘mark5_bits’ undeclared (first use in this function)
xgX.c:158: error: ‘mark6_bits’ undeclared (first use in this function)
xgX.c:160: error: ‘mark7_bits’ undeclared (first use in this function)
xgX.c:162: error: ‘mark8_bits’ undeclared (first use in this function)
make[3]: *** [xgX.o] Error 1
make[3]: Leaving directory `/tmp/ng-spice-rework-20/ngspice-20/xgraph'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/ng-spice-rework-20/ngspice-20/xgraph'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/ng-spice-rework-20/ngspice-20'
make: *** [all] Error 2


why?
genime

knudfl 06-23-2010 12:26 PM

Well, what could possibly not have been installed ?
( I have no errors at all with ngspice / Ubuntu 10.04.)

May be : sudo apt-get install bison libncurses5-dev

Besides that :
Better start from scratch in /home/<name>/tmp/.
' /tmp/ ' and other directories outside $HOME
are not meant to be used for building software.

And about xgraph :
xgraph is an old application ( mostly 2004.)
Usually 'ygraph' or 'pgplot' are used instead.
..

knudfl 06-23-2010 12:57 PM

About ngSpice : you can also install version "20-1" with Synaptic.
Or 'apt-get install ngspice easyspice gspiceui'

'easyspice' and 'gspiceui' are two GUIs for *Spice.
( You will probably not be able to build the old (2003) xspice
present in ngspice-21/src/ ).

..

genime 06-24-2010 06:36 AM

Finally I success.
Thank you knudfl very much!
I love this forum and will come here later constantly.

genime

dhytxz 03-16-2011 05:11 AM

the same question...I still can't solve
 
Quote:

Originally Posted by genime (Post 4013519)
Finally I success.
Thank you knudfl very much!
I love this forum and will come here later constantly.

genime

At first I have the same question as genime: Couldn't find GNU readline headers,
but after I did what Knudfl told me I also confronted the question and it displays:
make[3]: *** [xgX.o] Error 1
make[3]: Leaving directory `/tmp/ng-spice-rework-20/ngspice-20/xgraph'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/ng-spice-rework-20/ngspice-20/xgraph'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/ng-spice-rework-20/ngspice-20'
make: *** [all] Error 2


but I use sudo make and I can make it.
however, I launched ngspice and I can not use plot, it tells me:
Can't open viewport for graphics.

How can I solve it.
Thank you!

DingHy

knudfl 03-16-2011 06:39 AM

@ dhytxz, post # 8 : Welcome to LQ.

First : /tmp/ should not be used for building software.
( The use of /tmp/ may alter the /tmp/ permissions.)
The default build location is /home/<name>/tmp/
( Or any other folder in /home/<name>/ ).

sudo apt-get install ngspice : Will install ngspice (20-1)
http://packages.ubuntu.com/maverick/ngspice ( ng-spice-rework )

Building ng-spice-rework http://sourceforge.net/projects/ngspice/files/
http://sourceforge.net/projects/ngsp...ar.gz/download
cd ngspice-22/ &&
./configure --enable-xgraph --with-readline=yes --enable-x --with-x
&& make && sudo make install

Commands : ngspice ; ngspice 1 -> help : Will open the help GUI.
ngspice 2 -> plot <any-number> : Will open the plot GUI.


All times are GMT -5. The time now is 06:50 AM.