Compiling on ubuntu 17.10 using built-in python 3.6

Hi everyone,

since python 3.6 is needed to compile, I upgraded to ubuntu 17.10 (which incorporates python 3.6.3) so I would not have to install python3.6 manually. But now, I still can’t compile Blender, it just keeps using old python.


-- Configuring incomplete, errors occurred!
See also "/home/blender-git/build_linux/CMakeFiles/CMakeOutput.log".
See also "/home/blender-git/build_linux/CMakeFiles/CMakeError.log".
Makefile:2148: rule for target „cmake_check_build_system“ failed
make: *** [cmake_check_build_system] error 1
CMake Error at CMakeLists.txt:769 (message):
  At least Python 3.6 is required to build

What can I do to make the compiler use python3.6 (aka python3) with minimal effort?

Hi.
Are you sure you have development package installed?. Update repository and install “libpython3.6-dev” package.

There have been other cases where after upgrade distro, it has been necessary to execute “install_deps.sh” script again from Blender files (being connected to the internet)

Hi YAFU,

libpython3.6-dev is installed, install_deps.sh also confirms: “python3.6-dev is already the newest version (3.6.3-1ubuntu1).”

But executing install_deps.sh returns another error even after redownloading everything:

error: unknown type name ‘__float128’
error: unknown type name ‘__float128’
error: target of using declaration conflicts with declaration already in scope
error: call to ‘abs’ is ambiguous
error: call to ‘abs’ is ambiguous

5 errors generated.
src/liboslexec/CMakeFiles/oslexec.dir/build.make:106: recipe for target ‘src/liboslexec/llvm_ops.bc.cpp’ failed
make[2]: *** [src/liboslexec/llvm_ops.bc.cpp] Error 1
CMakeFiles/Makefile2:232: recipe for target ‘src/liboslexec/CMakeFiles/oslexec.dir/all’ failed
make[1]: *** [src/liboslexec/CMakeFiles/oslexec.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…

Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2
ERROR! OpenShadingLanguage-1.7.5 failed to compile, exiting

Like recommended here http://blender.45788.x6.nabble.com/Compile-from-source-td162194.html, I executed install_deps.sh with --skip_osl parameter and it worked.
//update: just tried it without --skip_osl again and now it works - I don’t get it, but it works.

But I still can’t compile blender because it does not find python 3.6 although it is installed.

Hmmm… same problem here. I guess the install_deps.sh also needs Python 3.5 which is no longer installed / supported by 17.10?

Just solved it by deleting the build_linux folder and re-running make.
Perhaps that works for you, too.

Without any further change? OK, I’ll try that one later.
Thanks

Yes, that was all, just took me three weeks to figure out :smiley:
But that should only work if you upgraded your linux from an earlier version, if it is a fresh install, it might be something else.

Hmmm… it’s a freshly installed Ubuntu Studio 17.10… maybe I should with Mint 18.3 (based on 16.04) though. :wink:
Everything’s running smoothly there.

So you followed those instructions https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake, executed install_deps.sh and used the exact make command that is shown at the end of install_deps.sh output to compile?

In this case I could only recommend to delete all and re-download everything. It should definitely work on 17.10.

Yes, I followed this guide to the letter. On Linux Mint it worked (after I installed python3.6-dev), but on Ubuntu Studio no luck so far.

It’s an old thread, but for anyone having this same problem, it might help to run the install_deps script like this:

install_deps.sh --with-all --use-cxx11

Check the CMAKE path.