Commit Graph

2654 Commits

Author SHA1 Message Date
Ray Molenkamp 2c61c3d733 deps_builder: Fix boost::python linking release python library
By default boost::python in debug configuration links the release
python libraries. Which leads to loading issues with the produced
modules in a debug blender (which does use the debug python libs)

Bjam has an option to switch this to the debug libraries but when
you switch that on it changes the library names for *all* boost
libraries, even ones that don't have anything to do with python
and even the release libraries.

therefore an alternative way has been chosen and we're dealing
with this by adding a define rather than asking bjam to do it.
2020-08-15 11:06:16 -06:00
Philipp Oeser 24f7f33c25 Merge branch 'blender-v2.90-release' 2020-08-14 10:40:57 +02:00
Ray Molenkamp e691a3a9b7 Deps_builder: Update openvdb to a dynamic library
This patch changes openvdb from a static to a dynamic library.
this is in preparation for enabling pyopenvdb at some point
in the future.

Differential Revision: https://developer.blender.org/D8282

Reviewed by: brecht
2020-08-13 11:42:05 -06:00
Brecht Van Lommel c5519d4b6f Fix T78065: OSL shader compilation fails on macOS 2020-08-13 17:53:48 +02:00
Brecht Van Lommel 6238eabcd4 Merge branch 'blender-v2.90-release' 2020-08-12 18:50:40 +02:00
Brecht Van Lommel 54c2c14921 CMake: clarify that the modules are licensed BSD 3-Clause
Many of these are derived from similar modules in the CMake project, which
have this license.

Fixes T79715
2020-08-12 18:49:16 +02:00
Brecht Van Lommel 655091297f Fix T79736: install_deps.sh failing to download OpenImageIO due to wrong version 2020-08-12 18:38:29 +02:00
Ray Molenkamp 6a95f05d65 deps_builder: Optionally build boost::python
This this adds the option of building boost::python
in the libs builder, in preparation for future
dependencies that require it (ie pyopenvdb)

disabled by default, can be enabled with the
`WITH_BOOST_PYTHON` cmake option.

Differential Revision: https://developer.blender.org/D8212

Reviewed by: brecht
2020-08-12 10:17:38 -06:00
Ray Molenkamp df12e6778a deps_builder: Fix python build on windows
Issue introduced in the boost.cmake cleanup in
rB5c563cd903ddceebfffbb1e86af2b406bbb2c457
2020-08-12 08:40:24 -06:00
Ray Molenkamp b0dc413f4d deps_builder: Cleanup options.cmake for windows
We no longer build the thumbnail dll in the builder
and these variables are no longer used.
2020-08-12 08:26:42 -06:00
Ray Molenkamp 5c563cd903 deps_builder: Cleanup boost.cmake on windows
There were some remnants from previous boost::python support
and support for building 32 bit libs on windows, neither are
needed currently.
2020-08-12 08:21:37 -06:00
Bastien Montagne 20ca7122f0 install_deps: update some libs, and various improvements/fixes.
This commits:
- Updates some libraries to latest officially supported versions:
** Numpy: 1.17.5
** OCIO: 1.1.1
** OIIO: 2.1.15
** OSL: 1.10.10
** OIDN: 1.2.1

- Re-enables some distro packages (like OSL, OIIO, OCIO...).

- Add missing 'CMake cleanup commands' for generated CMake update
  command, for Embree, OIDN and OpenXR.

- Generalizes using min/max versions of accepted libraries, if no
  package can be found in specified range then it is built from sources.

The later point should help keeping things a bit in better conditions,
although current maximal accepted versions are somewhat arbitrary guess
currently.
2020-08-11 18:11:45 +02:00
Sebastian Parborg be83b8f456 Cleanup: CMake warnings related to "find package" modules
Fix package name missmatch in a few module files. IE "ALEMBIC" was
defined in the file but the find_package commands used "Alembic"

Some modules state that they set and use the _LIBRARY variable but the
do in fact not do this. Removed these comments from those files.
2020-08-07 16:56:38 +02:00
Brecht Van Lommel 93d8373edb Merge branch 'blender-v2.90-release' 2020-08-04 17:14:06 +02:00
Brecht Van Lommel a4a814a180 Fix buildbot macOS packaging error after recent changes 2020-08-04 17:13:09 +02:00
Brecht Van Lommel 89baafc8e2 Merge branch 'blender-v2.90-release' 2020-08-04 16:57:50 +02:00
Brecht Van Lommel 9538e38704 Fix buildbot packaging error after recent changes 2020-08-04 16:54:18 +02:00
Brecht Van Lommel 21c31885ed Merge branch 'blender-v2.90-release' 2020-08-04 16:39:03 +02:00
Brecht Van Lommel 16c7b6a7fe Buildbot: make code signing of packages optional with --codesign parameter
This is in preparation of doing builds per commit that will not be code signed.

Ref D8438

Differential Revision: https://developer.blender.org/D8451
2020-08-04 15:44:41 +02:00
Bastien Montagne e17befe368 Install_deps: add libgmp as default dependency.
This is a common system library, no need for fancy building this time...

Part of D8384.
2020-08-03 10:44:07 +02:00
Bastien Montagne 977f89ef2d Merge branch 'blender-v2.90-release' 2020-08-03 10:30:59 +02:00
Bastien Montagne fe70605a2a Building: Add ceres to Ninja's heavy jobs pool.
Some files in this library require more than 1.5Gb to build, so they
also belong to the 'heavy' pool.
2020-08-03 10:30:33 +02:00
Campbell Barton 83d6290800 Cleanup: remove trailing space, newlines at eof 2020-08-03 15:14:02 +10:00
Ray Molenkamp 83f8223543 Deps builder: Add support for building GMP
Required for the new boolean code, disabled by default
until all platforms have landed the libs and the boolean
code actually lands in master.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8384
2020-07-31 09:34:26 -06:00
Brecht Van Lommel 81caec8c60 Fix blender_test runner build on the buildbot on Linux and macOS
Add our own copy of the gtest discovery scripts from CMake a few reasons:
* Use the very latest version which supports PRE_TEST for Windows
* Fix usage of [] symbols in file paths that fail with the zsh shell
* Disable asan leak checker when discovering tests

This means Windows also no longer requires the very latest CMake 3.18.
2020-07-31 14:41:13 +02:00
Ray Molenkamp 44928a2a8f Fix: Blender_test not working on windows.
This bumps the minimum requirement for cmake from 3.10 to 3.18 on windows
if `WITH_GTESTS` is enabled.

Reviewed By: sergey brecht sybren campbellbarton

Differential Revision: https://developer.blender.org/D8405
2020-07-30 13:18:05 -06:00
Ankit Meel 27d50d6f67 Enable header auto-complete suggestions in Xcode
Description of `USER_HEADER_SEARCH_PATHS` build setting:
"
This is a list of paths to folders to be searched by the compiler
for included or imported user header files (those headers listed
in quotes) when compiling C, Objective-C, C++, or Objective-C++.
Paths are delimited by whitespace, so any paths with spaces in
them need to be properly quoted. See Always Search User Paths
(Deprecated) (ALWAYS_SEARCH_USER_PATHS) for more details
on how this setting is used. If the compiler doesn't support the
concept of user headers, then the search paths are prepended to
the any existing header search paths defined in Header Search
Paths (HEADER_SEARCH_PATHS).
"

http://help.apple.com/xcode/mac/current/#/itcaec37c2a6

Xcode doesn't use `HEADER_SEARCH_PATHS` for auto-complete. Only the
header files in the same directory as the current file are suggested.

CMake as of now correctly sets `SYSTEM_HEADER_SEARCH_PATHS` and lumps the
rest in `HEADER_SEARCH_PATHS`.  The standard way is to use
`USER_HEADER_SEARCH_PATHS` & `SYSTEM_HEADER_SEARCH_PATHS` and let
`HEADER_SEARCH_PATHS` be used as a fallback for compilers which do not
distinguish between `<*.h>` and `"*.h"` syntax.

So set `USER_HEADER_SEARCH_PATHS` to the include paths specified
in the `CMakeLists.txt` files of all targets.
2020-07-30 21:13:26 +05:30
Sybren A. Stüvel a5b2aa96e4 CMake: reject older GCC version when using precompiled Linux libraries
In the situation where the precompiled libraries are used on Linux +
GCC, a version of GCC older than 9.3 is guaranteed to cause problems.

This just implents a fatal error message when we know it doesn't make
sense to continue. We could do more checks and add some warnings, but
it's very likely that these will be ignored amongst the other noise.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D8396
2020-07-27 17:29:13 +02:00
Patrick Mours a9644c812f Cycles: Use pre-compiled PTX kernel for older generation when no matching one is found
This patch changes the discovery of pre-compiled kernels, to look for any PTX, even if
it does not match the current architecture version exactly. It works because the driver can
JIT-compile PTX generated for architectures less than or equal to the current one.
This e.g. makes it possible to render on a new GPU architecture even if no pre-compiled
binary kernel was distributed for it as part of the Blender installation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8332
2020-07-20 19:25:27 +02:00
Ray Molenkamp 99fda4d31e deps builder: Fix typo in windows harvesting 2020-07-16 07:22:52 -06:00
Brecht Van Lommel 66b48ad8fb Fix git tag warning when running make update after recent changes 2020-07-16 14:26:37 +02:00
Sybren A. Stüvel 56aa5b0d8c T73268: Link C/C++ unit tests into single executable
This commit introduces a new way to build unit tests. It is now possible
for each module to generate its own test library. The tests in these
libraries are then bundled into a single executable.

The test executable can be run with `ctest`. Even though the tests
reside in a single executable, they are still exposed as individual
tests to `ctest`, and thus can be selected via its `-R` argument.

Not yet ported tests still build & run as before.

The following rules apply:

- Test code should reside in the same directory as the code under test.
- Tests that target functionality in `somefile.{c,cc}` should reside in
  `somefile_test.cc`.
- The namespace for tests is the `tests` sub-namespace of the code under
  test. For example, tests for `blender::bke` should be in
  `blender::bke:tests`.
- The test files should be listed in the module's `CMakeLists.txt` in a
  `blender_add_test_lib()` call. See the `blenkernel` module for an
  example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7649
2020-07-16 12:58:49 +02:00
Stefan Werner 9715ad5aca macOS: Support arm64 architecture.
Enabling all `make deps` dependencies with the exception of Embree and OIDN.
After that, Blender can be compiled on an Apple Silicon Mac just like on any
Intel based Mac. There are still compiler warnings that need to be
investigated and there are probably a couple of bug still to be discovered
and to be fixed.

Most patches to the dependencies are simple and are about disabling SSE and
setting the proper architecture to compiile for. Notable exception is Python,
where I back ported a yet to be accepted PR for upstream Python:
https://github.com/python/cpython/pull/21249

Cross compiling or buliding a Universal Binary is not supported yet.
The minimum macOS target version for x86_64 remains at 10.13, the target
for arm64 is 11.00.

Differential Revision: https://developer.blender.org/D8236
2020-07-16 09:37:38 +02:00
Brecht Van Lommel 5ecefc6a07 Build: make update support for git tags
Previously it only picked the appropriate version with the
blender-vX.XX-release branches.
2020-07-13 15:54:12 +02:00
Sergey Sharybin 78d48343ae Make deps: Fix compilation error on CentOS
There were two issues.

First is related on ISPC's CMake configuration forcing C and C++
compilers to be clang and clang++. This goes against of desired
behavior when we use our own compiled clang compilers.

The second issue was related on linker failure: CLang libraries
are linked statically, and they need some of C++ 11 STL symbols
which are coming from libstdc++.

Differential Revision: https://developer.blender.org/D8258
2020-07-09 17:24:49 +02:00
Sergey Sharybin 2de5de57c5 Build: fix stack linker warning with ffmpeg on macOS
The ff_cfhd_init_vlcs() function was using a lot of stack space, which
made linker on macOS unhappy. Using heap allocation allows to silence
the warning without causing other side-effects.

Kept the patch enabled for all platforms to avoid difference in behavior
and performance on different platforms, which could make certain types
of investigation very tricky.

Differential Revision: https://developer.blender.org/D8248
2020-07-08 15:49:55 +02:00
Brecht Van Lommel ff444da7c4 macOS: upgrade minimum required version to 10.13 High Sierra
C++17 does not work on 10.12, and Apple extended support ended for 10.12 in
October 2019.

Maniphest Tasks: T76783, T76184

Differential Revision: https://developer.blender.org/D8179
2020-07-08 14:43:28 +02:00
Sergey Sharybin 643196cc37 CMake: Fix spelling of Embree passed to find package
The spelling and capitalization of package name passed to find_package()
and find_package_handle_standard_args() needs to match.

Silences CMake warning about mismatch.

Differential Revision: https://developer.blender.org/D8247
2020-07-08 12:35:56 +02:00
Sergey Sharybin d352902758 Make deps: Use own nasm for ffmpeg and x264
Fixes the warning: building for macOS, but linking in object file

Differential Revision: https://developer.blender.org/D8235
2020-07-07 16:26:47 +02:00
Sergey Sharybin 1e3c0b4b03 Make deps: Compile own version of nasm for Apple
The upstream version of nasm does not put version information to the
generated object files, which makes linker to show the following
warning:

  building for macOS, but linking in object file

Using own patched version of nasm which puts required information to
the object file, making linker happy.

The plan is to either streamline the patch and provide it to the
upstream, or, it that takes too long, get an independent fix from the
upstream.
2020-07-07 16:26:13 +02:00
Sergey Sharybin f2175e06a7 Mae deps: Ensure Brotli is disabled for FreeType
We don't need it and it was optionally enabled, causing Blender to fail
to link on certain configuration (when Brotli is installed via Homebrew
for example).
2020-07-07 12:44:12 +02:00
Sergey Sharybin 6d9a6f12b3 Make deps: Fix compilation error of Python on macOS
The configuration was confused about gettext installed via Homebrew
and isysroot passed to Python's compilation but not to test programs.

After this change `import gettext` still works, but it is unclear how
to test it further,

Differential Revision: https://developer.blender.org/D8231
2020-07-07 11:17:47 +02:00
Sergey Sharybin d212b3dc43 Make deps: Fixes for macOS platform
Set of fixes which had to be made in order to have dependencies built
on own laptop:

- Require bison as a dependent software. It is required by ISPC.

  On macOS it is required to be installed via Homebrew. This is because
  Bison from Xcode toolchain is too old.

- Made sure Boost is compiled using clang.

  Without this gcc was used, and some unsupported command line argument
  was passed to it.

- Modify OGG in a way which does in fact pull fixed sized types.
  They are defined in stdint.h.

  Without this fix FFmpeg will not detect presence of OGG because the
  test program fails to compile.

- Force disable zstd compression and make wepb optional for the TIFF
  library. Without this TIFF might pick up development libraries from
  Homebrew.

Differential Revision: https://developer.blender.org/D8221
2020-07-07 09:31:46 +02:00
Sergey Sharybin 9ea5469178 Initial support of clang-tidy toolchain
Clang Tidy is a Clang based "linter" tool which goal is to help
fixing typical programming errors.

It is run as a separate compile step of every file, which slows
compilation down but allows to fully analyze the file the same
way as compiler does and catch non-trivial bugprone cases.

This change includes:

- CMake option called `WITH_CLANG_TIDY` which enables Clang Tidy
  linter tool on all source in the `source/` directory.

  This option is only available on Linux, as it is currently the
  easiest platform to get the Clang Tidy toolchain to work.

- CMake module which is aimed to find latest available Clang Tidy.

- Set of rules which allows to have Blender fully compiled without
  extra issues.

The goal of this change is to provide a base ground so that solving
all the warnings can happen later on, as a team effort.

It should be possible to use Clang Tidy side-by-side with both GCC
and Clang, but there seems to be some tweaks to be done in CMake to
make it really work for Blender. For now use Clang toolchain if
there are issues with GCC+Clang Tidy.

It will be worked on in the nearest future to bring seamless
experience for all configurations.

Currently there is no official way of getting Clang Tidy on macOS,
and on Windows there are some difficulties of hooking up Clang Tidy
from LLVM package to the MSVC compiler toolchain.

The actual warnings in the code will be addressed as a part of the
Code Quality Days, task T78535.

Differential Revision: https://developer.blender.org/D7937
2020-07-03 09:57:41 +02:00
Brecht Van Lommel e60b6f586b Build: disable OpenXR in make deps for macOS, it's not supported 2020-06-30 18:12:08 +02:00
Sergey Sharybin 7860fc9539 Codesign: Wait for unsigned directory to appear
Solves problem with different order of codesign server startup and
mount of network shares: avoids exception happening when server is
started prior to the mounts are ready.
2020-06-30 11:21:00 +02:00
Sergey Sharybin 53799d3ed2 Codesign: CLeanup, redundant semicolon 2020-06-30 11:20:37 +02:00
Stefan Werner 0d2e628964 Build: Point ISPC explicitly to the location of LLVM libraries.
Sometimes the ISPC build could pick up the system LLVM librareis
instead of the ones in the Blender lib directory.
2020-06-29 14:06:00 +02:00
Tuomo Keskitalo fa2c7709ff Deps Builder: Fix OSL build error.
When there is no system python OSL will fail to build the documentation.
Given we don't ship the documentation, this is safe to disable.

Originally part of D8123
2020-06-28 08:00:28 -06:00
Ray Molenkamp 2db4a81fe4 deps: Fix build issue with USD on windows.
When doing a release build the TBB debug libs are not
set which was causing an error during the configure
phase of USD, so always set them even if not used.
2020-06-25 18:50:28 -06:00
Brecht Van Lommel d69bb06db8 Build: remove unused lapack/hidapi/mingw32 build infrastructure
Ref T76184
2020-06-25 13:15:55 +02:00
Ray Molenkamp d3283ef121 Build: upgrade OpenImageDenoise to 1.2.1
This requires ISPC for building OpenImageDenoise, so that is now added as
a dependency as well. Blender itself does not need ISPC for building so it
is not included as part of the precompiled libraries.

Differential Revision: https://developer.blender.org/D7641
2020-06-25 13:00:58 +02:00
Brecht Van Lommel 6431b11381 Build: upgrade a few smaller Linux/macOS only libraries to latest versions
* jemalloc 5.2.1
* xml2 2.9.10
* bzip2 1.0.8
* ffi 3.3
* lzma 5.2.5
* ssl 1.1.1g
* sqlite 3.31.1

Ref T78252
2020-06-25 13:00:58 +02:00
Brecht Van Lommel d645525dae Fix missing WITH_CYCLES_EMBREE in the build configurations 2020-06-24 15:51:08 +02:00
Sybren A. Stüvel 334e5005f4 USD: Upgrade library 20.02 → 20.05
The Blender USD code didn't have to change for this upgrade. Pixar's USD
did include a change that we had in the patch, so that's been removed
from our patch now. Some of the USD code that we patched changed as
well.
2020-06-19 17:37:14 +02:00
Sergey Sharybin 2e0ac1e0c4 Buildbot: Cleanup, remove unused script and change naming
Follow upstream convention.
2020-06-17 17:39:17 +02:00
Sergey Sharybin efb1bf80df Buildbot: Cleanup, typo in logging 2020-06-16 18:12:15 +02:00
Sergey Sharybin 2c2fd9f036 Buildbot: Switch WIndows builds to MSVC 2019 2020-06-16 16:17:47 +02:00
Sergey Sharybin 76d50c51a3 Buildbot: Support multiple workers talking to single codesign server
Is achieved by replacing hard-coded signed/unsigned file names with
"<uuid>" which acts as a "request ID". This way multiple workers can
put their requests into a single directory without collisions. The
code sign server will handle the requests sequentially in an unknown
order.
2020-06-16 14:08:14 +02:00
Sergey Sharybin 21d862494b Buildbot: Don't use builder name in the build directory
The directory layout on worker goes as following:

  <Worker>
    <Builder Name>
      blender.git/
      build/
      install/
      lib/

Adding an extra <Builder Name> after build is redundant.

Differential Revision: https://developer.blender.org/D8045
2020-06-16 12:24:01 +02:00
Sybren A. Stüvel ee61c1fe22 Cleanup: removed trailing spaces from `install_deps.sh`
No functional changes.
2020-06-15 11:58:58 +02:00
Sybren A. Stüvel 0d59a643aa x264: update URL and hash in versions.cmake
The old URL did have a Git commit hash in it, but apparently the server
was ignoring it and only used the `master` that was also mentioned in the
URL. As a result, every new download would get the latest version from
the `master` branch, invalidating the SHA256 checksum.

I replaced `master` with the actual commit hash. This should make the
situation stable.

No functional changes.
2020-06-15 11:58:58 +02:00
Sybren A. Stüvel 0102b9d47e Alembic: remove HDF5 support from CMake files
This is a follup to 0c38436227.

No functional changes to Blender, just the build scripts.
2020-06-15 11:58:58 +02:00
Ray Molenkamp 4155f8dc21 deps/windows/embree: Prevent exports leaking out of blender binary
embree marks a few of its functions with a dll_export macro
forcibly exporting these symbols from whatever binary links
them. Given we link embree statically and we do not want these
exports in the blender binary, the macro needs to be a no-op.
2020-06-14 11:09:32 -06:00
Bastien Montagne 725cc959c7 install_deps: Update python default version to 3.7.7.
Re T77846.
2020-06-14 09:42:20 +02:00
Ray Molenkamp b325ecef9c Deps builder: Python 3.7.7
This updates python to the latest patch level available for 3.7
also updates some of the packages we rely on:

idna 2.9
urllib3 1.25.9
cerifi 2020.4.5.2
requests 2.23.0
numpy 1.17.5
2020-06-13 15:25:19 -06:00
Sybren A. Stüvel 0981b55182 install_deps: bumped USD library version 19.11 → 20.02 2020-06-12 17:09:53 +02:00
Sybren A. Stüvel cfff8aa067 USD: Library upgrade 19.11 → 20.02
This upgrade required a few changes:
- Some parts of our patch are no longer necessary, as the USD library
  now includes those changes.
- The rest of the patch needed adjustment as the `pxr/base/lib/*`
  directories in USD's source code have moved to `pxr/base/*`.
- Updated library names on Windows -- thanks @LazyDodo.

Note that this does not enable the USD Python API for inclusion in
Blender. It just aims at being an as-simple-as-possible version upgrade
of the USD library.
2020-06-12 16:56:31 +02:00
Sergey Sharybin 9f5cc128d9 Buildbot: Switch to devtoolset-9
Famous "should just work", but will never know until actually attempted
 to be used.

Ref T76783.
2020-06-12 16:06:54 +02:00
Bastien Montagne 14bd92b12f Installdeps: Fix broken commit rBe3396d8bfc94.
Not sure why final version of the change was lost...
2020-06-10 19:45:52 +02:00
Bastien Montagne e3396d8bfc Installdeps: better handling of python versions.
now that we stick to some outdated py version, some distro (like current
debian testing) will feature several python3 dev package, but other
dependant libs like numpy are only built against current default version
of python (3.8 now in deb testing)...

In order to be able to use distro packages we need to allow using higher
versions of python, and set relevant CMake option accordingly.
2020-06-08 15:38:11 +02:00
Bastien Montagne 7d32a259bf Installdeps: make embree use TBB.
Following changes done to makedeps in rBc7329da14b22.
2020-06-05 12:01:18 +02:00
Brecht Van Lommel c7329da14b Build: use TBB as Embree tasking system
This avoids launching additional threads and solves some console warnings on
Linux + AMD Ryzen CPU.
2020-06-05 00:58:31 +02:00
Brecht Van Lommel 0b28f0410c Fix make deps build errors with conflicting Boost system packages 2020-06-05 00:58:31 +02:00
Bastien Montagne caca3d9c97 installdeps: fix bad FFMPEG official version number.
re T77035.
2020-06-04 17:35:33 +02:00
Campbell Barton 81c33f0ba7 Cleanup: clang-format 2020-06-01 15:04:30 +10:00
Ray Molenkamp 4cb883b6b2 Deps: Update OIIO + ImageLibs + OSL + Helpers
This is the cluster of OIIO and friends , since they are all kinda tangled best to deal with this as a single unit

OIIO 2.1.15.0
png 1.6.37
jpeg 2.0.4
opencolorio 1.1.1
tiff 4.1.0
OSL 1.10.10
pugixml 1.10
openjpeg 2.3.1

Differential Revision: https://developer.blender.org/D7727
Reviewed by: brecht
2020-05-31 13:15:40 -06:00
Ray Molenkamp 6f1056ae63 Deps: iconv 1.16 2020-05-31 10:33:11 -06:00
Brecht Van Lommel c93a88413d Merge branch 'blender-v2.83-release' 2020-05-29 18:05:04 +02:00
Brecht Van Lommel a86b5df005 Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.

User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".

Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility

This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.

Fixes T76058.

Differential Revision: https://developer.blender.org/D7748
2020-05-29 17:48:26 +02:00
Stefan Werner ecc15c55d4 Cycles: Upgraded Embree to version 3.10.0
Enabled round linear hair in Embree.

Differential Revision: https://developer.blender.org/D7623
2020-05-27 10:10:18 +02:00
Bastien Montagne 60bed34f16 install_deps: update libraries versions.
- FFMPEG: 4.3.2
- OpenSubDiv: 3.4.3
- OpenXR SDK: 1.0.8
- Switch form SDL 1.2 to SDL 2.0

Re T77035, T77007, T77010 and T77011
2020-05-25 11:54:30 +02:00
Campbell Barton dc429d5910 Merge branch 'blender-v2.83-release' 2020-05-25 15:00:58 +10:00
Campbell Barton f274b8c102 CMake: disable WITH_USD with blender_lite configurations 2020-05-25 14:54:41 +10:00
Ray Molenkamp 5db2d9c82b Deps: ffmpeg 4.2.3 + codecs update
This diff updates:
FFmpeg : 4.3.2
libogg : 1.3.4
flac   : 1.3.3
vpx    : 1.8.2
xvid   : 1.3.7
x264   : 33f9e1474613f59392be5ab6a7e7abf60fa63622

x264 seemingly has given up on even providing snapshots
and has been updated to the latest hash available at
this time.

faad has been removed since ffmpeg has not supported
it since 2010.
2020-05-24 15:18:39 -06:00
Ray Molenkamp 525fc36a80 Deps : XR_OpenXR_SDK 1.0.8 2020-05-23 15:58:15 -06:00
Ray Molenkamp 2ddd9813ef deps: SDL 2.0.12 2020-05-23 15:41:44 -06:00
Ray Molenkamp 157b9e78a4 Deps: OpenSubDiv 3.4.3 2020-05-23 15:21:28 -06:00
Ray Molenkamp 93f60a4da5 Deps: Freetype 2.10.2 2020-05-23 14:37:17 -06:00
Ray Molenkamp f5cd06ed45 deps: OpenAL 1.20.1 2020-05-23 14:02:34 -06:00
Ray Molenkamp 08b4faef01 Properly fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
For a more detailed description of the issue see the commit
message for rB497cd3d7dd6e497be484eb78a8ddb23f53b20343

This change moves fftw to a shared library and reverts the bandaid
we did for 2.83.
2020-05-19 12:28:19 -06:00
Ray Molenkamp a6c0874355 win/deps: generate sndfiles import library with ms lib tool
Unsure what it is that upsets it so much, but when linking
both sndfile and fftw dynamically, the linker gets confused
and thinks that fftw is importing sf_close from the blender
binary (which makes *NO* sense) leading to a start-up error.

Generating the import library from the .def file using the
ms lib tool creates an import library that works fine.
2020-05-19 12:22:36 -06:00
Ray Molenkamp 393050e8e5 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-18 16:37:57 -06:00
Ray Molenkamp 497cd3d7dd Fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
This is not as much a fix as a work around, but given the real
involves replacing how we build fftw, it is not eligible for 2.83
which is in BCON3 already.

The root of the issue lies with (how we build) fftw3

The first issue is: fftw does not build with MSVC, there are other
dependencies that are not compatible with MSVC and for those we
build the libraries required with mingw64, same for fftw

The second issue is: for reasons unknown we really really really
liked all deps to link statically so wherever possible we did so.

Now during the building of the fftw it linked a few symbols from
libgcc (which we do not ship) like __chkstk_ms, for which we passed
some flags to stop generating calls to it. Problem solved! There
is no way this could possibly turn around and bite us in the rear.

fast forward to today mystery crashes that look like a race condition.

What is happening is, we tell the linker that each thread will require
a 2-megabyte stack, now if every thread immediately allocated 2 megs,
that be 'rough' on the memory usage. So, what happens is (for all apps
not just blender), 2 megs are reserved but not backed by any real memory
and the first page is allocated for use by the stack, now as the stack
grows, it will eventually grow out of that first page, and end up in
an area that has not been allocated yet, to deal with that the allocated
page is followed by a guard page, someone touches the guard page it's
time to grow the stack!

Meanwhile in FFTW is it's doing substantial allocation using alloca
(up to 64 kb) on the stack, jumping over the guard page, and ending
up in reserved but not yet committed memory, causing an access violation.

Now if you think, that doesn't sound right! something should have
protected us from that! You are correct! That thing was __chkstk_ms
which we disabled.

Given we do not want a dependency on libgcc while building with MSVC
the proper solution is to build fftw as a shared library which will
statically link any bits and pieces it needs, however that change
is a little bit too big to be doing in BCON3.

So as a work around, we change the size the stack grows from 8k to
68k which gives fftw a little bit more wiggle room to keep it out
of trouble most of the time.

Note this only sidesteps the issue, this may come up again if the
conditions are just right, and a proper solution will need to be
implemented for 2.90.
2020-05-18 16:35:53 -06:00
Brecht Van Lommel 5ca1eb96c7 Merge branch 'blender-v2.83-release' 2020-05-12 21:57:04 +02:00
Brecht Van Lommel 80953aed33 Fix CMake using different OpenEXR / USD includes and libraries in some cases
Search for all potential library names in each directory, otherwise e.g.
libImath-2_2.a from a system directory will be preferred over libImath.a even
if we specified a directory.
2020-05-12 21:50:49 +02:00
Ray Molenkamp 3c56746863 Windows: Re-enable incremental linking
It was disabled in D7520 to keep the pdb's from growing out
of control however the increased link time is just not worth
it.

I'll keep an eye on the dailies and see if we have to come up
with a different solution.
2020-05-11 10:01:54 -06:00
Ray Molenkamp f2178b7f97 deps/windows: Fix wrong crt for libjpeg and pthreads
The msvc linker had been warning about libcmt being dragged
in for a bit, finally tracked the issue down to the deps of
jpeg and pthreads which both ignored our cflags.

this diff changes them both to use the dynamic crt rather
than the static one so they'll be in line with all our
other libraries.
2020-05-09 12:47:59 -06:00
Bastien Montagne 0d0dcfd643 Install_deps: Add support to compile TBB when we cannot find version.
We now want to use fairly recent TBB (2018 at least?), so distro a bit
old will not have required package anymore...

Tested with Debian, other distro "should work" (c), but tests there are
much welcome! ;)
2020-05-08 18:05:30 +02:00
Bastien Montagne 2d30c4a35b install_deps: Fix (unreported) typo in OpenXR build code.
Was breaking up proper behavior of 'need to rebuild' checks for that
lib.
2020-05-08 18:05:30 +02:00
Bastien Montagne e517734708 install_deps: Fix (unreported) broken logic in OIIO building.
Not sure where that code was comming from, but it was breaking the
cleanup/update_deps logic...
2020-05-08 18:05:30 +02:00
Bastien Montagne 7d8c5d5623 install_deps: Fix (unreported) broken Boost source URL. 2020-05-08 18:05:30 +02:00
Bastien Montagne be3c0862ba Cleanup: install_deps: Simplify the 'no distro' code a bit.
We never deal with packages then, and only ever build (if we do
anything), no reason to make things more complicated than needed...
2020-05-08 18:05:30 +02:00
Bastien Montagne 883dfda024 install_deps: Fix (unreported) bad handling of deps between libs.
Previous code would forec built libs to always be rebuilt when one of
their deps was using a package. While this could be useful when said
package was actually updated, this generates way too much false
positives.

Now only rebuild a built lib when we actually switch from built to
package for one of its deps.
2020-05-08 18:05:30 +02:00
Brecht Van Lommel e7470c9dbe Merge branch 'blender-v2.83-release' 2020-05-05 15:14:09 +02:00
Brecht Van Lommel bb7a23bdff Fix build with precompiled libraries picking up OpenEXR from install_deps.sh 2020-05-05 15:06:49 +02:00
Ray Molenkamp ba43c2a040 Windows: Silence LNK4099 warning.
Ever since debug symbols were added for release builds the linker
has been on the chatty side about symbols being missing for our
binary libs.

There's currently no plans to supply those, so best for the linker
not to warn us about them.
2020-05-04 08:29:48 -06:00
Ray Molenkamp 33bdd91fb8 Windows: Move tbb to being dynamic library
Static tbb has always been frowned upon [1] sofar it has worked for us but
given our reliance on tbb is about to increase (D7475), I'd like to move the library
to more supported configuration. Which means moving it to be a dynamic library

The libs part of this change is in rBL62416

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D7570
2020-05-03 16:25:56 -06:00
Ray Molenkamp b523911e86 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

Differential Revision: https://developer.blender.org/D7520

Reviewed by: brecht
2020-05-01 07:37:48 -06:00
Campbell Barton 7ded7610ce Cleanup: rename WITH_X11 to WITH_GHOST_X11
Matches WITH_GHOST_{SDL|WAYLAND}
2020-05-01 19:14:50 +10:00
Ray Molenkamp 03f4d20bcf Revert "Windows: Support backtraces on release builds."
Issues with older cmake.
2020-04-30 14:00:11 -06:00
Ray Molenkamp 1d63db2044 Fix: Windows build bot script error
Partial revert of D7520
2020-04-30 13:34:11 -06:00
Ray Molenkamp f90a716e68 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

The Release in the title of this diff refers to the
release build type, not the official blender releases.

Initially this will only be enabled for nightly build
bot versions of blender, official releases as of now
will not ship with symbols.

Differential Revision: https://developer.blender.org/D7520

Reviewed by: brecht
2020-04-30 12:41:16 -06:00
Brecht Van Lommel d8a3f3595a Task: Use TBB as Task Scheduler
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.

Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D7475
2020-04-30 08:09:21 +02:00
Christian Rauch 66e70fe299 GHOST: initial Wayland support
Usable with the CMake option 'WITH_GHOST_WAYLAND'

The following functionality is working:

- Building with X11 and Wayland at the same time,
  wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.

See D6567 for further details.
2020-04-30 14:21:50 +10:00
Bastien Montagne 00e0034b13 Merge branch 'blender-v2.83-release' 2020-04-29 21:38:18 +02:00
Ray Molenkamp 7f5367eaae Windows: Fix RelWithDebInfo missing symbol information
issue introduced in rB55a2682348df94d0ff2f57d786b7a557312d0345
2020-04-29 09:17:34 -06:00
Brecht Van Lommel 0ddf5860f5 Fix Python bz2 module failing to import on older macOS versions
Found by failing bundled modules test. The bz2 library was compiled without
proper minimum SDK version flags.
2020-04-29 16:25:46 +02:00
Bastien Montagne 1e58255c40 Merge branch 'blender-v2.83-release' 2020-04-29 10:16:42 +02:00
Anthony Edlin b3ac6d1348 nstall_deps: USD: Add root usd library directory to build args.
Add root usd library directory to build arguments, same as other libraries.
Also fix error/typo in compile_USD regarding _is_building.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7563
2020-04-29 10:15:55 +02:00
Nathan Craddock 490c32c425 CMake: add WITH_LINKER_LLD option for unix platforms
Can give considerably faster linking, especially for debug builds.

This may be enabled by default but needs to be more thoroughly tested.
2020-04-27 14:14:00 +10:00
Ray Molenkamp 55a2682348 Windows: Add sccache support.
sccache [1] is one of the few ccache like solutions that will
work on windows.

sccache support can be enabled with the `WITH_WINDOWS_SCCACHE`
cmake option however it will only will work with ninja as the
build system, msbuild is not supported currently.

Advanced option, developes are expected to obtain and configure
sccache on their own.

```
Full build no cache 1428.90s (100.00%)
Full build cached    434.34s ( 30.40%)
```

[1] https://github.com/mozilla/sccache

Reviewed By: nicholas_rishel, Brecht

Differential Revision: https://developer.blender.org/D7466
2020-04-20 12:51:43 -06:00
Brecht Van Lommel aaaa0a43af Build: use -no-pie for portable builds on Linux
Otherwise file browsers do not recognize the Blender executable. This is
already done for official releases.

We leave it off for non-portable builds, since that's how Linux distribution
packages will typically build Blender and we can continue to follow the OS
default there. Using a file browser to launch executables from e.g. /usr/bin
would be rare as wel.

Differential Revision: https://developer.blender.org/D7363
2020-04-07 13:32:42 +02:00
Ray Molenkamp 29b87b5615 Fix T75357: USD export broken on windows
Path to the jsons was wrong so they were not copied
2020-04-06 14:38:52 -06:00
Brecht Van Lommel bae1c243ce Build: hide USD symbols, make Blender symbols visible again
Following up to b555b8d.

Building Blender with hidden symbols but using libraries with visible symbols
was giving linker warnings, specifically for USD. So revert that for now, as
it was not needed for the bugfix.

Hide USD symbols (some of which are not in the USD namespace) to avoid potential
conflicts. May potentially help with AMD OpenCL issues in T74262.
2020-04-05 21:04:10 +02:00
Brecht Van Lommel c4ba0d1508 Fix Linux link error with pcre after recent changes, must use absolute path 2020-04-02 22:05:03 +02:00
Brecht Van Lommel 75f6e6b39e Fix link error on Linux buildbot with libxml2
On macOS this is part of the collada folder, but for Linux xml2 is in its own
folder for precompiled libraries.
2020-04-02 18:54:58 +02:00
Brecht Van Lommel 5159ba6b33 Fix (harmless) PCRE not found warning when configuring CMake on Linux
Differential Revision: https://developer.blender.org/D7309
2020-04-02 17:09:01 +02:00
Brecht Van Lommel 2aa938b0ae Cleanup: simplify Linux buildbot config, where default values already match
Ref D7309
2020-04-02 17:09:01 +02:00
Ray Molenkamp 0062813c73 make.bat: Improve messaging when not detecting MSVC
Inspired by @mrwhite in D7295
2020-03-31 13:14:16 -06:00
Brecht Van Lommel b555b8dedc Build: hide most symbols on macOS on Linux to avoid conflicts
This means symbols from Blender itself and most external libraries. We can't
just hide all because that breaks some libraries. The better solution would
be to rebuild all library dependencies with hidden visibility.

Fixes T75223: Luxrender add-on failing to load on macOS
2020-03-31 00:07:55 +02:00
Bastien Montagne 671d811323 Install_deps: Do not wipe out `WITH_PYTHON` CMake options.
This is annoying when one want to use system python and hence disables
the `WITH_PYTHON_INSTALL` options...
2020-03-27 15:46:47 +01:00
Mateusz Grzeliński 0a02c288aa install_deps: Enable PIC in Python static library.
Update for D3078, I think it should be fixed

Benefits:
- after installing python 3.7 with `./build_files/build_environment/install_deps.sh`, user will be able to run `make bpy` without linking error:
  - https://blender.stackexchange.com/questions/102933/a-working-guidance-for-building-blender-as-bpy-python-module
  - https://stackoverflow.com/questions/36779834/compiling-blender-bpy-recompile-with-fpic

To prevent errors like `/opt/lib/python-3.7.4/bin/python3.7: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory`, add python .so lib to ldconfig

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7177
2020-03-27 15:23:58 +01:00
Sergey Sharybin a093112696 CMake: Fix compilation with Xcode generation on Xcode 11.4
Need to give correct SDKROOT.
2020-03-26 13:07:52 +01:00
Sergey Sharybin ef2bde11d2 CMake: Fix spelling for OpenImageDenoise package
The spelling should match exactly between how package is called in
find_package and in FIND_PACKAGE_HANDLE_STANDARD_ARGS.
2020-03-26 11:35:51 +01:00
Sergey Sharybin a22471f1d1 CMake: Fix macOS SDK detection with latest Xcode and macOS
Happens on macOS 10.15.4 and Xcode 11.4.

The reason of failure is caused by following factors:

- xcodebuild reports full semantic macOS SDK version 10.15.4
- The actual SDK file path will only include major and minor part
  of the version (10.15, MacOSX10.15.sdk)
- Previous CMake code of ours expected direct match between SDK
  version and file path.

The solution is to make our detection code a bit more flexible and
additionally check for major.minor macOS SDK version in the path.
2020-03-26 11:35:51 +01:00
Sergey Sharybin f9590c8eaa CMake: Remove support of Xcode prior to 8.2
The specific goal of this change is to get rid of separate code paths
for older and newer Xcode versions.

The version 8.2 is picked since it's the latest version which runs on
macOS 10.11 (which is our current deployment target). If that turns
out too new for some reason the alternative would be to require Xcode
version 5.
2020-03-26 11:35:51 +01:00
Sergey Sharybin 03b2fc1a61 CMake: Cleanup, remove unneeded version requirement
The main CMakeLists already requires CMake 3.5, so there is no point of
requiring "newer" CMake on macOS.

This was a code from a while back where CMake 3 was not required on all
platforms.
2020-03-26 09:02:10 +01:00
Sergey Sharybin fd262d3196 CMake: Fix detection of Xcode version
Legacy code did not take into account the fact that major version can
be two digits. This was causing "Xcode 11.4" to be detected as "11.".
2020-03-26 08:59:08 +01:00
Ray Molenkamp 8e8fdf875d Windows/Cleanup: Remove VS2015 support from make.bat
VS2015 has not been supported for a while now but make.bat
still had some support for it.
2020-03-24 14:48:23 -06:00
Sybren A. Stüvel 88a86c025c Deps: TBB changed their repository URL
As a result the MD5sum of the downloaded package also changed.
2020-03-23 16:04:52 +01:00
Julian Eisel 9e8afa8817 Fix OpenXR SDK failing to compile with no JsonCpp installed
Force the SDK to use its own, bundled JsonCpp sources.
2020-03-21 21:58:17 +01:00
Julian Eisel c589fdc8db Fix install_deps.sh ignoring --skip-xr-openxr 2020-03-21 19:03:56 +01:00
Brecht Van Lommel 2be14e0ec4 Fix typo in make.bat help for build directory 2020-03-19 15:31:21 +01:00
Bastien Montagne 82fc81816e Fix openXR building with install_deps in some compilers. 2020-03-18 15:11:03 +01:00
blender ba3d49225c make deps: Fixes to make OpenXR to work on CentOS Linux
- Harvest to a proper location.
- Disable STD's filesystem which is experimental and caused
  linking errors when OpenXR is usedi n Blender.
2020-03-17 18:35:29 +01:00
Sergey Sharybin 9f48852ba4 Buildbot: Enable version character for development builds
Allows to have 2.82a as a beta version on buildbot.
2020-03-10 10:23:28 +01:00
Bastien Montagne 0d05fd9b4c Install_deps: fix wrong `XR_OPENXR_ROOT_DIR` parameter for CMake.
Should be `XR_OPENXR_SDK_ROOT_DIR`.`
2020-03-08 17:14:58 +01:00
Julian Eisel a22573e243 Build System: Add OpenXR-SDK dependency and WITH_XR_OPENXR build option
The OpenXR-SDK contains utilities for using the OpenXR standard
(https://www.khronos.org/openxr/). Namely C-headers and a so called
"loader" to manage runtime linking to OpenXR platforms ("runtimes")
installed on the user's system.

The WITH_XR_OPENXR build option is disabled by default for now, as there
is no code using it yet. On macOS it will remain disabled for now, it's
untested and there's no OpenXR runtime in sight for it.

Some points on the OpenXR-SDK dependency:
* The repository is located at
  https://github.com/KhronosGroup/OpenXR-SDK (Apache 2).
* Notes on updating the dependency:
  https://wiki.blender.org/wiki/Source/OpenXR_SDK_Dependency
* It contains a bunch of generated files, for which the sources are in a
  separate repository
  (https://github.com/KhronosGroup/OpenXR-SDK-Source).
* We could use that other repo by default, but I'd rather go with the
  simpler solution and allow people to opt in if they want advanced dev
  features.
* We currently use the OpenXR loader lib from it and the headers.
* To use the injected OpenXR API-layers from the SDK (e.g. API
  validation layers), the SDK needs to be compiled from this other
  repository.

The extra "XR_" prefix in the build option is to avoid mix-ups of OpenXR
with OpenEXR.

Most of this comes from the 2019 GSoC project, "Core Support of Virtual
Reality Headsets through OpenXR"
(https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).

Differential Revision: https://developer.blender.org/D6188

Reviewed by: Campbell Barton, Sergey Sharybin, Bastien Montagne, Ray
Molenkamp
2020-03-04 16:45:07 +01:00
Campbell Barton a5c984a57d Cleanup: cmake indentation 2020-03-04 11:02:35 +11:00