Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1047056 - tclspice is broken due to undefined symbol from BLT
Summary: tclspice is broken due to undefined symbol from BLT
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ngspice
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-28 18:38 UTC by Fabrice Salvaire
Modified: 2016-07-20 23:49 UTC (History)
7 users (show)

Fixed In Version: ngspice-26-5.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-20 17:49:42 UTC
Type: Bug


Attachments (Terms of Use)

Description Fabrice Salvaire 2013-12-28 18:38:24 UTC
Description of problem:

libspice.so cannot be loaded due to undefined symbol: Blt_GetVector

Version-Release number of selected component (if applicable):

Fedora 18

How reproducible:

always

Steps to Reproduce:
1. cd /usr/share/doc/ngspice-23/examples/tclspice/tcl
2. wish test_vectoblt.tcl

Actual results:

Error in startup script: couldn't load file "/usr/lib64/tclspice/libspice.so": /usr/lib64/tclspice/libspice.so: undefined symbol: Blt_GetVector
    while executing
"load $library spice"
    (procedure "Loadspice" line 13)
    invoked from within
"Loadspice 23 /usr/lib64/tclspice"
    ("package ifneeded spice 23" script)
    invoked from within
"package require spice"
    (file "test_vectoblt.tcl" line 8)

Comment 1 Fedora End Of Life 2014-02-05 22:37:16 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 2 Mamoru TASAKA 2016-06-29 14:49:09 UTC
Reopening, still occurs on rawhide.

Comment 3 Mamoru TASAKA 2016-06-29 15:13:50 UTC
Well, I don't know how to fix this on ngspice side. Once switching to blt.

* How to reproduce the issue: (on rawhide)

# dnf install tclspice
  =============> This installs tclspice-26-4.fc25.x86_64

$ cat > tmp.tcl <<EOF
#!/bin/sh
# WishFix \
	exec wish -f "$0" ${1+"$@"}
###

package require BLT
namespace import blt::*
lappend auto_path "/usr/lib64/tclspice"
package require spice
EOF

$ bash ./tmp.tcl

Then currently I get:
Error in startup script: couldn't load file "/usr/lib64/tclspice/libspice.so": /usr/lib64/tclspice/libspice.so: undefined symbol: Blt_ResetVector
    while executing
"load $library spice"
    (procedure "Loadspice" line 13)
    invoked from within
"Loadspice 26 /usr/lib64/tclspice"
    ("package ifneeded spice 26" script)
    invoked from within
"package require spice"
    (file "./tmp.tcl" line 9)


Well, since blt provides both libBLT24.so and libBLTlite24.so , and it depends on time which library is used when "package require BLT" is executed, so currently libspice.so cannot be linked against libBLTfoo24.so explicitly.

But without explicit linkage, there seems no way to avoid the above error??

Comment 4 Mamoru TASAKA 2016-06-29 15:15:23 UTC
Currently I think the right fix is that libBLT24.so provides symbols that libBLTlite24.so does not provide *ONLY*, and libBLT24.so is linked against libBLTlite24.so .

Comment 5 Mamoru TASAKA 2016-06-29 15:32:05 UTC
(In reply to Mamoru TASAKA from comment #4)
> Currently I think the right fix is that libBLT24.so provides symbols that
> libBLTlite24.so does not provide *ONLY*, and libBLT24.so is linked against
> libBLTlite24.so .

Ah... perhaps this will not work, because dlsym() will fail to find out the symbol on libBLT24.so in this case.

Comment 6 Dmitrij S. Kryzhevich 2016-07-04 03:07:31 UTC
Both libBLTlite24.so and libBLT24.so are providing the Blt_ResetVector symbol. Not blt issue.

Comment 7 Mamoru TASAKA 2016-07-04 03:58:29 UTC
As I already explained in the comment 3, the problem is actually that *BOTH* libBLTlite24.so and libBLT24.so are providing that symbol.

And again as I said in the comment 3:
- Which library is used by "package require BLT" depends on the case, so ngspice side cannot determine to which library libtclspice.so should be linked.
- And without linking "package require spice" does not work.

Comment 8 Dmitrij S. Kryzhevich 2016-07-04 05:48:54 UTC
(In reply to Mamoru TASAKA from comment #7)
> *BOTH* libBLTlite24.so and libBLT24.so are providing that symbol.

I still see no problem here.

> And again as I said in the comment 3:
> - Which library is used by "package require BLT" depends on the case, so
> ngspice side cannot determine to which library libtclspice.so should be
> linked.

And what the reason you decided you can't link ngspice to ANY you need? Have you ever tried?

Comment 9 Mamoru TASAKA 2016-07-04 06:07:34 UTC
> (In reply to Mamoru TASAKA from comment #7)
> > *BOTH* libBLTlite24.so and libBLT24.so are providing that symbol.
> 
> I still see no problem here.
> 
> > And again as I said in the comment 3:
> > - Which library is used by "package require BLT" depends on the case, so
> > ngspice side cannot determine to which library libtclspice.so should be
> > linked.
> 
> And what the reason you decided you can't link ngspice to ANY you need? Have
> you ever tried?

The problem here is that there is no guarantee that e.g. the symbol "Blt_ResetVector" provided by that two libraries have exactly the same internal implementation - because one library is with Tk option (perhaps) and one library without Tk option, so the internal of "Blt_ResetVector" *MIGHT* have some interaction with Tk for the one provided by libBLT24.so while the provided by libBLTlite24.so, it will perhaps not. Also there *MIGHT* be some other implementation deference between the symbol provided by libBLTlite24.so and libBLT24.so.

So for example when libspite.so is linked against Tk version BLT (i.e. libBLT24.so) and "package require BLT" happens to use libBLTlite24.so, it *MIGHT* work without any problem but there is no guarantee (unless _you_ guarantee it) .

Comment 10 Mamoru TASAKA 2016-07-04 06:08:32 UTC
In that sense, I can try it, but there is no guarantee that it always works.

Comment 11 Mamoru TASAKA 2016-07-04 06:14:28 UTC
To be clear,
* "package require BLT" can use libBLTlite24.so and afterwards it uses Blt_ResetVector and so on provided by libBLTlite24.so
* And when libspite.so is linked against libBLT24.so, it may use Blt_ResetVector provided by libBLT24.so
* And their implementations can differ and then can conflict.

Comment 12 Mamoru TASAKA 2016-07-11 04:02:28 UTC
I decided to add workaround on ngspice side.

Comment 13 Fedora Update System 2016-07-11 04:05:42 UTC
ngspice-26-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f8c3bad936

Comment 14 Fedora Update System 2016-07-11 04:06:31 UTC
ngspice-26-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b8c129fdc0

Comment 15 Fedora Update System 2016-07-12 03:55:39 UTC
ngspice-26-5.fc23 has been pushed to the Fedora 23 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-2016-b8c129fdc0

Comment 16 Fedora Update System 2016-07-12 03:59:13 UTC
ngspice-26-5.fc24 has been pushed to the Fedora 24 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-2016-f8c3bad936

Comment 17 Fedora Update System 2016-07-20 17:49:38 UTC
ngspice-26-5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2016-07-20 23:49:10 UTC
ngspice-26-5.fc23 has been pushed to the Fedora 23 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.