eeschema: ngspice - load versioned library (patch available)

Bug #1785798 reported by Damian Wrobel on 2018-08-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

eeschema tries to load on Unix machines "" file:

m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) );

however, this file is usually provided by -devel[1] sub-package and not by the ngspice package. Additionally loading unversioned "" doesn't guarantee that eeschema will load ABI compatible shared library as it might point to "" which might not be totally incompatible with .so.0 version.

The attached patch proposes to load versioned "" on Unix machines.


Damian Wrobel (dwrobel) wrote :

Patch tested successfully on Fedora 28 with kicad v5.0.0 [2].


tags: added: ngspice
Wayne Stambaugh (stambaughw) wrote :

@Damian, your patch does not solve the issue you reported. By using a hard coded shared object version number (0 in this case), there is no guarantee that when the next version of the shared object is released that this wont break either. The only way I know to guarantee the correct shared object gets loaded at run time is to determine the shared object used during the build configuration and set the shared object name accordingly.

Changed in kicad:
status: New → Triaged
importance: Undecided → Low
tags: added: fedora
Damian Wrobel (dwrobel) wrote :

>The only way I know to guarantee...
In practice, this wouldn't prevents you, in any way, from upstream which will break the API without soname bump.

>there is no guarantee that when the next version of the shared object is released that this wont break either.

But with the patch, if it breaks, it means that API (probably) has changed and you simply need to recompile the kicad (or provide appropriate version if kicad is expecting a newer version). On the other hand you will see a popup that you don't have an appropriate library instead of situation in which kicad will blindly try to load e.g. .so.1 via .so symlink and possibly crash.

Changed in kicad:
status: Triaged → Fix Committed
milestone: none → 5.1.0
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers