Commit Graph

3909 Commits

Author SHA1 Message Date
Nikhil Shringarpurey
f6a6334164 Fix: Ninja build command on Windows
The build commands for `ninja clean` on Windows were wrong - one had
the cmake executable duplicated and one was not using the correct
environment variable and also had missing quotes for paths that
contained spaces.  Tested working on with `make ninja clean` and
`make ninja clean release`.

Pull Request: https://projects.blender.org/blender/blender/pulls/128802
2024-12-10 01:10:35 +01:00
Ray Molenkamp
776ca8d585 Fix: deps_builder: fix CUDA detection
The deps builder currently uses `check/enable_language(CUDA)` but given
it's just a coordinator for external builds, doesn't actually build any
cuda code.

The problem there is, for enable_language(CUDA) to work, the CUDA Visual
studio integration needs to be installed which they refuse to install
when only the VS buildtools are installed, they somehow require the
full IDE to be available. Cmake will try to compile some code and fail.
(this worked previously since i had a full VS install on my build
machine, but that should not be used due to ms not providing a back
catalog of older versions of VS community)

This change, changes things over to use the FindCUDAToolkit module (not
to be confused with the deprecated FindCUDA module), which just locates
the libraries, includes and nvcc but doesn't compile anything.

which neatly sidesteps the issue. None of our downstream deps rely on
the VS integration either, so we are in the clear..... for now..

Pull Request: https://projects.blender.org/blender/blender/pulls/130913
2024-12-09 19:14:21 +01:00
Aras Pranckevicius
b17a31a9e3 Deps: support vs2022 x64, git ignores
Windows build_deps tweaks:
- Support VS2022 for building x64 dependencies (this is not used yet,
  but for local tests might be useful).
- Put artifacts and staging of windows deps builder under git ignore

Pull Request: https://projects.blender.org/blender/blender/pulls/130342
2024-12-09 17:23:17 +01:00
Miguel Pozo
e3c6c2c6fc Cleanup: CMake: De-duplicate with_shader_cpp_compilation code
Move the common setup and function to `macros.cmake`.

Pull Request: https://projects.blender.org/blender/blender/pulls/131391
2024-12-06 21:03:11 +01:00
Bastien Montagne
75c7621a41 install_linux_packages: Add pipewire dependency. 2024-12-03 18:00:55 +01:00
Sebastian Parborg
2ec719447e Cmake: Add Pipewire support
Pull Request: https://projects.blender.org/blender/blender/pulls/126091
2024-12-03 16:26:01 +01:00
Campbell Barton
6ca1417103 Cleanup: suppress unused Python warnings
Suppress unused warnings using the "vulture" utility.

- Include public definitions in the modules `__all__`.
- Mark arguments & variables as unused with a "_" prefix.
2024-12-03 12:54:13 +11:00
Campbell Barton
bc66905a15 Cleanup: remove/comment unused functions 2024-12-02 11:23:47 +11:00
Jeroen Bakker
c8f0351b55 ShaderC: Version update v2022.3 -> v2024.3
Bump shaderc to latest release. The latest release
contains fixes that we applied locally to improve
compilation performance and also many fixes
that improve platform compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/129971
2024-11-29 07:43:21 +01:00
Jeroen Bakker
f8217a519f Vulkan: Update headers to v1.3.296
In Blender 4.4 we are planning to use `VK_KHR_dynamic_rendering_local_read`
This is a fairly new extension and not included in the headers we are using at this moment.

This PR will update the headers to the latest version.

Pull Request: https://projects.blender.org/blender/blender/pulls/128995
2024-11-29 07:42:18 +01:00
Campbell Barton
273f48cd53 Cleanup: use main functions to allow importing scripts
Support importing scripts without running their logic to
allow basic validation (see #130746).

Parts of !131037 were used.

Co-authored-by: Bastien Montagne <bastien@blender.org>
2024-11-29 15:54:58 +11:00
Raphael Langerhorst
f662caf722 Add RISCV CPU architecture support to build config
Remove assert statement from make_update.py, making it ready for any
architecture.

Add riscv 32, 64 and 128 bit cpu architecture with little/big endian
to Blender's BLI_build_config.h and Libmv's build_config.h

Tested (to compile) on riscv64 little endian machine.

Pull Request: https://projects.blender.org/blender/blender/pulls/130920
2024-11-28 12:37:26 +01:00
Campbell Barton
f088bb1bc8 Cleanup: spelling in comments 2024-11-27 19:01:02 +11:00
Campbell Barton
45dfec6c55 Cleanup: trailing space 2024-11-26 12:41:29 +11:00
Ray Molenkamp
8534a4216f deps_builder: Fix HIP detection on first run on windows.
The HIP compiler version was not being detected on first run in a fresh
build folder since HIP requires perl, and perl wasn't installed yet due
to the compiler detection running before the installs into the build
folder.

this change re-orders the compiler detection and environment preparation
so perl is available when we detect the hip compiler version.
2024-11-25 08:51:22 -07:00
Ray Molenkamp
205fba598d CMake: Windows: Fix grammar mistake in last commit
Spotted by the eagle eyed @ThomasDinges
2024-11-21 14:29:28 -07:00
Ray Molenkamp
aed5906544 CMake: Windows: Update MSVC 17.6 Blacklist message
Given 17.7 has been out for quite while, it doesn't make a
whole lot of sense to still tell people to downgrade their
compiler.
2024-11-21 12:17:01 -07:00
Sergey Sharybin
c533a7b008 Fix: make_bpy_wheel.py is incompatible with Python 3.9
Buildbot uses Python 3.9, so it needs to be supported.

Arguably, the system-wide Python 3.6 needs to be supported to, but
it is a bit more tricky change, and is not a stopper for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/130664
2024-11-21 11:48:43 +01:00
Ray Molenkamp
2dd0946e97 CMake: Windows: Revert flag change that snuck into previous commit
that one should not have been committed.
2024-11-19 19:41:55 -07:00
Ray Molenkamp
536937b4d4 CMake: Windows: Fix CMP0177 policy warnings
CMake 3.31+ have begun emitting warnings when you feed install()
paths that are not normalized (ie have, '.' or '..' in them) easiest
fix is just not use them.

This cleans up the windows sections of the build system, the other
platform devs will have to take a look on their respective platforms.
2024-11-19 18:53:41 -07:00
Sebastian Parborg
ca1bf7928d Tests: Add sanity check test for Linux releases
This test does some rudimentary checks to see if the binaries and
folder structure are ready for a release.

Pull Request: https://projects.blender.org/blender/blender/pulls/130319
2024-11-15 18:12:52 +01:00
Sebastian Parborg
bf969834b5 Libs: Fix static libs not getting linked properly on linux
Multiple of our libraries would pull in system libraries that we have static versions of.
These where libxml2 and libz and also libzstd.

I also noticed that the script that was supposed to check on this was not really usable to check for these kinds of things so I updated it.
Now you can run it with `python3.11 tools/check_blender_release/check_release.py -- ../build_linux_release/bin/` and it will check all binaries and libraries that we ship for any system libraries that we don't expect to be linked.

The libraries I'm aware of that pulled in system libs were:
boost
mesa
osl
llvm

(The removed cmake flags for osl was because these were unused and cmake printed warnings)

Pull Request: https://projects.blender.org/blender/blender/pulls/130236
2024-11-14 17:59:21 +01:00
Jacques Lucke
64a9260921 Core: remove WITH_CXX_GUARDEDALLOC option
This implements the proposal from #124512. For that it contains the following
changes:
* Remove the global override of `new`/`delete` when `WITH_CXX_GUARDEDALLOC` was
  enabled.
* Always use `MEM_CXX_CLASS_ALLOC_FUNCS` where it is currently used. This used
  to be guarded by `WITH_CXX_GUARDEDALLOC` in some but not all cases. This means
  that a few classes which didn't use our guarded allocator by default before,
  are now using it.

Pull Request: https://projects.blender.org/blender/blender/pulls/130181
2024-11-13 13:39:49 +01:00
Ray Molenkamp
3809ae297b deps_builder: Skip HIPRT when hipcc is not found
It should be possible to build all other deps when hipcc
is not present on the system, however the hiprt build
errored out during the configuration phase.

This change skips HIPRT when hipcc is not available
2024-11-08 08:11:26 -07:00
Sergey Sharybin
9abf9b15f4 Merge branch 'blender-v4.3-release' 2024-11-08 11:06:11 +01:00
Sergey Sharybin
f58522fc10 Cycles: Tweak scheduling of GPU kernel compilation
This change makes it so only kernels of the same vendor are compiled in
parallel. For example for the release builds it will be:

1. All CUDA kernels
2. All OptiX kernels
3. All HIP kernels
4. All OneAPI kernels

This potentially leads to a lower CPU utilization, but it makes it much
easier to manage memory usage and tweak per-vendor concurrency.

The goal of this change is to solve occasional out-of-memory during the
GPU kernels compilation step on the CI/CD farm.

This change also includes tweaks to the prallel jobs for HIP-RT and
oneAPI. The tweak is based on measuring apparent memory usage peak on
Linux when doing single-thread compilation, and giving some safe margin
from the available memory on the buildbot.

Pull Request: https://projects.blender.org/blender/blender/pulls/129945
2024-11-08 11:05:38 +01:00
Campbell Barton
3c3c27f1ed Unbreak "make update" on Rocky8 which uses Python 3.6 2024-11-06 21:14:53 +11:00
Jonas Holzman
831165edf8 Build: Update Harfbuzz to 10.0.1
Update Harfbuzz from version 5.1.0 to 10.0.1.

The current version of Harfbuzz (5.1.0) fails to build on Clang 16.0 and
above, breaking dependency builds on macOS 15.0 (which bumped the
Apple Clang version to 16.0). This is due to a new Clang warning flag
(`cast-function-type-strict`) which Harfbuzz implicitly enables and
treat as an error via a header pragma, which in turn prevents it from
being disabled via a simple `-Wno-error` flag.

Since Harfbuzz was only added as a preliminary dependency, and isn't
used anywhere in the Blender codebase yet, it was decided on the chat
that the simplest course of action would be to just bump it to its
latest version, as the problematic warning flag has been disabled in
version 6.0

Pull Request: https://projects.blender.org/blender/blender/pulls/128922
2024-11-03 12:57:58 +01:00
Campbell Barton
d920ef5425 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:44 +11:00
Campbell Barton
b00550916c PyDoc: correct use of single back-ticks 2024-11-03 21:50:33 +11:00
Campbell Barton
8570dd22e7 Merge branch 'blender-v4.3-release' 2024-11-02 23:06:24 +11:00
Campbell Barton
62a5aed215 Cleanup: quiet mypy type warning 2024-11-02 22:56:57 +11:00
Campbell Barton
e46c58df7c Merge branch 'blender-v4.3-release' 2024-11-02 15:44:22 +11:00
Campbell Barton
99387c0749 Cleanup: spelling in comments, docs & error 2024-11-02 15:43:27 +11:00
Jonas Holzman
7205ec804b Build: Fix OpenImageIO JPEG turbo library search path
The OpenImageIO JPEG library path build argument has changed in recent
OIIO version from `JPEG_LIBRARY` / `JPEG_INCLUDE_DIR` to `JPEG_ROOT` and
`libjpeg-turbo_ROOT` (similarly to the `OpenJPEG_ROOT` argument).

Before this commit, OIIO library builds on macOS would either error out
or wrongly link to the system jpeg-turbo library instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/128961
2024-10-30 21:13:50 +01:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Sergey Sharybin
97e86f6d72 Merge branch 'blender-v4.3-release' 2024-10-22 09:17:20 +02:00
Sergey Sharybin
a4553aad49 Build: Lower the number of concurrent HIP-RT jobs
This is an attempt to deal with an increased OOM on the buildbot.
2024-10-22 09:15:41 +02:00
Thomas Dinges
65e06fe7f9 Merge branch 'blender-v4.3-release' 2024-10-18 18:25:56 +02:00
Thomas Dinges
1caf71adac Fix path to GPL license in cmake packaging. 2024-10-18 18:25:16 +02:00
Thomas Dinges
6a1fa73b18 Merge branch 'blender-v4.3-release' 2024-10-18 17:20:04 +02:00
Thomas Dinges
aea5c81f73 Add license and copyright info for HIPRT and update license.md 2024-10-18 17:12:12 +02:00
Dalai Felinto
0a4dbc57b8 make license: command to update the license file
This generates a `license.md` file with all the relevant information about
the different libraries and their respecive licenses.

This should replace: THIRD-PARTY-LICENSES.txt

Important files:
* `make_license.py` (main script called by `make license`.
* `licenses.json` (file to add the definition of new licenses).
* `licenses/*/*.txt` (individual license files.

The `license.md` groups the libraries per license, list their
corresponding copyright information and include the complete license.

Code includes contributions from:
* Campbell Barton (multi-line parser for versions.cmake).
* Thomas Dinges (Windows support for `make license`).

Part of: !129018
2024-10-18 17:09:43 +02:00
Thomas Dinges
65762c880f Add license and copyright information for external dependencies
This is being added straight to 4.2, prior to the `make license` command
which will use this to generate a more complete license file.

Licenses information and ambiguities worked with Dalai Felinto.

Part of !129018.
2024-10-18 17:08:33 +02:00
Campbell Barton
f557b0071f Unbreak "make update" on the buildbot which uses Python 3.9 2024-10-18 13:05:36 +11:00
Campbell Barton
dbfe8db84c Cleanup: remove use of deprecated typing from build_files/ 2024-10-18 11:01:43 +11:00
Bastien Montagne
35f4cd0655 Fix (unreported) fully broken 'set custom envvars' feature for unittests.
A typo in `blender_test_set_envvars` cmake function made it impossible
for calling CMake code to specify custom environment variables.

Noticed that because trying to enable `WITH_UI_TESTS` option was
running my system Blender 4.0 instead of current build...

NOTE: This also revealed another issue (missing file in our Weston
library), will be fixed soon by Linux library maintainer.
2024-10-15 18:16:09 +02:00
Jonas Holzman
bb672a7e7c Build: macOS: Fix shared library rpath length padding error
This commit adds the `-headerpad_max_install_names` to the macOS
`make deps` dependencies build linker flags.

This fixes dependency install errors where the Xcode `install_name_tool`
couldn't properly set certain rpath paths when they were exceeding a
certain length. With this flag ensuring that the maximum amount of
padding is reserved for eventual path changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/128959
2024-10-14 14:31:00 +02:00
Campbell Barton
4b1b1b52db Merge branch 'blender-v4.3-release' 2024-10-14 21:50:58 +11:00
Campbell Barton
f8a29ccab5 Update autopep8 1.6.0 -> 2.3.1, remove outdated "toml" module
Bump autopep8 as there has been various improvements & bug-fixes.
Also update pycodestyle 2.8 -> 2.12.1.

autopep8 imported a module "toml" which has been superseded by
Python's own "tomllib". The "toml" module has been removed.

Ref !127553
2024-10-14 21:50:01 +11:00