Cannot build Blender on Ubuntu 17.04


(cpurender) #1

Blender code has been changed and I got this error:

CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):  Could NOT find PythonLibsUnix (missing: PYTHON_LIBRARY PYTHON_LIBPATH
  PYTHON_INCLUDE_DIR PYTHON_INCLUDE_CONFIG_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  build_files/cmake/Modules/FindPythonLibsUnix.cmake:181 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  build_files/cmake/platform/platform_unix.cmake:62 (find_package)
  CMakeLists.txt:851 (include)



What is missing?


(English is not my native language) #2

Hi.
I have had the same problem recently on Kubuntu 14.04. Apparently python version requirements have changed.
I installed “libpython3.6-dev” package and it solved the problem.


(cpurender) #3

Thanks. I also found something similar and finally got the build run successfully but I could not run the binary.

error while loading shared libraries: libboost_filesystem.so.1.58.0: cannot open shared object file: No such file or directory

I think I can fix that error but still, it looks like a mess to me. Why do they require -dev packages?


(English is not my native language) #4

This is a library, a binary. These errors usually appear when you compile on a Linux version, and you try to run that build on another version of Linux where you have not compiled. So if you are running Blender on the same version of Linux where you have compiled it is rare for the problem to occur because is supposed that when install dev package then package containing the library is also installed.

To find which package contains the file you use Ubuntu packages site:
https://packages.ubuntu.com/

Go to the “Search the contents of packages” field below. Check the last box “packages that contain files whose names contain the keyword” and select “Xenial”, in the field you look for “libboost_filesystem.so” for example.
https://packages.ubuntu.com/search?searchon=contents&keywords=libboost_filesystem.so&mode=filename&suite=xenial&arch=any
You install from repository the package: libboost-filesystem1.58.0
which contains libboost_filesystem.so.1.58.0 file.

Edit:
Are you sure you are on Ubuntu 17.04 Zesty, and not 16.04?
In 17.04 that version of the library does not match.


(cpurender) #5

Thanks again. I am using 17.04, updated from 16.04. I don’t know why Blender asks for that version but on my filesystem I find this:
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.62.0


(English is not my native language) #6

Because you probably do not have the development package for that version installed (probably you have installed only “libboost-filesystem1.58-dev” from 16.04). You install “libboost-filesystem1.62-dev” package and compile/build Blender again. Be sure to have also installed “libboost-filesystem1.62.0”

Follow the same methodology if problems arise with other libraries.

In another order of things, if you come from 16.04, you make sure you have GLEW correctly updated to v2 (libglew related packages)


(cpurender) #7

Done. But Blender still asks for libboost_filesystem.so.1.58.0.


(English is not my native language) #8

Have you re-compiled Blender (you do not use old compilation/build)? What happens if you uninstall v1.58 related packages, and then you compile Blender again?

Edit:
I mean, uninstall v1.58 dev package >> “libboost-filesystem1.58-dev”


(cpurender) #9

It was a clean build.

Package ‘libboost-filesystem1.58-dev’ is not installed, so not removed

It looks like I need to install that version.


(English is not my native language) #10

But that version is not in 17.04
You could try downloading and installing deb package from 16.04:
https://packages.ubuntu.com/xenial/libboost-filesystem1.58-dev

I’m not sure what’s going on here with this problem.

Edit:
Have you tried re-running blender install_deps.sh script on 17.04?


(cpurender) #11

Good point. I am doing it now, it’s installing the whole internet again.


(cpurender) #12

And voila, it’s working. You’re the best YAFU!


(English is not my native language) #13

Good! The problem it had baffled me a little, I had run out of ideas :slight_smile:


(cpurender) #14

The build is strange. CPU render works but CUDA compilation failed and I don’t see menu icons.



(English is not my native language) #15

Do you have properly installed nvidia driver right? Show output here:

cat /proc/driver/nvidia/version

How do you compile blender? Have you followed the blender guide steps to properly update from git?
https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake


(cpurender) #16

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 384.90 Tue Sep 19 19:17:35 PDT 2017
GCC version: gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)

nvcc --version

nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44

I compile it from master branch as usual using “make”. “make update” also didn’t help.


(cpurender) #17

This warning popped up when running the binary. I think it is the icon problem.

libpng warning: Application built with libpng-1.2.54 but running with 1.6.28Cannot png_create_read_struct
IMB_ibImageFromMemory: unknown fileformat (<splash>)
Read prefs: /home/server/.config/blender/2.79/config/userpref.blend
libpng warning: Application built with libpng-1.2.54 but running with 1.6.28
Cannot png_create_read_struct
IMB_ibImageFromMemory: unknown fileformat (<blender icons>)
libpng warning: Application built with libpng-1.2.54 but running with 1.6.28


(cpurender) #18

And the CUDA problem:

Compiling CUDA kernel …"/usr/local/cuda/bin/nvcc" -arch=sm_61 --cubin “/home/server/blender-git/build_linux/bin/2.79/scripts/addons/cycles/source/kernel/kernels/cuda/kernel.cu” -o “/home/server/.cache/cycles/kernels/cycles_kernel_sm61_68DF2B8A87D88CB33387EE399A1EA79B.cubin” -m64 --ptxas-options="-v" --use_fast_math -DNVCC -D__KERNEL_CUDA_VERSION__=80 -I"/home/server/blender-git/build_linux/bin/2.79/scripts/addons/cycles/source"
In file included from /usr/local/cuda/bin/…//include/cuda_runtime.h:78:0,
from <command-line>:0:
/usr/local/cuda/bin/…//include/host_config.h:119:2: error: #error – unsupported GNU version! gcc versions later than 5 are not supported!
#error – unsupported GNU version! gcc versions later than 5 are not supported!
^~~~~


(cpurender) #19

I will try to install CUDA 9 as soon as I have the time and update this thread.


(English is not my native language) #20

Hi.
Usually developers do not deal with issues related to compiling in bug tracker, but they usually respond to these problems in IRC. Please, if you still can not solve the problem, you contact them at #blendercoders IRC channel.

Edit:
Regarding the first problem, you check if you have installed “libpng-dev” v1.6.28-1. If not, you install it and compile again.