Just updated my local cocotb installation from git and ran into an issue:
System:
pip install -v -e ./cocotbAdder example ouput:
``$ make SIM=modelsim
make results.xml
make[1]: Entering directory/home/cocotb/examples/adder/tests'
set -o pipefail; MODULE=test_adder TESTCASE= TOPLEVEL="work.adder"
GPI_EXTRA= TOPLEVEL_LANG=verilog
/data/tools/intelFPGA_pro/20.3/modelsim_ase/linux/vsim -c -do sim_build/runsim.do 2>&1 | tee sim_build/sim.log
Reading pref.tcl
ERROR: results.xml was not written by the simulation!
make[1]: * [results.xml] Error 1
make[1]: Leaving directory `/home/cocotb/examples/adder/tests'
make: * [sim] Error 2
```
Also tried some older cocotb version (which gives the same error as in the log above):
331b879e39c587e94837f73eb05f73c04ec20c6e
This is the most recent cocotb version that runs adder example on modelsim without issues:
50418e54f000316257404134a57557ffb877e2c8
Any suggestions?
Thanks
It looks like cocotb-config --libpython returns libpython3.7m.a and it should libpython3.7m.so.
So potentially something here: https://github.com/cocotb/cocotb/blob/master/cocotb/_vendor/find_libpython/__init__.py
@ktbarrett
This is a known issue in find_libpython (https://github.com/ktbarrett/find_libpython/issues/7). I haven't gotten around to testing RHEL systems yet (https://github.com/ktbarrett/find_libpython/issues/4). It turns out that code wasn't as bulletproof as we would like. I am thinking it probably shouldn't be vendored in so that it can always be as up to date as possible.
@ktbarrett Why not change ".a" to ".so" in those cases ?
'.so's might not exist at the location. Its easiest to just filter those names out entirely. I dont think its a difficult problem, I just haven't gotten around to fixing and testing it yet.
I replicated the issue, the "LDLIBRARY" config var is returning "libpython3.7m.a" and not the ".so" in the conda env =/ That's a pretty blatant misconfiguration, but I can add some safety checks to prevent that, just like is done for the "LIBRARY" config var.
@elgorwi Could you try out this change in cocotb/_vendor/find_libpython/__init__.py? https://github.com/ktbarrett/find_libpython/pull/13/commits/95c37b3e2d1d838e5125e69a0df57ff8116ee235
I works on my Debian machine and a CentOS 7 container.
I'll make it an action to vendor in the fix after it makes it into upstream.
Could you try out this change in cocotb/_vendor/find_libpython/__init__.py? ktbarrett/find_libpython@95c37b3
For me, it seems to work with this change.
Thanks for the patch @ktbarrett.
Just tried it and everything seems to be working on my system.