# Compiling TubeTK v1.1 or v1.0.0 with ITK 5.3rc03

**URL:** <https://discourse.itk.org/t/compiling-tubetk-v1-1-or-v1-0-0-with-itk-5-3rc03/4853>\
**Category:** Community\
**Tags:** remotemodule, itkv5, build, cmake\
**Created:** [March 7, 2022, 11:36pm UTC](https://discourse.itk.org/t/compiling-tubetk-v1-1-or-v1-0-0-with-itk-5-3rc03/4853 "2022-03-07T23:36:04Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![edgar](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@edgar](https://discourse.itk.org/u/edgar)\
**Post date:** [March 11, 2022, 3:10am UTC](https://discourse.itk.org/t/compiling-tubetk-v1-1-or-v1-0-0-with-itk-5-3rc03/4853/9 "2022-03-11T03:10:56Z")

</div>

Thank you, very much to both of you.

> [@Stephen\\\_Aylward](#):
>
> The DL library isn’t specified for inclusion by TubeTk, but perhaps itk uses it

Yes, I saw that. It’s puzzling, because that error message only happens when TubeTK is enabled in the compilation options of CMake.

> [@Stephen\\\_Aylward](#):
>
> Have you tried removing it from your specification?

Indeed, the `-ldl` has no effect. Frankly, I had removed it already, and failed to tell you about it, sorry [(repo)](https://www.notabug.org/broncodev/itk-pkgbuild/src/extra-modules).

I could try to check which of the replacements of `libdl.so` and `libdl-2.9.so` (in `TubeTK/CMake/TubeTKValgrind.supp` or `testDynamicLoader.cxx`) is helping me. As it is, I still had to replace them in `build.ninja` after running CMake.

```
sed -i "s%libdl[^[:space:];]*\.so[[:digit:].]*%libdl.so.2%g" "${_build_dir}"/build.ninja

```

At the end, I was getting some errors about Java libraries for whatever reason. If I add some paths to my `LD_LIBRARY_PATH`, I can get ITK’s version in Python. I have not tested TubeTK’s functionalities, but this thread is about compilation.

```
 $ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib:/usr/lib/jvm/java-8-openjdk/lib/amd64"
 $ python
Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk; itk.auto_progress(2); itk.Version.GetITKVersion()
Loading ITKPyBase... done
Loading ITKCommon... Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.10/site-packages/itk/support/lazy.py", line 137, in __getattribute__
    base.itk_load_swig_module(module, namespace)
  File "/usr/lib/python3.10/site-packages/itk/support/base.py", line 110, in itk_load_swig_module
    l_module = loader.load(swig_module_name)
  File "/usr/lib/python3.10/site-packages/itk/support/base.py", line 259, in load
    l_spec.loader.exec_module(l_module) # pytype: disable=attribute-error
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/itk/support/../ITKCommonPython.py", line 13, in <module>
    from . import _ITKCommonPython
ImportError: libjvm.so: cannot open shared object file: No such file or directory
>>>
 $ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib:/usr/lib/jvm/java-8-openjdk/lib/amd64:/usr/lib/jvm/java-17-openjdk/lib/server"
 $ python
Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk; itk.auto_progress(2); itk.Version.GetITKVersion()
Loading ITKPyBase... done
Loading ITKCommon... Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.10/site-packages/itk/support/lazy.py", line 137, in __getattribute__
    base.itk_load_swig_module(module, namespace)
  File "/usr/lib/python3.10/site-packages/itk/support/base.py", line 110, in itk_load_swig_module
    l_module = loader.load(swig_module_name)
  File "/usr/lib/python3.10/site-packages/itk/support/base.py", line 259, in load
    l_spec.loader.exec_module(l_module) # pytype: disable=attribute-error
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/itk/support/../ITKCommonPython.py", line 13, in <module>
    from . import _ITKCommonPython
ImportError: libawt_xawt.so: cannot open shared object file: No such file or directory
>>>
 $ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib:/usr/lib/jvm/java-8-openjdk/lib/amd64:/usr/lib/jvm/java-17-openjdk/lib/server:/usr/lib/jvm/java-17-openjdk/lib"
 $ python
Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk; itk.auto_progress(2); itk.Version.GetITKVersion()
Loading ITKPyBase... done
Loading ITKCommon... done
'5.3.0'

```

> [@Stephen\\\_Aylward](#):
>
> That API has been changed multiple times during the ITKv5.3rc series. The v1.1 tag of TubeTK works with ITKv5.3rc03. The master of TubeTK works with the master of ITK. The two cannot be mixed.

Yes, thank you. As I was following our previous conversation [(#4784)](https://discourse.itk.org/t/compiling-minimalpathextraction-with-itk-5-2-1/4784), I did try to match them, and tried an earlier version, just in case. Anyway, what I do think that needs to be changed is this:

[uint8.diff.gz](https://discourse.itk.org/uploads/short-url/qugZRqJmyPwVPQwjmNzlSp5vvtN.gz) (267 Bytes)

I’m sure that this leaves more questions than answers 😛 ! If you want me to test something, let me know. I will later formulate a question regarding the Java libraries.

Thank you again.

---

_[View the full topic](https://discourse.itk.org/t/compiling-tubetk-v1-1-or-v1-0-0-with-itk-5-3rc03/4853)._
