[SOLVED] OpenMP not found

Hi,

I’m building with precompiled libraries and getting this message lately:

Configuring Blender in “/home/mick/blender-git/build_linux” …
– Using pre-compiled LIBDIR: /home/mick/blender-git/blender/…/lib/linux_centos7_x86_64
– Could NOT find OpenMP_C (missing: OpenMP_gomp_LIBRARY OpenMP_pthread_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP_CXX (missing: OpenMP_gomp_LIBRARY OpenMP_pthread_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
– SSE2 SIMD instructions enabled
– Could NOT find OpenMP_C (missing: OpenMP_gomp_LIBRARY OpenMP_pthread_LIBRARY OpenMP_gomp_LIBRARY OpenMP_pthread_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP_CXX (missing: OpenMP_gomp_LIBRARY OpenMP_pthread_LIBRARY OpenMP_gomp_LIBRARY OpenMP_pthread_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
– OpenMP not found, disabling WITH_OPENMP
– Tests: Using Python executable: /home/mick/blender-git/lib/linux_centos7_x86_64/python/bin/python3.9
– Disabling render tests because tests folder does not exist at /home/mick/blender-git/blender/…/lib/tests
– Configuring done
– Generating done
– Build files have been written to: /home/mick/blender-git/build_linux

Building is successful, but I want it to build with OpenMP, so how do I fix this?
My OS has openmp 11.1.0 and openmpi 4.0.5 installed.

Hi, I have the same issue since I build with precompiled libs on Opensuse Tumbleweed.
My workaround is to open cmake-gui, add path to the libs and rebuild.
I have this only if it is needed to build from scratch or remove the build folder for example.
Please add your system specs, Linux distribution.

Cheers, mib

Could you please tell me where I have to execute
cmake-gui …/blender
If I run it in build_linux, everything is empty and I only get

Error: could not find CMAKE_PROJECT_NAME in Cache

Open cmake-gui, the are two fields, one is for the blender source and the other for the build directory.
You have to enable “Advanced” mode to see the missing libs.

Cheers, mib

1 Like

I must not select an empty build directory, got it! Thanks!

1 Like

Unfortunately, even after changing OpenMP_pthread_LIBRARY in cmake-gui to /usr/lib64/libpthread.so (which exists) and click Configure, there still is the missing OpenMP message in cmake-gui output:

Using pre-compiled LIBDIR: /home/mick/blender-git/blender/…/lib/linux_centos7_x86_64
Could NOT find OpenMP_C (missing: OpenMP_gomp_LIBRARY) (found version “4.5”)
Could NOT find OpenMP_CXX (missing: OpenMP_gomp_LIBRARY) (found version “4.5”)
Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
SSE2 SIMD instructions enabled
Could NOT find OpenMP_C (missing: OpenMP_gomp_LIBRARY OpenMP_gomp_LIBRARY) (found version “4.5”)
Could NOT find OpenMP_CXX (missing: OpenMP_gomp_LIBRARY OpenMP_gomp_LIBRARY) (found version “4.5”)
Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
OpenMP not found, disabling WITH_OPENMP
Tests: Using Python executable: /home/mick/blender-git/lib/linux_centos7_x86_64/python/bin/python3.9
Disabling render tests because tests folder does not exist at /home/mick/blender-git/blender/…/lib/tests
Configuring done

and after clicking Generate and executing make in /home/mick/blender-git/blender/ there still is the error, too:

Configuring Blender in “/home/mick/blender-git/build_linux” …
– Using pre-compiled LIBDIR: /home/mick/blender-git/blender/…/lib/linux_centos7_x86_64
– Could NOT find OpenMP_C (missing: OpenMP_gomp_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP_CXX (missing: OpenMP_gomp_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
– SSE2 SIMD instructions enabled
– Could NOT find OpenMP_C (missing: OpenMP_gomp_LIBRARY OpenMP_gomp_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP_CXX (missing: OpenMP_gomp_LIBRARY OpenMP_gomp_LIBRARY) (found version “4.5”)
– Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
– OpenMP not found, disabling WITH_OPENMP
– Tests: Using Python executable: /home/mick/blender-git/lib/linux_centos7_x86_64/python/bin/python3.9
– Disabling render tests because tests folder does not exist at /home/mick/blender-git/blender/…/lib/tests
– Configuring done
– Generating done
– Build files have been written to: /home/mick/blender-git/build_linux

Which CMake version are you using?

I’m using CMake 3.19.7
Just noticed that CMake also reports OpenMP_gomp_LIBRARY-NOTFOUND, perhaps it will work if I fix that too, but I don’t have a libgomp.a in my system - only libgomp.so - can I use that?

With the .so, at least it seems to work:

Using pre-compiled LIBDIR: /home/mick/blender-git/blender/…/lib/linux_centos7_x86_64
Found OpenMP_C: -fopenmp (found version “4.5”)
Found OpenMP_CXX: -fopenmp (found version “4.5”)
Found OpenMP: TRUE (found version “4.5”)
SSE2 SIMD instructions enabled
Found OpenMP_C: -fopenmp (found version “4.5”)
Found OpenMP_CXX: -fopenmp (found version “4.5”)
Tests: Using Python executable: /home/mick/blender-git/lib/linux_centos7_x86_64/python/bin/python3.9
Disabling render tests because tests folder does not exist at /home/mick/blender-git/blender/…/lib/tests
Configuring done

I have 3.19.7 too.
… and does it build?
Sorry, forgot about libgomp, thought is is installed with pthreads.

Cheers, mib

Yes it does build, so the issue is fixed, thank you!

1 Like