[SyneRBI/SIRF-SuperBuild] Error in import sirf.STIR (Issue #774)

0 views
Skip to first unread message

Enza-994

unread,
Oct 21, 2022, 7:31:21 AM10/21/22
to SyneRBI/SIRF-SuperBuild, Subscribed

ImportError: libismrmrd.so.1.7: cannot open shared object file: No such file or directory, when importing sirf.STIR.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774@github.com>

Kris Thielemans

unread,
Oct 21, 2022, 8:52:34 AM10/21/22
to SyneRBI/SIRF-SuperBuild, Subscribed

Did you source ..../env_sirf.sh which should set PYTHONPATH.

what's your OS by the way?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1286922030@github.com>

Enza-994

unread,
Oct 21, 2022, 10:28:50 AM10/21/22
to SyneRBI/SIRF-SuperBuild, Subscribed

Hello,
I've tried to source ..../env_sirf.sh, but the problem still persists.
My OS is Ubuntu


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1287045588@github.com>

Kris Thielemans

unread,
Oct 21, 2022, 2:20:27 PM10/21/22
to SyneRBI/SIRF-SuperBuild, Subscribed

what is the content after sourcing of LD_LIBRARY_PATH? Did you run the same python as what it used for building (could use $SIRF_PYTHON_EXECUTABLE). Is the libismrmrd.so.1.7 in the expected location? (i.e. /wherever/you/installed/lib).


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1287297031@github.com>

Enza-994

unread,
Oct 24, 2022, 5:06:48 AM10/24/22
to SyneRBI/SIRF-SuperBuild, Subscribed

After sourcing ..../env_sirf.sh, the content of the different paths is the following:
echo $PYTHONPATH gives ../devel/build/INSTALL/python
echo $LD_LIBRARY_PATH gives ../devel/build/INSTALL/lib
echo $SIRF_PYTHON_EXECUTABLE gives ../devel/build/INSTALL/python (or what do you mean by using $SIRF_PYTHON_EXECUTABLE?)
Then, locate libismrmrd.so.1.7.0 gives ../devel/build/INSTALL/lib/libismrmrd.so.1.7.0, so the library is in the expected location

Thank you


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1288693429@github.com>

Kris Thielemans

unread,
Oct 28, 2022, 2:06:30 PM10/28/22
to SyneRBI/SIRF-SuperBuild, Subscribed

$SIRF_PYTHON_EXECUTABLE should be set to something like /usr/bin/python3, so that confuses me a bit. If you have 2 different Python versions installed (often python and python3, or a conda python or ...), it's important to run the same Python version as the one that CMake found.

All other variables should contain absolute paths. If they don't, that could explain your problem (but maybe you just wrote .. as shorthand).

If all that isn't it, you should send us the output of

ldd $PYTHONPATH/sirf/_pysirf.so
ldd $LD_LIBRARY_PATH/libismrmrd.so.1.7.0

Note that if $SIRF_PYTHON_EXECUTABLE is a python 2.* version, it'll probably be best to start over (in a new directory) by using

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 <other-arguments>

Finally, on Ubuntu, you can save some compilation time (and potentially conflicts) but using more system libraries. If you want to go that path, I would recommend making sure they are installed via

cd SIRF-SuperBuild/docker;
sudo bash raw-ubuntu.sh;
sudo bash build_essential-ubuntu.sh;
sudo bash build_python-ubuntu.sh;
sudo bash build_gadgetron-ubuntu.sh;
sudo bash build_system-ubuntu.sh;

(note that a different set of instructions currently applies when using conda) and then

cd ~/devel/build
cmake -USIRF_TAG -USTIR_TAG -UBOOST\* -UBoost* -UHDF5*  -DUSE_SYSTEM_Boost:BOOL=ON -DUSE_SYSTEM_HDF5:BOOL=ON  -DDISABLE_Matlab:BOOL=ON  -DBUILD_Gadgetron:BOOL=OFF   -DPYTHON_EXECUTABLE=/usr/bin/python3  ../SIRF-SuperBuild

that's of course ridiculously complicated. Sorry about that! It's on our list...


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1295304620@github.com>

Enza-994

unread,
Oct 31, 2022, 1:10:34 PM10/31/22
to SyneRBI/SIRF-SuperBuild, Subscribed

Hello!
I will give you the output of:
ldd $PYTHONPATH/sirf/_pysirf.so
ldd $LD_LIBRARY_PATH/libismrmrd.so.1.7.0
The first thing I've noticed is that intially PYTHONPATH and LD_LIBRARY_PATH were set as a repetition of the same path more than one time and ldd $PYTHONPATH/sirf/_pysirf.so and ldd $LD_LIBRARY_PATH/libismrmrd.so.1.7.0 were not finding any file or directory. Then, I've set them manually and here are the outputs:

ldd $PYTHONPATH/sirf/_pysirf.so
linux-vdso.so.1 (0x00007fffaa9ed000)
libpython3.10.so.1.0 => not found
libismrmrd.so.1.7 => /home/mamo/devel/build/INSTALL/lib/libismrmrd.so.1.7 (0x00007f9a56071000)
libboost_thread.so.1.72.0 => /home/mamo/devel/build/INSTALL/lib/libboost_thread.so.1.72.0 (0x00007f9a55e4d000)
libparallelproj_c.so.0.8.0 => /home/mamo/devel/build/INSTALL/lib/libparallelproj_c.so.0.8.0 (0x00007f9a55c34000)
libhdf5_cpp.so.100.1.0 => /home/mamo/devel/build/INSTALL/lib/libhdf5_cpp.so.100.1.0 (0x00007f9a559ca000)
libhdf5.so.100.1.0 => /home/mamo/devel/build/INSTALL/lib/libhdf5.so.100.1.0 (0x00007f9a55400000)
libITKIOJPEG2000-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOJPEG2000-5.2.so.1 (0x00007f9a551ed000)
libITKIOBMP-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOBMP-5.2.so.1 (0x00007f9a54fde000)
libITKIOGDCM-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOGDCM-5.2.so.1 (0x00007f9a54db2000)
libITKIOGIPL-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOGIPL-5.2.so.1 (0x00007f9a54ba4000)
libITKIOJPEG-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOJPEG-5.2.so.1 (0x00007f9a54995000)
libITKIOMeta-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOMeta-5.2.so.1 (0x00007f9a54777000)
libITKIONIFTI-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIONIFTI-5.2.so.1 (0x00007f9a54559000)
libITKniftiio-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKniftiio-5.2.so.1 (0x00007f9a54334000)
libITKIONRRD-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIONRRD-5.2.so.1 (0x00007f9a5411d000)
libITKIOPNG-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOPNG-5.2.so.1 (0x00007f9a53f0b000)
libITKIOTIFF-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOTIFF-5.2.so.1 (0x00007f9a53ceb000)
libITKIOVTK-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOVTK-5.2.so.1 (0x00007f9a53ad5000)
libITKIOImageBase-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKIOImageBase-5.2.so.1 (0x00007f9a5389c000)
libITKCommon-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKCommon-5.2.so.1 (0x00007f9a53559000)
libitksys-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitksys-5.2.so.1 (0x00007f9a53307000)
libitkvnl_algo-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkvnl_algo-5.2.so.1 (0x00007f9a53036000)
libitkvnl-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkvnl-5.2.so.1 (0x00007f9a52517000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9a522f8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9a51f5a000)
libboost_filesystem.so.1.72.0 => /home/mamo/devel/build/INSTALL/lib/libboost_filesystem.so.1.72.0 (0x00007f9a51d3e000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f9a51b0f000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9a51786000)
libmvec.so.1 => /lib/x86_64-linux-gnu/libmvec.so.1 (0x00007f9a5155c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9a51344000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9a50f53000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9a56fb2000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9a50d4f000)
libitkopenjpeg-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkopenjpeg-5.2.so.1 (0x00007f9a50b1b000)
libitkgdcmMSFF-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmMSFF-5.2.so.1 (0x00007f9a5072c000)
libitkgdcmDICT-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmDICT-5.2.so.1 (0x00007f9a5027e000)
libitkgdcmDSED-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmDSED-5.2.so.1 (0x00007f9a4ffd3000)
libitkzlib-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkzlib-5.2.so.1 (0x00007f9a4fdb3000)
libitkjpeg-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkjpeg-5.2.so.1 (0x00007f9a4fb66000)
libITKMetaIO-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKMetaIO-5.2.so.1 (0x00007f9a4f8cf000)
libITKznz-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKznz-5.2.so.1 (0x00007f9a4f6cb000)
libITKNrrdIO-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKNrrdIO-5.2.so.1 (0x00007f9a4f489000)
libitkpng-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkpng-5.2.so.1 (0x00007f9a4f242000)
libitktiff-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitktiff-5.2.so.1 (0x00007f9a4efcf000)
libitkdouble-conversion-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkdouble-conversion-5.2.so.1 (0x00007f9a4edbf000)
libitkv3p_netlib-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkv3p_netlib-5.2.so.1 (0x00007f9a4eaab000)
libitkgdcmjpeg8-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmjpeg8-5.2.so.1 (0x00007f9a4e871000)
libitkgdcmjpeg12-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmjpeg12-5.2.so.1 (0x00007f9a4e638000)
libitkgdcmjpeg16-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmjpeg16-5.2.so.1 (0x00007f9a4e3ff000)
libitkgdcmopenjp2-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmopenjp2-5.2.so.1 (0x00007f9a4e1a2000)
libitkgdcmcharls-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmcharls-5.2.so.1 (0x00007f9a4df2a000)
libitkgdcmuuid-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmuuid-5.2.so.1 (0x00007f9a4dd26000)
libitkgdcmIOD-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmIOD-5.2.so.1 (0x00007f9a4db15000)
libitkgdcmCommon-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libitkgdcmCommon-5.2.so.1 (0x00007f9a4d900000)
libITKEXPAT-5.2.so.1 => /home/mamo/devel/build/INSTALL/lib/libITKEXPAT-5.2.so.1 (0x00007f9a4d6cb000)
ldd $LD_LIBRARY_PATH/libismrmrd.so.1.7.0
linux-vdso.so.1 (0x00007ffd2ee0b000)
libhdf5.so.100.1.0 => /home/mamo/devel/build/INSTALL/lib/libhdf5.so.100.1.0 (0x00007ff4b8bc2000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff4b8839000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff4b849b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff4b8283000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff4b7e92000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff4b7c8e000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff4b9411000)
Yes, with the ".." I was referring to a shorthand.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1297403877@github.com>

Kris Thielemans

unread,
Oct 31, 2022, 5:34:33 PM10/31/22
to SyneRBI/SIRF-SuperBuild, Subscribed

can't see anything wrong... I do see it links to python 3.10. Are you sure you're using that to run as well? If you are, then I guess I'd repeat the above but from in python (i.e. start python, and do a system call to do the ldd calls). If that doesn't show anything missing, I'm out of ideas...


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1297713569@github.com>

Kris Thielemans

unread,
Oct 31, 2022, 5:37:10 PM10/31/22
to SyneRBI/SIRF-SuperBuild, Subscribed

If the above fails, I'm wondering if there's something weird going on when using -DSIRF_EXTRA_CMAKE_ARGS="-DDISABLE_Gadgetron:BOOL=OFF". Could try to set that to ON


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1297716168@github.com>

Edoardo Pasca

unread,
Jan 4, 2023, 10:06:39 AM1/4/23
to SyneRBI/SIRF-SuperBuild, Subscribed

it does say

libpython3.10.so.1.0 => not found

which isn't a great message.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1371045386@github.com>

Kris Thielemans

unread,
Jan 4, 2023, 1:16:22 PM1/4/23
to SyneRBI/SIRF-SuperBuild, Subscribed

true, but presumably calling python3 (or whatever) would fix that.

Maybe safest is to do the ldd call from whithin python:

  1. start python
  2. os.system('ldd $PYTHONPATH/sirf/_pysirf.so')


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1371263821@github.com>

Kris Thielemans

unread,
Mar 1, 2024, 12:47:37 PMMar 1
to SyneRBI/SIRF-SuperBuild, Subscribed

Closed #774 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issue/774/issue_event/11982399018@github.com>

Kris Thielemans

unread,
Mar 1, 2024, 12:47:38 PMMar 1
to SyneRBI/SIRF-SuperBuild, Subscribed

Closing as no response. Feel free to re-open.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF-SuperBuild/issues/774/1973624068@github.com>

Reply all
Reply to author
Forward
0 new messages