Bug 1440904 - ngspice does not contain shared library
Summary: ngspice does not contain shared library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ngspice
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL: https://sourceforge.net/p/ngspice/sup...
Whiteboard:
: 1492481 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-10 17:45 UTC by maarten
Modified: 2019-01-11 04:33 UTC (History)
7 users (show)

Fixed In Version: ngspice-30-1.fc28 ngspice-30-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 02:59:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description maarten 2017-04-10 17:45:45 UTC
Description of problem:

The package ngspice does not include /usr/lib64/libngspice.so

http://ngspice.sourceforge.net/shared.html

Version-Release number of selected component (if applicable):
0.26-8.fc24

How reproducible:
Always

Steps to Reproduce:
1. $ find /usr/lib64 -name "*ngspice*"

Actual results:
No .so is found.


Expected results:
/usr/lib64/libngspice.so (or similar)


Additional info:
There is a ngspice folder in /usr/lib64 but no so file can be found in there.

Comment 1 Mamoru TASAKA 2017-04-11 07:08:57 UTC
Currently we just does not build shared library.

Comment 2 maarten 2017-04-11 12:47:00 UTC
Do you plan to?
Adding it (or not) is kind of a chicken/egg problem.

Comment 3 Mamoru TASAKA 2017-04-18 07:26:56 UTC
The main problem here is that building with --with-ngshared compiles a bit different source files:
  - i.e. --with-ngshared defined "SHARED_MODULE" macro and the sources differs between with / without this macro

and both --with-ngshared and --without-ngshared (current) option creates some binaries with the same names but their contents a bit differ. So currently there is file conflicts between -with-ngshared ones and --without-ngshared (current) ones, especially;
  /usr/lib64/ngspice/*.cm

So without changing directory hierarchy, we cannot build both.

Comment 4 Mamoru TASAKA 2017-09-18 00:09:54 UTC
*** Bug 1492481 has been marked as a duplicate of this bug. ***

Comment 5 oe.nick 2018-07-30 17:47:44 UTC
Hello Mamoru

I think you should be able to either build the lib with the normal ngspice package or make a lib package too. I just built ngspice 28 and the cm files are not installed with the --with-ngshared option enabled, so only included in the --without-ngshared build configuration. Meaning with the latest ngspice release there does not seem to be any file conflicts.

Comment 6 Marcus 2018-07-30 21:16:06 UTC
It is a known bug that the code model files are different between builds with and without the shared library. A fix has been pushed upstream after the release of ngspice 28. [1]

I would like to suggest to cherrypick this fix, so that the shared library can be enabled in the Fedora ngspice 28 package without any side effects.

[1] https://sourceforge.net/p/ngspice/ngspice/ci/fe8126865afea1553443f131ad28adead8071ab8/

Comment 7 Damian Wrobel 2018-08-06 15:52:21 UTC
It would be nice reconsidering to provide libngspice.so as this would be useful for the newly released kicad[1] which can provide integration[2] with the spice simulator when the shared library is available.

[1] https://src.fedoraproject.org/rpms/kicad/blob/master/f/kicad.spec#_115
[2] https://www.youtube.com/watch?v=2WDPzW6DGzQ

Comment 8 Damian Wrobel 2018-08-07 11:08:10 UTC
(In reply to Damian Wrobel from comment #7)

Pull request for ngspice which provides shared library and -devel subpackage [1]. It's been tested successfully with the kicad compiled using -DKICAD_SPICE=ON [4].

[3] https://src.fedoraproject.org/rpms/ngspice/pull-request/1
[4] https://copr.fedorainfracloud.org/coprs/dwrobel/kicad/build/785261/

Comment 9 Mamoru TASAKA 2018-08-12 12:47:05 UTC
(In reply to Marcus from comment #6)
> It is a known bug that the code model files are different between builds
> with and without the shared library. A fix has been pushed upstream after
> the release of ngspice 28. [1]

Thank you for information, however still the issue on my comment 3 is in effect, i.e. with --with-ngshared , .cm files are compiled with -DSHARED_MODULE=1 , while --without-ngshared, .cm files are compiled with -USHARED_MODULE, so .cm files' behavior is (perhaps) different between --with{,out}-ngshared . You can check the difference in generated config.h.]

- And actually --wht-ngshared builds .cm files as opposed to comment 5 .

So still I cannot figure out how to install .cm files "correctly" when compiled with --with-ngshared.

> 
> I would like to suggest to cherrypick this fix, so that the shared library
> can be enabled in the Fedora ngspice 28 package without any side effects.
> 
> [1]
> https://sourceforge.net/p/ngspice/ngspice/ci/
> fe8126865afea1553443f131ad28adead8071ab8/

Again closing (as CANTFIX)

Comment 10 Mamoru TASAKA 2018-08-12 13:07:19 UTC
So currently it is unsure (for me) if the upstream are going to support simultaneous installation of --with-ngshared and --without-ngshared .

Comment 11 Mamoru TASAKA 2018-08-13 06:03:37 UTC
(Just I want to repeat here: I am not sure if the upstream **supports** imultaneous installation of --with-ngshared and --without-ngshared)

Comment 12 Damian Wrobel 2018-08-13 09:29:26 UTC
>So still I cannot figure out how to install .cm files "correctly" when compiled with --with-ngshared.

Have you looked at the PR[3] and cherry-pick from master[5] it includes? Based on that: 

"Thus there is no longer any difference between code models made during compiling shared ngspice or standard ngspice."

[3] https://src.fedoraproject.org/rpms/ngspice/pull-request/1
[5] https://src.fedoraproject.org/rpms/ngspice/pull-request/1#_1,6

Comment 13 Mamoru TASAKA 2018-08-13 10:44:19 UTC
(In reply to Damian Wrobel from comment #12)
> >So still I cannot figure out how to install .cm files "correctly" when compiled with --with-ngshared.
> 
> Have you looked at the PR[3] and cherry-pick from master[5] it includes?
> Based on that: 
> 
> "Thus there is no longer any difference between code models made during
> compiling shared ngspice or standard ngspice."
> 
> [3] https://src.fedoraproject.org/rpms/ngspice/pull-request/1
> [5] https://src.fedoraproject.org/rpms/ngspice/pull-request/1#_1,6

Again, as I said in comment 9 , there is not only that difference mentioned in the PR, but there is also difference between -DSHARED_MODULE=1 and not.

Comment 14 Mamoru TASAKA 2018-12-30 11:00:26 UTC
Once waiting for reply from the upstream...

Comment 15 Fedora Update System 2019-01-01 07:41:57 UTC
ngspice-29-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-cfba6d272c

Comment 16 Fedora Update System 2019-01-01 07:42:21 UTC
ngspice-29-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-513a22cc85

Comment 17 Fedora Update System 2019-01-02 00:50:11 UTC
ngspice-29-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-513a22cc85

Comment 18 Fedora Update System 2019-01-02 02:49:19 UTC
ngspice-29-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-cfba6d272c

Comment 19 Fedora Update System 2019-01-02 06:20:42 UTC
ngspice-30-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-cfba6d272c

Comment 20 Fedora Update System 2019-01-02 06:21:01 UTC
ngspice-30-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-513a22cc85

Comment 21 Fedora Update System 2019-01-03 04:00:19 UTC
ngspice-30-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-513a22cc85

Comment 22 Fedora Update System 2019-01-03 05:07:27 UTC
ngspice-30-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-cfba6d272c

Comment 23 Fedora Update System 2019-01-11 02:59:01 UTC
ngspice-30-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2019-01-11 04:33:15 UTC
ngspice-30-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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