Commit Graph

3940 Commits

Author SHA1 Message Date
Brecht Van Lommel
cd7e5f0357 Build: Link to fewer Boost libraries
There were still a bunch of indirect dependencies from when static
linking was used. No need to link Blender against them.

Pull Request: https://projects.blender.org/blender/blender/pulls/132914
2025-01-13 10:40:18 +01:00
Campbell Barton
f829fefabe CMake: disable WITH_PIPEWIRE for lite builds 2025-01-09 13:07:54 +11:00
Sergey Sharybin
db6606dab9 Buildbot: Allow specifying explicit HIP version for Linux
Previously it was a single version specification which was only
used by Windows.

In practice we actually have two different SDKs for Linux and
Windows. This change makes it possible to specify explicit HIP
version for Linux which could be different from Windows.

No functional changes expected, the same HIP SDK version is
used, just explicitly.

Ref #131976

Pull Request: https://projects.blender.org/blender/blender/pulls/132694
2025-01-08 15:24:35 +01:00
Jonas Holzman
b2737510ee Deps: Update Boost library download URL
The current Boost download source we use (boostorg.jfrog.io) was
shut down, this PR replaces it with the new CDN (archives.boost.io)
the official boost.org website has switched to.

Refs:
https://github.com/boostorg/website/pull/900
https://github.com/boostorg/boost/issues/845#issuecomment-2541753013
https://github.com/boostorg/boost/issues/842

Pull Request: https://projects.blender.org/blender/blender/pulls/132774
2025-01-08 10:16:51 +01:00
Sebastian Parborg
bb53214661 Audaspace: Enforce minimal pipewire library version
While I implemented pipewire support I forgot that some of the functions I use is not available in older pipewire versions.

This adds proper library version sanity checks for pipewire.

Pull Request: https://projects.blender.org/blender/blender/pulls/131610
2025-01-06 18:19:08 +01:00
Campbell Barton
77041084cd Cleanup: quiet uninitialised variable warnings in CMake 2025-01-06 17:57:11 +11:00
Campbell Barton
4f1817cc18 Cleanup: declare __all__ for Python scripts
Declare all to make public public API's explicit and
help detect unused code.
2025-01-06 16:45:36 +11:00
Campbell Barton
c27bf6bef8 Cleanup: CMake indentation 2025-01-06 12:48:51 +11:00
Campbell Barton
3091dadfeb Cleanup: declare __all__ for some scripts in build_files/ 2025-01-04 20:37:46 +11:00
Campbell Barton
33e38c605f Cleanup: correct indentation for CMake files, strip trailing space 2025-01-03 13:23:38 +11:00
Ray Molenkamp
5783950ac5 Revert: 0dc484f9cc bf_rna modernisation
This caused build errors on the docs builder, I can't seem to reproduce
locally, so revert for now and have another look at some point in the
future.

Sadly as these changes usually go, this took 5c515e26bb and
2f0fc7fc9f with it as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/132559
2025-01-02 19:56:24 +01:00
Campbell Barton
bb0fd51b3c Fix project_qtcreator generator
Correction to [0] which looks to have missed
relocating some scripts.

Also revert Python 3.6 compatibility as it's not required for tools.

[0]: e83d87f588
2025-01-02 17:03:10 +11:00
Campbell Barton
7516614c2b Fix source checking tools using project_source_info
Moving files in [0] caused the module not to be found.

Also revert Python 3.6 compatibility changes.

[0] 2c9ab53273
2025-01-02 16:57:51 +11:00
Campbell Barton
5c515e26bb Cleanup: remove trailing space, ensure a newline at EOF 2025-01-02 15:11:18 +11:00
Campbell Barton
dfef060ea4 Cleanup: spelling in comments (make check_spelling_*)
Also use doxy-code blocks for inlined TEX to avoid
them being interpreted as English.
2025-01-02 15:11:17 +11:00
Campbell Barton
d64bd41ee9 Cleanup: wrap long lines 2025-01-02 15:11:14 +11:00
Campbell Barton
5fbd22ea67 CMake: mark non WITH_* variables as advanced
Also correct case for Tiff_DIR variable which wasn't being
marked as advanced.
2025-01-02 15:03:52 +11:00
Brecht Van Lommel
d3d19724d8 CLeanup: Guard against import set_rpath.py as a module
Avoids errors with the system python test.
2024-12-31 00:20:49 +01:00
Brecht Van Lommel
00a51b18b7 Fix: System python test failure after #132432
The text keyword is an alias of universal_newlines, and was introduced
in newer Python versions.
2024-12-31 00:20:32 +01:00
Hans Goudey
fbc5710ddd Cleanup: Formatting 2024-12-30 14:56:50 -05:00
feelamee
5920b157f6 install_linux_packages: fallback to doas if sudo is not found
Just convenience change to increase UX for little part of linux users, who love `doas`)

P.S.: doas is...
> Like sudo, doas is used to assume the identity of another user on the system.

from https://wiki.archlinux.org/title/Doas

Pull Request: https://projects.blender.org/blender/blender/pulls/132432
2024-12-30 20:22:31 +01:00
Ray molenkamp
0de684eba6 CMake: Raise LINK_INTERFACE_MULTIPLICITY to 3
The internal blender library dependency loops are longer than
the default cmake settings account for. As the work in [1]
adds more dependencies where they are needed this has become
a problem.

Bumping to 3 now as it solves the immediate linker problems in
#132375 but we can bump this further in the future if needed.

[1] https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/132385
2024-12-27 22:45:43 +01:00
Bastien Montagne
2c9ab53273 Add 'system python' validation for some py scripts.
The goal of this test is to try to import some critical py scripts with the
system python of the building machine.
The main target is to ensure that these py scripts remain usable by all
buildbot machines, as some of them are using fairly outdated python
versions.

Current status:
* Scripts in `build_files` and `docs` are checked.
* Some python scripts in `build_files` were 'reverted' to be compatible
  with older required python version currently (3.6).
* A few scripts are excluded from the test, mostly because they use Blender's
  `bpy` module, which means they are only intended to be ran with Blender's
  python anyway.
* The test is only enabled for Linux buildbots currently, as they use the
  oldest Python by far.

Notes:
* Some more scripts are likely to be moved around in the future.
* Whether these tests need to be enabled on windows or macos platforms remains
  an open question.

Pull Request: https://projects.blender.org/blender/blender/pulls/130746
2024-12-24 11:55:29 +01:00
Ray Molenkamp
5eba4313aa Deps_Builder: Win: Use blender mirror of msys2 for bootstrapping
This (optionally) uses the blender mirror for bootstrapping the msys2
environment, this is needed since some upstream providers remove older
packages frequently which makes it difficult to build older libs from
scratch.

Pull Request: https://projects.blender.org/blender/blender/pulls/131617
2024-12-19 14:41:24 +01:00
Bastien Montagne
e83d87f588 Move several py scripts from build_files to tools.
Preliminary step towards adding 'system python' validation for some
build-essential py scripts (!130746).

Pull Request: https://projects.blender.org/blender/blender/pulls/132025
2024-12-17 19:02:45 +01:00
salipourto
4e5a9c5dfb Cycles: Handling SDK/ROCm 6+ lack of backward compatibility with pre ROCm 6
This commit introduces proper handling of ROCm 5 and ROCm 6 runtimes on
Linux, based on the version of the ROCm compiler used at build time.
Previously, HIPEW (the HIP equivalent of Cuda Wrangler) defaulted to
loading the ROCm 5 runtime. If ROCm 5 was unavailable, it would attempt
to load ROCm 6. However, ROCm 6 introduces changes in certain
structures and functions that are not backward compatible, leading to
potential issues when kernels compiled with the ROCm 6 compiler are
executed on the ROCm 5 runtime.

### Summary of Changes:

**Separation of Structures and Functions:**
Structures and functions are now separated into hipew5 and hipew6 to
accommodate the differences between ROCm versions.

**Build-Time Version Detection:**
The ROCm version is determined during build time, and the corresponding
hipew5 or hipew6 is included accordingly.

**Runtime Default to ROCm 6:**
By default, HIPEW now loads the ROCm 6 runtime and
includes hipew6 (Linux only).

**JIT Compilation Behavior:**
Since ROCm 6 is the default version, JIT compilation is supported only
when the ROCm 6 compiler is detected at runtime.

**HIP-RT Update:**
HIP-RT has been updated to load the ROCm 6 runtime by default.

These changes ensure compatibility and stability when switching
between ROCm versions, avoiding issues caused by runtime
and compiler mismatches.

Co-authored-by: Alaska <alaskayou01@gmail.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/130153
2024-12-17 16:19:36 +01:00
Jeroen Bakker
28ea90f127 GPU: Split GPU backend and Draw manager unit tests
Both the draw manager and gpu backend used the same compilation
directive for enablement. This PR seperates them into
`WITH_GPU_DRAW_TESTS` for draw manager related tests and
`WITH_GPU_BACKEND_TESTS` for gpu backend related tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/132018
2024-12-17 13:28:21 +01:00
Ray Molenkamp
ba47bcdb7c Fix: Deps: Fix building dpcpp on many core box
This applies upstream PR 13328 to our copy of dpcpp, which enables
building dpcpp on a many core box. I Upgraded my build env and
ran into this issue.

No rebuilds required, build time fix only.
2024-12-16 14:17:08 -07:00
Brecht Van Lommel
cc295a7596 Fix: Mesa and OSL dependency build error due to missing xml2 from llvm-config 2024-12-15 21:57:54 +01:00
Brecht Van Lommel
7cc4911352 Fix: OIDN dependency build error on Linux arm64 2024-12-15 21:57:54 +01:00
Aras Pranckevicius
7e7f4f0cee Cleanup: Remove WITH_COMPOSITOR_CPU option (compositor is always in)
Compositor is a required feature and parts of it have been always
included anyway. Remove WITH_COMPOSITOR_CPU build option.

Pull Request: https://projects.blender.org/blender/blender/pulls/131838
2024-12-13 14:54:19 +01:00
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