Commit Graph

173 Commits

Author SHA1 Message Date
Ray Molenkamp fcbb94ed1e deps_builder: include OIIO PR #4062
OIIO was including imaths half.h when it did not
need to, leading to build errors in lite builds.
This issue had been fixed already upstream but
was not yet included in the version we use.
2023-12-26 12:50:10 -07:00
Ray Molenkamp c6ae08b06b deps_builder: build fixes for oidn
- OIDN doesn't need to be build for debug builds on windows, while
it's mostly C++ code its public API is C
- Python was not found by the HIP build
- Level Zero was downloaded during the build.
2023-12-23 11:45:11 -07:00
Brecht Van Lommel 802ac5ba5a Build: Library updates for 4.1
Update libraries to match VFX platform 2024, and a few other upgrades to
latest versions.

boost 1.82.0
deflate 1.18 (new)
ffi 3.4.4
freeglut (deleted)
ispc 1.12.1
llvm 17.0.6
materialx 1.38.8
mesa 23.3.0
numpy 1.24.3
opencolorio 2.3.0
openexr 3.2.1
openimageio 2.5.6.0
opensubdiv 3.6.0
openvdb 11.0.0
osl 1.13.5.0 (now dynamic)
python 3.11.6
sqlite 3.42.0
sse2neon 0d6e9b3dd4
usd 23.11
vulkan 1.3.270
xm2 2.12.3

This only updates the build scripts, the precompiled libraries for each
platform will land over the coming weeks.

Ref #113157

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/116420
2023-12-21 19:16:11 +01:00
Xavier Hallade 9d5164d472 Build: Linux: patch ocloc to store binaries per-generation
When storing multiple binaries in a fatbinary, ocloc stores Intel
Graphics binaries for specific devices and these don't get found when
the device doesn't match fully.

Blender compiles one binary per generation rather than per device, to
gain space and compile time.

We introduce a patch at ocloc level to work around this behavior that
otherwise leads to binaries not being found and recompilation being
attempted.

Pull Request: https://projects.blender.org/blender/blender/pulls/115750
2023-12-12 18:24:27 +01:00
Brecht Van Lommel 6cdb43195e Refactor: replace NanoVDB kernel side implementation by own code
The NanoVDB headers are not compatible with Metal due to missing address
space qualifiers. We currently have a big patch for NanoVDB header
files, which is difficult to update for OpenVDB 11. Instead extract a
few hundred lines of code from NanoVDB to do just what we need.

Pull Request: https://projects.blender.org/blender/blender/pulls/115992
2023-12-10 19:37:36 +01:00
Brecht Van Lommel cb9b7eaa34 Build: fix macOS OpenImageDenoise 2.1 library not loading correctly
Version symlinks are not used on macOS due to notarization issues.
2023-11-16 19:21:30 +01:00
Werner, Stefan b414187efb Build: Update OpenImageDenoise to 2.1.0
Major new feature in v2 is GPU support. This is not enabled yet,
this commit only changes the library version without enabling new
functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/112143
2023-11-08 10:12:05 +01:00
Xavier Hallade 1161455084 Build: upgrade Intel Graphics Compiler on Linux
In order to speedup compilation, we upgrade IGC to 1.0.14828.26 along
with ocloc and the associated dependencies.
We also bump min-driver version accordingly to 26918.

Ref !114341
2023-11-02 22:27:38 +11:00
Campbell Barton b27ff093ca Build: resolve error configuring FFMPEG on Linux
Configure failed to find vorbis & vorbisenc on Linux with the errors:

ERROR: vorbis not found using pkg-config
ERROR: vorbisenc not found using pkg-config

the issue was caused by configures test program failing to link the test
code against the static library because functions in libm weren't found.

Resolve by adding `$libm_extralibs` to libvorbis.

Note that it's strange this issue didn't come up before,
since it occurs on a clean build it seems necessary.
2023-10-31 10:38:49 +11:00
Ray Molenkamp 3735a4d104 deps_builder: Fix missing Webp support in OIIO build on windows
webp 1.3 changed the filenames on windows to include a `lib` prefix
(ie libwebp.lib rather than webp.lib) now this is a common thing
on linux and cmake has a `CMAKE_FIND_LIBRARY_PREFIXES` variable that
has a list of prefixes to look for during a `find_library` call.

`CMAKE_FIND_LIBRARY_PREFIXES` gets set during the call to the
`project` method in the main CMakeLists of a project. Now for windows
`lib` is *not* a common prefix by CMake, and it doesn't add "lib" to
CMAKE_FIND_LIBRARY_PREFIXES during that call.

so find library doesn't look for it, the libs are not found and an
unhappy time is had by all. Now the most obvious solution would be to
pass `-DCMAKE_FIND_LIBRARY_PREFIXES=lib` to CMake to sidestep this
however, the `project` call will set the variable overwriting
anything you passed through the CLI.

So the fix here is to have `find_library` counter-intuitively look
for both `libwebp` and `webp`
2023-09-22 08:47:23 -06:00
Brecht Van Lommel f0840cee2a Build: update 4.0 libraries to address CVEs and bugs
And ignore a few CVEs that do not affect Blender.

openimageio 2.4.15
openssl 3.1.2
python 3.10.13
sndfile 1.2.2
webp 1.3.2

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/112529
2023-09-21 17:02:46 +02:00
Brecht Van Lommel 19da2fba83 Fix macOS Arm build of OSL library dependency
This patch is already in upstream, so this is temporary until we upgrade
to the latest OSL version.

Ref #110708
2023-09-04 15:08:02 +02:00
Brecht Van Lommel 59fb9341cf Build: keep SDL haptics disabled on macOS x86_64
Not yet available for the current minimum of macOS 10.15.
2023-08-16 19:11:41 +02:00
Brecht Van Lommel 51fd4af648 Build: fix OpenVDB Metal patch not applying cleanly 2023-08-16 18:43:23 +02:00
Brecht Van Lommel 1594f7fb95 Build: update SDL to 2.28.2
Older versions don't build with Xcode 14.3.

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/110975
2023-08-16 14:39:11 +02:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Brecht Van Lommel 2afdc15709 Build: patch OSL to avoid duplicate symbols in static libraries
This was revealed by CMake refactoring in #110394, with the solution
identified by Ray Molenkamp.

Upstream: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1709

Pull Request: https://projects.blender.org/blender/blender/pulls/110974
2023-08-09 19:53:11 +02:00
Brecht Van Lommel 3c5dddf09c Build: patch USD to work with OpenGL core profile
Upstream:
https://github.com/PixarAnimationStudios/OpenUSD/pull/2550

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/110474
2023-08-07 16:28:26 +02:00
Xavier Hallade ece704af45 Fix #109771: deps_builder: crash in Embree HW BVH building
When an offline render was done side by side render preview, further
render preview updates requiring BVH to be rebuilt would trigger a
crash.
This will be fixed upstream the same way in Embree 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/109966
2023-07-19 19:39:54 +02:00
Ray Molenkamp db8569a3ca Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-21 15:07:17 -06:00
Ray Molenkamp 5e44da1859 deps_builder: python 3.10.12 + openssl 3.0.9 for windows fixes
Small fixes to make it build on windows.
2023-06-21 15:02:45 -06:00
Campbell Barton 24fef21bf8 Cleanup: cmake indentation 2023-06-16 12:20:33 +10:00
Campbell Barton 65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Ray Molenkamp 3d6a99d2aa Merge remote-tracking branch 'origin/blender-v3.6-release' into main 2023-06-14 14:37:40 -06:00
Ray Molenkamp 977081d72b DepsBuilder: Update OIIO to include PSD fix
This fixes #108487 by applying upstream OIIO commit 8da473e254

This commit fixes the deps builder to include the patch, the actual
bug will not be fixed until the platform maintainers update the OIIO
library in SVN.
2023-06-14 14:36:22 -06:00
Anthony Roberts ee1b2f53cc Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC
Currently on Windows some dependencies are built with MinGW/GCC 3.x
this commit removes that, in favor of building them with MSVC
via msys2. This will make it easier in the future to offer Win/Arm64
builds of blender.

Notable changes:

- This change drops support for the external libxvid library in favor
of ffmpegs built in support for this format. This has been done with
permission from the VFX module.

Pull Request: https://projects.blender.org/blender/blender/pulls/108983
              https://projects.blender.org/blender/blender/pulls/105502
2023-06-14 21:57:48 +02:00
Campbell Barton 49594c37ae License headers: use SPDX-FileCopyrightText for CMake files 2023-06-14 23:36:23 +10:00
Ray Molenkamp 7f9021a92f deps_builder: fix deadlock in idiff
idiff sometimes locks up while shutting down when the CPU is
oversubscribed. While blender does not rely on the idiff tool
the tests that run on the CI environment do, which causes tests
to occasionally fail due to a timeout.

The root cause is a bit complex but can be found on the oiio tracker
at https://github.com/OpenImageIO/oiio/issues/3851

This change fixes idiff by :

1- Shutting down the thread pool before the main function exits
2- Have the shutdown wait for the pool threads to actually join, to
prevent the OS from forcefully terminating them while they could
potentially still be holding a lock.
2023-06-12 08:51:51 -06:00
Brecht Van Lommel 741a2fa043 Build: patch Boost for incompatibility with Xcode and libc++ 15
This is fixed in newer boost versions, but stick to the existing version now
for VFX platform compatibility. This change only affects macOS libraries,
since no other platform uses libc++.
2023-06-07 12:13:17 +02:00
Campbell Barton 0099f51cdd Cleanup: sort file, uppercase booleans, add missing headers
Also update files to ignore for check_cmake.
2023-05-17 13:13:10 +10:00
Xavier Hallade 3d53078dbe deps_builder: update Embree to 4.1.0
This allows to drop patches and workarounds, and reenable Hardware
Raytracing support for MNEE and Raytrace kernels for oneAPI device.

Pull Request: https://projects.blender.org/blender/blender/pulls/107853
2023-05-12 14:53:53 +02:00
Ray Molenkamp ab106607bd deps_builder: 3.6 library update
- OIIO 2.4.11.0
- OpenEXR 3.1.7 with additional fix for threadpool shutdown
- FreeType 2.13.0
- Fmt 9.1.0
- Python 3.10.11
- Flac 1.4.2
- FFMpeg 6.0
- OpenSSL 1.1.1t
- SQLite 3.40.1
- USD 23.05 with MaterialX Support and Render module

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107783
2023-05-10 16:20:16 +02:00
Xavier Hallade 887022257d Cycles: update DPCPP to 2022-12 release
We also backport a patch to program_manager to it as
61e51015a5
helps avoid unnecessary recompilation when enumerating available
kernels.
2023-04-18 22:09:41 +02:00
Xavier Hallade 66b4e426cc Cycles: build Embree 4 with GPU support 2023-04-18 22:09:41 +02:00
Xavier Hallade 9e9baa9085 Cycles: Upgrade to new Embree 4 while staying compatible with Embree 3
For more information about Embree 3->4 API changes:
https://github.com/embree/embree/blob/master/doc/src/api.md#upgrading-from-embree-3-to-embree-4

This is not yet enabling HW RT on Arc GPUs using Embree, which is worked on in https://projects.blender.org/blender/blender/pulls/106266

Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Stefan Werner <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/105974
2023-04-05 11:03:06 +02:00
Brecht Van Lommel 02c2970983 Cycles: add NanoVDB support for Metal on Apple Silicon
Contributed by Yulia Kuznetcova at Apple.

NanoVDB is patched to give add address spaces required by Metal. We hope that
in the future Metal will support the generic address space.

For AMD and Intel this is currently not available since it causes a performance
regression also on scenes without volumes.

Pull Request #104837
2023-02-21 15:03:52 +01:00
Xavier Hallade f3d7de709f Cycles: update Intel Graphics Compiler to 1.0.13064.7 on Linux
Linux side of 8afcecdf1f.

Reviewed by: LazyDodo, sergey, campbellbarton
Ref !104458, 16984
2023-02-09 15:43:23 +11:00
Brecht Van Lommel c6ff8eb837 Fix build issue with NanoVDB and HIP on Linux
This patch was already accepted upstream, so this is temporary until we update
to a new OpenVDB release that includes it.
2022-12-15 18:58:52 +01:00
Campbell Barton dd6f7c1318 Build: remove patch to build with older meson version for Wayland
Revert part of [0] which was required to build with meson 0.55.1,
rocky8 has version 0.58.2.

[0]; 8bb084cda3c9079ddb55288bd03b0a10df88bf59
2022-12-13 12:25:10 +11:00
Brecht Van Lommel 07b67894e8 Fix macOS precompiled libraries built on Xcode 14 not working in Xcode 13
Disable some symbols amd linking features not available in Xcode 13.
2022-12-09 22:49:31 +01:00
Brecht Van Lommel 019b930d6b Fix build error with new USD libraries in debug mode
Solve conflict between TBB and Boost Python.
2022-12-09 22:49:31 +01:00
Ray Molenkamp 388bbc3290 Build: library updates for Blender 3.5
This updates the libraries dependencies for VFX platform 2023, and adds various
new libraries. It also enables Python bindings and switches from static to
shared for various libraries.

The precompiled libraries for all platforms will be updated to these new
versions in the coming weeks.

New:

Fribidi 1.0.12
Harfbuzz 5.1.0
MaterialX 1.38.6 (shared lib with python bindings)
Minizipng 3.0.7
Pybind11 2.10.1
Shaderc 2022.3
Vulkan 1.2.198

Updated:

Boost 1.8.0 (shared lib)
Cython 0.29.30
Numpy 1.23.2
OpenColorIO 2.2.0 (shared lib with python bindings)
OpenImageIO 2.4.6.0 (shared lib with python bindings)
OpenSubdiv 3.5.0
OpenVDB 10.0.0 (shared lib with python bindings)
OSL 1.12.7.1 (enable nvptx backend)
TBB (shared lib)
USD 22.11 (shared lib with python bindings, enable hydra)
yaml-cpp 0.8.0

Includes contributions by Ray Molenkamp, Brecht Van Lommel, Georgiy Markelov
and Campbell Barton.

Ref T99618
2022-12-07 15:28:17 +01:00
Campbell Barton 6377d00a61 Cleanup: cmake comment line length 2022-11-03 12:11:08 +11:00
Ray Molenkamp 6515177981 deps_builder: OpenCollada fixes for windows
- build and use our version of libxml

- the cli tools had a linker error due
to it trying to link a shared version
of libxml, disabled both and zlib 1.2.3
with a patch since we do not want/need
them for blender.

- postfix the libraries with _d for debug
automatically so we don't have to fix that
during the harvest.

due to this only being windows changes no
rebuild needed for the other platforms.
2022-10-20 18:29:59 -06:00
Ray Molenkamp 21deba56aa Build: update various libraries for 3.4, fixing bugs and security issues
THis is bumping dependencies to fix known CVEs, with the exception of
OpenImageIO which also includes bugfixes for performance and correctness
with some image types.

zlib 1.2.12 -> 1.2.13
freetype 2.11.1 -> 2.12.1
openimageio 2.3.13.0 -> 2.3.20.0
python 3.10.2 -> 3.10.8
openjpeg 2.4.0 -> 2.5.0
ffmpeg 5.0 -> 5.1.2
sndfile 1.0.28 -> 1.1.0
xml2 2.9.10 -> 2.10.3
expat 2.4.4 -> 2.4.9
openssl 1.1.1g/i -> 1.1.1q
sqlite 3.31.1 -> 3.37.2

Notable changes:
* AOM: the hack we had in place to make it not detect pthreads on windows no
  longer worked with a more recent cmake version. Disabled pthreads with a
  diff on Windows.
* Python: embedded copy of zlib 2.1.12 swapped out for our 2.1.13 copy with
  some folder manipulation on Windows.
* Freetype: was harbouring a copy of zlib 2.1.12 as well, so that had to end.
* FFmpeg: patch used to fix D11796 is no longer needed. Add new patch to deal
  with simple_idct.asm generating an object file with no sections in it,
  backport from upstream commit.
* TinyXML: still being downloaded but no longer used by OpenColorIO, removed.
* GMP applied upstream patch to fix CVE-2021-43618, as there is no release yet.
* SQLite and Libsndfile patches no longer needed.

Includes contributes by Ray Molenkamp, Campbell Barton and Brecht Van Lommel.

Ref T101403

Differential Revision: https://developer.blender.org/D16269
2022-10-20 13:56:01 +02:00
Sybren A. Stüvel f3a46e2fd9 Deps: fix builing wayland-scanner
- fix the source package download URL
- patch the `meson.build` file to allow the CentOS 7 meson version to be
  used
- only build what we need (`wayland-scanner`), and not the libraries,
  documentation, and tests.

Ref: D16074

This also reverts commit f6664217b3
"Build: temporarily disable wayland dependency".
2022-09-27 15:11:57 +02:00
Campbell Barton 4e1d32107b Build: add missing include for opencolorio
OpenColorIO failed to build on Linux+GCC-12.2 because of strlen() use.
2022-09-27 11:21:35 +10:00
Sergey Sharybin 364f47c834 Merge branch 'blender-v3.3-release' 2022-08-30 11:24:58 +02:00
Sergey Sharybin 16938ab7d4 Update DPC++ to 20220812
This was already done in the libraries SVN, just the build system
changes got forgotten to be committed.
2022-08-30 11:23:35 +02:00
Bastien Montagne 756308f9e4 Merge branch 'blender-v3.3-release' 2022-08-18 12:36:41 +02:00