Commit Graph

28 Commits

Author SHA1 Message Date
Anthony Roberts 7e3b83b146 Build: Add Windows ARM64 support for library dependencies
* VS2022 is required.
* Only OpenPGL and DPCPP are disabled, other libraries are supported.
* Embree is built with LLVM and VS2019 tools, and for that reason has
  its own cmake file as it is quite different.
* TBB and USD patches should become obsolete once these are upstreamed
  and Blender upgrades to the latest versions.

Ref #119126

Pull Request: https://projects.blender.org/blender/blender/pulls/117036
2024-03-06 16:14:33 +01:00
Campbell Barton 28e771372b Cleanup: wrap lines for in CMake's build-environment for readability
- Commands which have arguments split over multiple lines use
  indented lines.
- Wrap lines where multiple commands run using "&&".
- Blank lines between multiple commands helps the text from becoming
  too dense.
2024-02-10 22:36:36 +11: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
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
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 b7b2e08dcb Revert "Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC"
This reverts commit 451751380c.

Seems like this broke linux/mac, likely needs to detect of libxvid
is there or not. For now revert until we sort this out.
2023-06-10 16:24:17 -06:00
Anthony 451751380c Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC
Currently, 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/105502
2023-06-10 23:05:49 +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
Campbell Barton 1324db0ad1 Cleanup: cmake indentation 2022-12-14 14:21:51 +11:00
Patrick Mours ef268c7893 Build: Fix build of library dependencies on Linux aarch64
rBb9c37608a9e959a896f5358d4ab3d3d001a70833 moved evaluation of
`versions.cmake` before `options.cmake`, as a result of which
`BLENDER_PLATFORM_ARM` was no longer defined in `versions.cmake`,
causing it to choose the wrong OpenSSL version for aarch64. This
reverts that. Also fixes a compiler crash when building flex with some
glibc versions.

Differential Revision: https://developer.blender.org/D15319
2022-06-30 16:49:42 +02:00
Sergey Sharybin 549f9a1178 Build Deps: Disallow looking for Python in registry for ISPC
Should prevent accidental use of wrong Python.
2022-06-20 17:11:33 +02:00
Sergey Sharybin df3a67fc52 Build Deps: Pass Python3 root to ISPC
Following what is done for LLVM. Being consistent feels good here.

Not strictly needed as the build here passed anyway, but it does
feel good to be consistent.
2022-06-20 17:10:15 +02:00
Sergey Sharybin f86722afc7 Build Deps: Fix ISPVC and OIDN compilation on fresh Windows
Make them to use self-compiled Python, similar to previous fixes
for other libraries.
2022-06-20 16:50:24 +02:00
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Brecht Van Lommel ff594715b8 Build: macOS library upgrade fixes
* Revert back to OpenMP 9.0.1 due to bug causing cloth physics test to fail.
* Skip flex build on macOS to avoid link error, only reason we build this is
  due to old flex version on Linux CentOS 7.
* Fix PNG cmake argument that expects lowercase on instead of ON.

 Ref T90507, T88438
2021-08-09 16:50:31 +02:00
Sybren A. Stüvel c5e5ac4a17 Deps builder: OIIO/OSL/ISPC/OIDN/LLVM/Flex updates
This diff somewhat snowballed out of updating OIDN to 1.4.1 it had some
changes that allowed us to remove the arm hacks we had in place and
revert to using identical versions for a whole bunch of deps. But that
required an update to ISPC which needed a newer LLVM and if we're
updating LLVM we may as well update OSL, and when we update OSL, OIIO
may as well be dragged in soo......anyhow...

This diff updates:

LLVM 9.0.0 (11.0.1 for mac/arm) -> 12.0.0
OIIO 2.1.15.0 -> 2.2.15.1
OSL 1.11.10.0 -> 1.11.14.1
winflex_bison 2.5.5-> 2.5.24 (ispc needed newer bison, windows only dep)
OIDN 1.4.0 -> 1.4.1
ISPC v1.14.1(random hash for mac/arm) -> v1.16.0
Flex 2.6.4 (ISPC needed newer Flex than available on CentOS 7)

and removes most of the "special arm/mac" versions. I think just ssl and
embree are left with special versions.

notable changes:
@LazyDodo included some clang headers in the linux/mac harvest which are
needed to start writing custom clang based tooling like D9465 these were
already shipping on windows, but not the other platforms.

[macOS] Change the `LC_ID_DYLIB` of OpenMP  for {D11997}. This changes
where the executables look for dylibs.

Reviewed By: sebbas, LazyDodo

Differential Revision: https://developer.blender.org/D11748
2021-07-27 10:15:31 +02:00
Sybren A. Stüvel d07a7697cf Fix T86124: Self-hosting external libraries packages
Allow downloading of source packages of Blender's dependencies, so that
it's easier to provide a "full source archive" that contains the blender
source + all dependencies archives. A `make` command for this will be
introduced soon.

This changes the deps builder slightly to be more flexible with the
origin of our source packages.

To support this a new CMake variable has been added called `PACKAGE_DIR`
where all sources archives will be stored.

default: a directory called `packages` in the build folder.

alternative-default: if a directory called `packages` exists in the
blender source folder that will be used. This is to support the "full
source archive" use case.

The download phase have been moved from the build phase to the configure
phase. Configure will download all sources validate the hashes while
downloading.

All `[depname].cmake` files have been changed to take a local
`file://[path_to_local_tarball]` path rather than a remote URI.

A second requirement was that there needed to be an option to grab the
sources from the blender SVN mirror rather than upstream. For this an
option has been added PACKAGE_USE_UPSTREAM_SOURCES (default ON). The
exact location in SVN still needs to be worked out, I tested with my
local webserver and codewise it checks out. The path that is in there
currently will not work (given there is no mirror there yet).

To build this mirror our local package caches can be used.

Reviewed By: lazydodo

Differential Revision: https://developer.blender.org/D10598
2021-03-16 14:10:30 +01:00
Sebastián Barschkis fb7751f3e6 CMake/deps: Fix LLVM and OSL builds
This commit is addition to D10212. Apple arm64 support was left out in that patch.
2021-02-26 17:38:14 +01:00
Ray Molenkamp 4fb0c83c1c Cmake/deps: Update OSL to 1.11.10.0
This bumps OSL to 1.11.10.0. OSL Has a new build time
dependency: Clang, and more importantly it expects
clang and llvm to share a library folder, which it
previously for us did not.

This patch changes:

-OSL Update to 1.11.10.0

-refactor the llvm/clang/clang-tools-extra builds into the llvm
 build using the llvm-project tarball for building that has all
 of the subprojects in it.

-update ispc/openmp builds since clang no longer its own dependency
 and they have to depend on the llvm build now.

-Update the windows builder to use the 64 bit host tools since it
 ran out of ram linking clang

-Since OSL now needs clang to link successfully a findclang.cmake
 has been provided for linux/OSX

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

Reviewed By: brecht, sebbas, sybren
2021-02-24 07:13:37 -07:00
Brecht Van Lommel ae370e292a macOS: add Embree, OpenImageDenoise and sse2neon libraries for ARM
This required using a fork of Embree, newer LLVM version, unreleased ISPC
version and sse2neon directly from Git. Hopefully over time all the required
changes end up in official releases. For now we deviate from other platforms.

Based on contributions by Apple and Stefan Werner.

Ref D9527, D8237, T78710
2021-02-15 20:22:34 +01:00
Stefan Werner 05f410dd84 macOS: Added new location for Homebrew.
The build script for macOS dependencies expects to find bison provided
by Homebrew under /usr/local. Since the default install location for
Homebrew changes on macOS/ARM, the script now looks at the host
architecture and switches to /opt/homebrew on Macs with Apple Silicon.
2020-11-26 11:30:53 +01:00
Brecht Van Lommel 7b988188dc Fix T79929: crashes with Cycles denoising on older Macs
This was a bug in OpenImageDenoise, upgrade to latest 1.2.3 which has the fix.
This in turn required a newer ispc version.

Differential Revision: https://developer.blender.org/D8892
2020-09-18 18:11:32 +02:00
Campbell Barton 83d6290800 Cleanup: remove trailing space, newlines at eof 2020-08-03 15:14:02 +10: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 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
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
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