Various errors when i try to compile Blender to use the system glog library

Hello to everyone.

I’m trying to install the OpenPose addon for Blender following this tutorial :

Everything gone ok until here :

git clone http://git.blender.org/blender.git
cd blender
git submodule update --init --recursive
mkdir build && cd build

mario@zio-Z390-AORUS-PRO:/home/zio/Scrivania/src/blender/build/CMakeFiles# cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_INSTALL_NUMPY=OFF -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_SDL=ON -DWITH_JACK=ON -DWITH_OPENCOLORIO=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON -DWITH_SYSTEM_GLOG=ON …
– WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now
– Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
– Could NOT find Jack (missing: JACK_LIBRARY JACK_INCLUDE_DIR)
– Could NOT find Fftw3 (missing: FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
– Could NOT find OpenCOLLADA (missing: _opencollada_LIBRARIES _opencollada_INCLUDES)
– Could NOT find JeMalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
– Could NOT find OSL (missing: _osl_LIBRARIES OSL_INCLUDE_DIR OSL_COMPILER)
– OSL not found, disabling it from Cycles
– Could NOT find OPENVDB (missing: OPENVDB_LIBRARY OPENVDB_INCLUDE_DIR)
– Could NOT find BLOSC (missing: BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
– OpenVDB not found, disabling it
– Could NOT find ALEMBIC (missing: ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
– Boost version: 1.67.0
– Found the following Boost libraries:
– filesystem
– regex
– thread
– date_time
– locale
– system
– chrono
– atomic
– Could NOT find OPENIMAGEDENOISE (missing: OPENIMAGEDENOISE_LIBRARY OPENIMAGEDENOISE_INCLUDE_DIR)
– OpenImageDenoise not found
runningllvm-config-
– Could NOT find LLVM (missing: LLVM_LIBRARY)
– LLVM not found
– Could NOT find OpenSubdiv (missing: _opensubdiv_LIBRARIES OPENSUBDIV_INCLUDE_DIR)
– OpenSubdiv not found
CMake Error at CMakeLists.txt:812 (message):
WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON

– Configuring incomplete, errors occurred!
See also “/home/zio/Scrivania/src/blender/build/CMakeFiles/CMakeOutput.log”.
See also “/home/zio/Scrivania/src/blender/build/CMakeFiles/CMakeError.log”.
root@zio-Z390-AORUS-PRO:/home/zio/Scrivania/src/blender/build/CMakeFiles# nano CMakeError.log

Because it seems to me that the error is caused by the the lastest error,I tried to enable the option “WITH_FFTW3” and the option “WITH_MOD_OCEANSIM” to on,but as soon as I opened the file “CMakeCache.txt” I realized that they were already set to ON,as you can see below :

nano CMakeCache.txt :

//Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)
WITH_FFTW3:BOOL=ON

//Enable Ocean Modifier
WITH_MOD_OCEANSIM:BOOL=ON

so,maybe the error is caused by some other reason ? Can someone help me here ? thanks.

Those instructions to build Blender were probably only made to work on the author’s system, where various packages are already installed.

Instead use the official build instructions:
https://wiki.blender.org/wiki/Building_Blender

I don’t know where to start,man. I’m a totally newbie in this area. And my job is totally different. Can you be more explanatory about what I should I do ? Please don’t assume that I’m experienced like you. thanks.

Maybe someone else can help, I don’t personally have the time to figure out exact instructions for you. I’m not familiar with the requirements for that particular add-on.

I’m just giving you a heads up that the instructions you are following were not designed to work on a variety of systems, and they may be outdated too. The official build instructions tell you what to do step by step.

when I have installed blender on linux,also these packages have been installed :

libglew2.1 libllvm6.0 libopenshadinglanguage1.10 libopensubdiv openimagedenoise

they seem to be the requested packages. Now I suppose that I should open the config file (which one ?) and I should add inside of it the correct paths for those packages ?

Because I’m not able to add the correct paths inside the right config file,I tried to run a precompiled version of blender 2.82 and I tried to install and enable the open pose addon. I wanted to do an attempt,anyway,maybe I’d been lucky). This is the error that has been shown :

ERROR: flag ‘logtostderr’ was defined more than once (in files ‘/build/blender-fMrWhw/blender-91562-b5244cd5dc1/extern/glog/src/logging.cc’ and ‘src/logging.cc’).

You should set up blender first, then worry about addon, IMHO. Most addons can easily be installed without much modification. (this one, however, seems to be a project in itself)
https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu Get the source code cloned, get libraries and build it. If you won’t be modifying the source code, better get 2.82 release from https://www.blender.org/download/.

https://github.com/CMU-Perceptual-Computing-Lab/openpose and where it leads: installation This seems to be the exhaustive guide to install the addon. It even has a video tutorial. Hope it helps!

I’ve already installed blender 2.82 on linux,getting it from the repository of Ubuntu. And after that I did :

git clone https://gitlab.com/sat-metalab/blender-addon-openpose.git
cd blender-addon-openpose
./install.sh

the error has been :

ERROR: flag ‘logtostderr’ was defined more than once (in files ‘/build/blender-fMrWhw/blender-91562-b5244cd5dc1/extern/glog/src/logging.cc’ and ‘src/logging.cc’).

now I would like to try to compile blender reading the instructions from your link.

I’m here. I’ve compiled blender 2.83 alpha without errors and I tried to install the open pose addon. It says :

Modules Installed () from ‘/home/zio/Scrivania/blender-addon-openpose-master.zip’ into ‘/home/zio/.config/blender/2.83/scripts/addons’

but it is not present on the preferences / addon. It is not there.

Have you read the readme file it comes with detailing how to install it?

Have you read what I said in this post ?

The zip file you downloaded cannot be used for addon installation, you have to either manually copy it to the right place or use their install scripts.

I could get till having openpose in the addon list by doing this:

  • go to your clone folder, compress openpose with its five py files.
  • open blender addon preferences, install addon by selecting the zip.

To enable it, it needs some external modules. cv2 is the first one that gives error. use the most reliable method https://blender.stackexchange.com/questions/linked/5287?sort=votes. I gotta go…

@LazyDodo their install script is outdated it seems It does nothing but symlink the cloned openpose folder with the addons folder in .config folder. It’s not useful for Mac anyway. Addon directory is in ~/Library/Application Support .

I’ve recorded a video,showing the error that I get. You can watch it here :

I saw you raised a ticket with the add-on. They should be able to help

I know. But I doubt that they will help. I’ve already tried to contact him some time ago and he didn’t reply. I suspect that the development is freezed.

glog is an optinal logging component for cycles, if you don’t need it you can turn it off in cmake, rebuild and sidestep the issue.

I don’t know if the cause of the error is glog. Anyway,something like this could work ?

mkdir ~/blender-git
cd ~/blender-git
git clone https://git.blender.org/blender.git
mkdir ~/blender-git/lib
cd ~/blender-git/lib
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64
cd ~/blender-git/blender
make update
make -DWITH_SYSTEM_GLOG=OFF …

You’d have to run

cmake DWITH_SYSTEM_GLOG=OFF .

(including the dot) in your build folder (probably build_linux_full) followed by make install