Bug 204250 - Review Request: Ngspice - A mixed level/signal circuit simulator
Review Request: Ngspice - A mixed level/signal circuit simulator
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Package Reviews List
:
Depends On:
Blocks: FE-ACCEPT
  Show dependency treegraph
 
Reported: 2006-08-27 15:02 EDT by Chitlesh GOORAH
Modified: 2008-11-12 13:57 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-30 15:33:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
kevin: fedora‑cvs+


Attachments (Terms of Use)
Build log of ngspice-17-1 with normal rpmbuild (559.29 KB, text/plain)
2006-08-28 06:38 EDT, Mamoru TASAKA
no flags Details
Mock build log of ngspice-17-1 (575.77 KB, text/plain)
2006-08-28 06:40 EDT, Mamoru TASAKA
no flags Details
Mock build log of ngspice-17-3 (840.37 KB, text/plain)
2006-08-30 01:25 EDT, Mamoru TASAKA
no flags Details
ngspice spec file corrected for compilation flags (4.13 KB, text/plain)
2006-08-30 11:30 EDT, Mamoru TASAKA
no flags Details

  None (edit)
Description Chitlesh GOORAH 2006-08-27 15:02:02 EDT
Spec URL: http://chitlesh.googlepages.com/ngspice.spec
SRPM URL: http://chitlesh.googlepages.com/ng-spice-17-1.src.rpm
Description: 
Ngspice is a general-purpose circuit simulator program.
It implements three classes of analysis:
- Nonlinear DC analyses
- Nonlinear Transient analyses
- Linear AC analyses

Ngspice implements the usual circuits elements, like resistors, capacitors,
inductors (single or mutual), transmission lines and a growing number of
semiconductor devices like diodes, bipolar transistors, mosfets (both bulk
and SOI), mesfets, jfet and HFET. Ngspice implements the EKV model but it
cannot be distributed with the package since its license does not allow to
redistribute EKV source code.

Ngspice integrates Xspice, a mixed-mode simulator built upon spice3c1 (and
then some tweak is necessary merge it with spice3f5). Xspice provides a
codemodel interface and an event-driven simulation algorithm. Users can
develop their own models for devices using the codemodel interface.
Comment 1 Chitlesh GOORAH 2006-08-27 16:12:29 EDT
The correct URL is
SRPM URL: http://chitlesh.googlepages.com/ngspice-17-1.src.rpm
Comment 2 Mamoru TASAKA 2006-08-28 06:33:07 EDT
I will review this package.

1. From http://fedoraproject.org/wiki/Packaging/Guidelines :

* rpmlint issue
( also * Exclusion of Static Libraries )
  - W: ngspice devel-file-in-non-devel-package \
     /usr/lib/ng-spice-rework/libbsim4.a
    This static archive should be removed unless there 
    is a reason that this must be installed.
    (Try if this package works well with this archive 
     removed.)

* Compiler flags
  - This package does not accept Fedora specific compilation
    flags and debuginfo rpm is useless.
    Fix Makefile or the environment of "make" invocation
    to use Fedora specific compilation flags.
    (See build log).

2. From http://fedoraproject.org/wiki/Packaging/ReviewGuidelines :

* shared library files
  - Does this package require to call ldconfig? This package
    does not have any shared libraries in default paths.

3. Other things I have noticed :

* Spec file cosmetic issue
  - I think that %{_mandir}/man1/ngnutmeg.1* is more preferable
    than %{_mandir}/man1/ngnutmeg.1.gz .

* File entry
  - /usr/share/doc/ngspice-doc-17/doc/ngspice.info* and
    /usr/share/info/ngspice.info* may be duplicate. Check if
    both of these are needed.

* Mock issue
  - Ah...
    I don't know how to use this package at all!!
    However, I watched some URL and tried:

$ cat > rc.cir <<EOF
Basic RC circuit
r 1 2 1.0
c 2 0 1.0
vin 1 0  pulse (0 1) ac 1
.tran  0.1 7.0
.plot tran  v(2) i(vin)
.end
EOF
$ ngspice  -b -r rc.raw rc.cir
$ ngnutmeg rc.raw
....
...
ngnutmeg * -> plot v(2)

   Then I installed ngspice with rebuilt in mock, I got...

[tasaka1@dhcp151 NGSPICE2]$ ngnutmeg rc.raw
******
** ngnutmeg-17 : data analysis and manipulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Please submit bug-reports to: ngspice-bugs@lists.sourceforge.net
** Creation Date: Mon Aug 28 04:04:22 EDT 2006
******
external error:  no graphics interface; please check compiling instructions
Loading raw data file ("rc.raw") . . . done.
Title:  Basic RC circuit
Name: Transient Analysis
Date: Mon Aug 28 19:18:36  2006
ngnutmeg 4 -> plot v(2)
Can't open viewport for graphics.
ngnutmeg 5 ->

   and.. when I tried the rpm rebuilt with normal rpmbuild,
   I got a X window graph (perhaps as expected)

   So, again, some BR are missing. I attach a full mock build
   log. The diff I am concerned in is:

@@ -189,31 +478,14 @@
 checking whether a program can dlopen itself... (cached) yes
 checking whether a statically linked program can dlopen itself... (cached) yes
 appending configuration tag "F77" to libtool
-checking if libtool supports shared libraries... yes
-checking whether to build shared libraries... yes
-checking whether to build static libraries... yes
-checking for f95 option to produce PIC... -fPIC
-checking if f95 PIC flag -fPIC works... yes
-checking if f95 supports -c -o file.o... yes
-checking whether the f95 linker (/usr/bin/ld) supports shared libraries... yes
-checking dynamic linker characteristics... GNU/Linux ld.so
-checking how to hardcode library paths into programs... immediate
-checking whether stripping libraries is possible... yes
 checking whether windows code is enabled... no
-checking for X... libraries , headers in standard search path
-checking for gethostbyname... yes
-checking for connect... yes
-checking for remove... yes
-checking for shmat... yes
-checking for IceConnectionNumber in -lICE... yes
-checking for main in -lXaw... yes
-checking for main in -lXmu... yes
-checking for XShmAttach in -lXext... yes
-checking for bison... bison -y
-checking for flex... flex
-checking for yywrap in -lfl... yes
-checking lex output file root... lex.yy
-checking whether yytext is a pointer... yes
+checking for X... no
+checking for bison... no
+checking for byacc... no
+checking for flex... no
+checking for lex... no
+checking for yywrap in -lfl... no
+checking for yywrap in -ll... no
 checking for pid_t... yes
 checking return type of signal handlers... void
 checking for dirent.h that defines DIR... yes
@@ -295,7 +567,7 @@
 checking readline/history.h usability... yes
 checking readline/history.h presence... yes
 checking for readline/history.h... yes
-checking for library containing tputs... -lncurses
+checking for library containing tputs... -ltermcap
 checking for readline in -lreadline... yes
 BSD editline disabled.
 configure: creating ./config.status
@@ -447,12 +719,7 @@
 checking for style of include used by make... GNU
 checking dependency style of gcc... gcc3
 checking how to run the C preprocessor... gcc -E
-checking for X... libraries , headers in standard search path
-checking for gethostbyname... yes
-checking for connect... yes
-checking for remove... yes
-checking for shmat... yes
-checking for IceConnectionNumber in -lICE... yes
+checking for X... no
 checking for egrep... grep -E
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 
Comment 3 Mamoru TASAKA 2006-08-28 06:38:37 EDT
Created attachment 135036 [details]
Build log of ngspice-17-1 with normal rpmbuild

Build log of ngspice-17-1 with normal rpmbuild.

You can see the Fedora specific compilation flags

-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables

is not passed.
Comment 4 Mamoru TASAKA 2006-08-28 06:40:47 EDT
Created attachment 135037 [details]
Mock build log of ngspice-17-1 

Mock build log of ngspice-17-1.

Please compare this with the previous build of (with normal rpmbuid)
to find the missing BuildRequires.
Comment 5 Chitlesh GOORAH 2006-08-28 15:21:55 EDT
Updated:
Spec URL: http://chitlesh.googlepages.com/ngspice.spec
SRPM URL: http://chitlesh.googlepages.com/ngspice-17-2.src.rpm
Comment 6 Mamoru TASAKA 2006-08-29 03:45:01 EDT
Second review:

* rpmlint issue:
  - Well, will you check rpmlint issue before updating 
  srpm and spec file, please?

  This time mock build is okay (except for one problem),
  however:

E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/include/mif.h
E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/xspice/evt/evtload.c
E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/xspice/cm/cmexport.c
E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/xspice/cm/cmmeters.c
E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/xspice/mif/mif_inp2.c
E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/include/enh.h
E: ngspice-debuginfo script-without-shellbang
/usr/src/debug/ng-spice-rework-17/src/xspice/cmpp/read_ifs.c
...... (continues) .......

  ... perhaps this is due to permission issue. Change permissions
  of \*.{c,h,y,l} to 0644.

E: ngspice-debuginfo wrong-script-end-of-line-encoding
/usr/src/debug/ng-spice-rework-17/src/xspice/cm/cmevt.c
   Perhaps cmevt.c has Windows-like end-of-line encoding.
   Try:
   %{__sed} -i -e 's|\r||' <file>
   to get rid of this error.

* BuildRequires:
   - compat-gcc-32-gc77 is unnecessary.
   This package does not use g77 when rebuilt. I could succeed in
   rebuilding without this package.
   Also, FC-6 devel doesn't have compat-gcc-32-g77 .
   - xorg-x11-proto-devel is required by libX11-devel.
   - libXmu-devel is required by libXaw-devel .
   - libXt-devel is required by libXaw-devel.

   - flex, bison, libtool
   Check if these packages are really needed. For me, mock
   build succeeds without these and the rebuilt packages seems
   functionally okay for the test case in the comment #2.

* Exclusion of Static Libraries:
  - Well, %{_libdir}/ng-spice-rework/libbsim4.a seems unnecessary.
  So, remove this on %install stage by rm command and get rid of
  the use of %exclude.
  
Comment 7 Chitlesh GOORAH 2006-08-29 15:57:13 EDT
Updated:
Spec URL: http://chitlesh.googlepages.com/ngspice.spec
SRPM URL: http://chitlesh.googlepages.com/ngspice-17-3.src.rpm
Comment 8 Mamoru TASAKA 2006-08-29 21:24:51 EDT
Well, not for reviewing issue. however:

I use firefox and when I click the right button on your
http://chitlesh.googlepages.com/ngspice.spec ,
choose "open the link in the new tab" (translated into Japanese),
firefox always try to save this spec file as "file type BIN file"
(in Japanese).

However, when I do the same thing on
http://chitlesh.ch.funpic.de/rpm/libgeda.spec , I can browse the spec
file on firefox.

Anyway, I will check the comment #7 .

Do you know what is causing this difference?
Comment 9 Mamoru TASAKA 2006-08-30 01:25:33 EDT
Created attachment 135186 [details]
Mock build log of ngspice-17-3

Okay. 3rd review.

1. From http://fedoraproject.org/wiki/Packaging/Guidelines

   = rpmlint became silent.

   * Compiler flags
   - I checked this again, however, it is not yet okay.
     My mock build log says:

+ /usr/bin/make
/usr/bin/make  all-recursive
make[1]: Entering directory `/builddir/build/BUILD/ng-spice-rework-17'
Making all in xgraph
make[2]: Entering directory `/builddir/build/BUILD/ng-spice-rework-17/xgraph'
/usr/bin/make  all-am
make[3]: Entering directory `/builddir/build/BUILD/ng-spice-rework-17/xgraph'
if gcc -DHAVE_CONFIG_H -I. -I. -I.	  -g	-MT xgraph.o -MD -MP -MF
".deps/xgraph.Tpo" -c -o xgraph.o xgraph.c; \
	then mv -f ".deps/xgraph.Tpo" ".deps/xgraph.Po"; else rm -f
".deps/xgraph.Tpo"; exit 1; fi
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
.......

    So the compilation in ng-spice-rework-17/xgraph do not accept
    Fedora specific compilation flags.
    Check and change Makefile(.in) in ng-spice-rework-17/xgraph so that
    sources are correctly compiled with Fedora specific compilation
    flags.

2. http://fedoraproject.org/wiki/Packaging/ReviewGuidelines :

   = Nothing.

3. The other things I have noticed :

   = Nothing.

Please see the build log attached in mock.
Comment 10 Chitlesh GOORAH 2006-08-30 06:15:44 EDT
(In reply to comment #8)
> Well, not for reviewing issue. however:
> 
> I use firefox and when I click the right button on your
> http://chitlesh.googlepages.com/ngspice.spec ,
> choose "open the link in the new tab" (translated into Japanese),
> firefox always try to save this spec file as "file type BIN file"
> (in Japanese).
> 
> However, when I do the same thing on
> http://chitlesh.ch.funpic.de/rpm/libgeda.spec , I can browse the spec
> file on firefox.
> 
> Anyway, I will check the comment #7 .
> 
> Do you know what is causing this difference?


Uploading to googlepages might be the reason, I'll opt for funpic.de as much as
I can but forever at funpic i can't upload more that 1.5 mb :(
Comment 11 Mamoru TASAKA 2006-08-30 11:30:32 EDT
Created attachment 135219 [details]
ngspice spec file corrected for compilation flags

(In reply to comment #9)
> Created an attachment (id=135186) [edit]
> Mock build log of ngspice-17-3
> 
> Okay. 3rd review.
> 
> 1. From http://fedoraproject.org/wiki/Packaging/Guidelines
> 
>    = rpmlint became silent.
> 
>    * Compiler flags
>    - I checked this again, however, it is not yet okay.
>      My mock build log says:
> 
> + /usr/bin/make
> /usr/bin/make  all-recursive
> make[1]: Entering directory `/builddir/build/BUILD/ng-spice-rework-17'
> Making all in xgraph
> make[2]: Entering directory `/builddir/build/BUILD/ng-spice-rework-17/xgraph'

> /usr/bin/make  all-am
> make[3]: Entering directory `/builddir/build/BUILD/ng-spice-rework-17/xgraph'

> if gcc -DHAVE_CONFIG_H -I. -I. -I.	  -g	-MT xgraph.o -MD -MP -MF
> ".deps/xgraph.Tpo" -c -o xgraph.o xgraph.c; \
>	then mv -f ".deps/xgraph.Tpo" ".deps/xgraph.Po"; else rm -f
> ".deps/xgraph.Tpo"; exit 1; fi
> 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
> .......
> 
>     So the compilation in ng-spice-rework-17/xgraph do not accept
>     Fedora specific compilation flags.
>     Check and change Makefile(.in) in ng-spice-rework-17/xgraph so that
>     sources are correctly compiled with Fedora specific compilation
>     flags.
> 

Try the spec file attached and add some fix you think it is needed.
If you upload new spec file, then I will check it again.
Comment 12 Chitlesh GOORAH 2006-08-30 12:15:11 EDT
Updated:
Spec URL: http://chitlesh.googlepages.com/ngspice.spec
SRPM URL: http://chitlesh.googlepages.com/ngspice-17-4.src.rpm
Comment 13 Mamoru TASAKA 2006-08-30 13:06:41 EDT
Okay:

This time this package (ngspice) is APPROVED.
Comment 14 Mamoru TASAKA 2006-08-30 13:13:46 EDT
P.S.

Not specified to this package: Just to mention:
* Please remember to close review bugs when necessary process is
  finished.
* For xcircuit and kpolynome :
  It seems that needs.rebuild files are in FC-6 branch.
  Check:
  http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild
  and remove this file by a proper way.
Comment 15 Chitlesh GOORAH 2008-11-11 09:44:51 EST
Package Change Request
=======================
Package Name: Ngspice
Short Description: A mixed level/signal circuit simulator
Owners: chitlesh
Branches: EL-5
 -
Comment 16 Kevin Fenzi 2008-11-12 13:57:06 EST
cvs done.

Note You need to log in before you can comment on or make changes to this bug.