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)
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.
Reopening, still occurs on rawhide.
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??
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 .
(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.
Both libBLTlite24.so and libBLT24.so are providing the Blt_ResetVector symbol. Not blt issue.
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.
(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?
> (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) .
In that sense, I can try it, but there is no guarantee that it always works.
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.
I decided to add workaround on ngspice side.
ngspice-26-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f8c3bad936
ngspice-26-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b8c129fdc0
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
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
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.
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.