Feedback with OIDN install_deps.sh in Kubuntu 18.04

While I try to solve “ninja” problem in 19.04, I show the differences of OIDN installation with install_deps.sh between 18.04 and 19.04 in the folders “oidn-1.0.0” and its corresponding symbolic link “oidn” folder.

** 18.04 **

$ ls oidn-1.0.0/lib
cmake libOpenImageDenoise.so libOpenImageDenoise.so.0 libOpenImageDenoise.so.1.0.0

$ ls oidn/lib
cmake libOpenImageDenoise.so libOpenImageDenoise.so.0 libOpenImageDenoise.so.1.0.0

** 19.04 **

$ ls oidn-1.0.0/lib
cmake libcommon.a libmkldnn.a libOpenImageDenoise.a

$ ls oidn/lib
cmake libOpenImageDenoise.so libOpenImageDenoise.so.0 libOpenImageDenoise.so.1.0.0

** cmake-gui 18.04 **

** cmake-gui 19.04 **

Weird thing (for me that I don’t understand much of this), in 19.04 it is finding those 18.04 missing libraries inside /opt/lib/oidn/lib/, when they appear inside /opt/lib/oidn-1.0.0/lib/ (only on 19.04)

Edit:
This is driving me crazy. The content with “ls” for 19.04 that I showed earlier is running “ls” from Kubuntu 18.04 pointing 19.04 folders. But doing it from “19.04” it shows the same content for oidn-1.0.0 folder and oidn sym link:

$ ls oidn/lib
cmake libcommon.a libmkldnn.a libOpenImageDenoise.a

$ ls oidn-1.0.0/lib
cmake libcommon.a libmkldnn.a libOpenImageDenoise.a

My 19.04 file system is Btrfs and maybe that was the problem about this when explore from 18.04.

If I download the prebuilt lib from here https://github.com/OpenImageDenoise/oidn/releases the directory structure is identical to the one that gets built on Linux Mint 19.2 (based on Ubuntu 18.04) with install_deps
No mkldnn and no libcommon to be found.

So, finally I was able to solve ninja problem and build successfully on 19.04. OIDN is working on 19.04!
So guys in Mint 19.2 are having the same problem that I have in Kubuntu 18.04.
Those that I have published above are the differences about how install_deps.sh installs OIDN in /opt.
Apparently 18.04 installs the binaries and 19.04 the sources?
Edit:
Ok, .so vs .a differences:

What version of CMake are you using? This needs 3.13 or higher.

On Kubuntu 18.04:
$ cmake --version
cmake version 3.10.2

So the only solution is to try to update cmake in the distro we use?

Edit:
No problem really, but it would be nice if you devs could solve the problem with buildbot builder so that it can build with OIDN support on Linux :grinning:

Updated cmake to 3.15.2 - Same problems as before…

It has almost worked in Kubuntu 18.04, but I get an error when running built blender. What I did from the terminal:

*Update cmake with pip:
pip install --upgrade cmake

*Verify the cmake version:
cmake --version
I get: cmake version 3.13.3

*Build OIDN again from install_deps.sh:
./install_deps.sh --with-oidn --build-oidn --force-oidn

I am sure that one of the above options (with/build/force) is not necessary, but just in case.

When install_deps.sh finishes, you copy the instruction that script shows at the end to build blender with oidn suport.
Also make sure that there are files with “.a” extension in the path “/opt/lib/oidn/lib/”.

*Build Blender with install_deps.sh instructions.
It builds successfully, but when I execute Blender I get:

$ ./blender
./blender: symbol lookup error: ./blender: undefined symbol: _ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE

I remember having this kind of strange error in other occasions.

Edit:
About “pip” to upgrade cmake. I think this is related to python (I had already installed python components with it). You may have to install it from your distro repositories (I don’t remember how I installed it)

It’s hard to diagnose from a distance, but it sounds to me like, in both of your cases, you have multiple versions/builds of OIDN and/or TBB on your system. Also, mkl-dnn, which OIDN is based on, requires TBB 2017 or newer.

1 Like

That’s right, I had garbage referred to TBB in my /usr/local/lib when I tried to install TBB by myself (libtbb.so.2). I have removed the file and now Blender starts (only TBB-related packages installed from ubuntu repos remain on my system.), OIDN is working! Thank you Stefan!

But I think that @SteffenD problem may be something else. You make sure that cmake update was correct with “cmake --version”. You then build oidn again with “./install_deps.sh --with-oidn --build-oidn --force-oidn”. And make sure that there are files with “.a” extension in the path “/opt/lib/oidn/lib/”.

@StefanW any specific reason we look for common in build_files/cmake/Modules/FindOpenImageDenoise.cmake ?

I’ve installed oidn system wide and it seems like this is marked as not found for me.
However, if I remove it from the cmake file, oidn support is build properly and is working. So this seems to be unneeded

When you build OIDN using make deps or install_deps.sh and you are using CMake 3.13 or newer, OIDN gets built as several .a files, including a libcommon.a which then is necessary to link. If you install OIDN through other methods, then that is something I have no control over and cannot prepare FindOpenImageDenoise.cmake for.

So finally I found some time to update cmake to 3.15.2 and rebuilt install_deps.sh --with-oidn --force-oidn.
Then I manually set the paths to all required libraries and the include folder and now it’s building and working!
Great!!

1 Like

Nightly builds for Linux still report in Denoise node that it is Disabled, built without OpenImageDenoise.

Is this a known issue?

Hi YAFU, brecht mention in dev meeting he will care about buildbot for OIDN.

Cheers, mib

1 Like

OpenImageDenoise is now enabled in the Linux buildbot.

2 Likes

Hi @brecht , @StefanW. Sorry for bothering you again…

In BA forum we have seen that the RAM used increases proportionally with each Denoise node used in compositor, and we were wondering if this was correct to be that way and if it was a behavior that devs know.

https://blenderartists.org/t/big-denoise-test-intel-open-image-denoise-vs-others/1175114/46

You can report bugs in the tracker.

1 Like

Hello.
@StefanW , thanks for the fix to the RAM issue. I am having this error when I try to compile from master (Linux):

Scanning dependencies of target bf_editor_space_node
[ 36%] Building C object source/blender/editors/space_node/CMakeFiles/bf_editor_space_node.dir/drawnode.c.o
/media/TEMPORAL/@@Blender_Git/blender/source/blender/editors/space_node/drawnode.c: In function ‘node_composit_buts_denoise’:
/media/TEMPORAL/@@Blender_Git/blender/source/blender/editors/space_node/drawnode.c:2707:8: error: implicit declaration of function ‘BLI_cpu_support_sse41’ [-Werror=implicit-function-declaration]
if (!BLI_cpu_support_sse41()) {
^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
source/blender/editors/space_node/CMakeFiles/bf_editor_space_node.dir/build.make:62: recipe for target ‘source/blender/editors/space_node/CMakeFiles/bf_editor_space_node.dir/drawnode.c.o’ failed
make[2]: *** [source/blender/editors/space_node/CMakeFiles/bf_editor_space_node.dir/drawnode.c.o] Error 1
CMakeFiles/Makefile2:4880: recipe for target ‘source/blender/editors/space_node/CMakeFiles/bf_editor_space_node.dir/all’ failed
make[1]: *** [source/blender/editors/space_node/CMakeFiles/bf_editor_space_node.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2

i fixed that about 30 mins ago, pull and you should be all-right

2 Likes

Oh ok. It is working now.