Skip to content

Commit 635d156

Browse files
authored
deps: Raise dependencies: cmake 3.19, OIIO 2.5, LLVM 11 (#1914)
Some last minute dependency adjustments before I cut a beta for OSL 1.14. * Raise CMake minimum to 3.19 (from 3.15). This is still very conservative -- 4 years old, even more lax than our usual "3 years back" rule. Raising to 3.18 matches OIIO 3.0, and compared to 3.15, it adds Cuda support as well as the `--debug-find` flag. Further raising to 3.19 -- which in 2025 seems prudent, even though it's beyond the version chosen by OIIO 6 months ago -- adds more helpful features, including presets, and Apple Silicon support. * Raise OpenImageIO to 2.5 (from 2.4). The current release is 3.0, FYI. * Bump LLVM minimum to 11.0 (from 9.0). This is a pretty conservative move, still gives several years of back support, but brings a little code simplification. I expect that next year's OSL will raise the LLVM minimum by several more versions. --------- Signed-off-by: Larry Gritz <[email protected]>
1 parent 3317350 commit 635d156

File tree

11 files changed

+55
-134
lines changed

11 files changed

+55
-134
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
fail-fast: false
3939
matrix:
4040
include:
41-
- desc: gcc9/C++17 llvm11 py3.7 oiio2.4 sse4 batch-b8avx2
41+
- desc: gcc9/C++17 llvm11 py3.7 oiio2.5 sse4 batch-b8avx2
4242
nametag: linux-vfx2021
4343
runner: ubuntu-latest
4444
container: aswftesting/ci-osl:2021-clang11
4545
vfxyear: 2021
4646
old_node: 1
4747
cxx_std: 17
4848
openexr_ver: v3.1.3
49-
openimageio_ver: v2.4.13.0
49+
openimageio_ver: v2.5.4.0
5050
python_ver: 3.7
5151
pybind11_ver: v2.7.0
5252
simd: sse4.2
@@ -72,38 +72,39 @@ jobs:
7272
old_node: 1
7373
cxx_std: 17
7474
opencolorio_ver: v2.2.1
75-
openimageio_ver: main
75+
openimageio_ver: v3.0.2.0
7676
python_ver: 3.9
7777
pybind11_ver: v2.7.0
7878
simd: avx2,f16c
7979
batched: b8_AVX2,b8_AVX512,b16_AVX512
8080
setenvs: USE_OPENVDB=0
81-
- desc: gcc9/C++17 llvm11 py3.9 exr3.1 oiio2.3 sse2 batch-b4sse2
81+
- desc: gcc9/C++17 llvm11 py3.9 exr3.1 oiio3.0 sse2 batch-b4sse2
8282
nametag: linux-vfx2021
8383
runner: ubuntu-latest
8484
container: aswftesting/ci-osl:2022-clang13
8585
vfxyear: 2022
8686
old_node: 1
8787
cxx_std: 17
88-
openimageio_ver: release
88+
opencolorio_ver: v2.2.0
89+
openimageio_ver: dev-3.0
8990
python_ver: 3.9
9091
pybind11_ver: v2.9.0
9192
simd: sse2
9293
batched: b4_SSE2
93-
- desc: oldest everything gcc9/C++17 llvm9 py3.7 oiio2.3 no-simd
94+
- desc: oldest everything gcc9/C++17 llvm9 py3.7 oiio2.5 no-simd
9495
nametag: linux-oldest
9596
runner: ubuntu-latest
9697
container: aswftesting/ci-osl:2021-clang11
9798
vfxyear: 2021
9899
old_node: 1
99100
cxx_std: 17
100101
openexr_ver: v3.1.0
101-
openimageio_ver: v2.4.13.0
102+
openimageio_ver: v2.5.4.0
102103
python_ver: 3.7
103104
pybind11_ver: v2.7.0
104-
simd: 0
105+
# simd: 0
105106
setenvs: export PUGIXML_VERSION=v1.8
106-
CMAKE_VERSION=3.15.5
107+
CMAKE_VERSION=3.19.0
107108
ENABLE_OPENVDB=0
108109

109110

@@ -307,7 +308,7 @@ jobs:
307308
cc_compiler: gcc
308309
cxx_compiler: g++
309310
cxx_std: 17
310-
# openimageio_ver: release
311+
openimageio_ver: release
311312
python_ver: "3.10"
312313
simd: "avx2,f16c"
313314
batched: b8_AVX2
@@ -344,7 +345,7 @@ jobs:
344345
setenvs: export OSL_CMAKE_FLAGS="-DSTOP_ON_WARNING=OFF -DEXTRA_CPP_ARGS=-fp-model=consistent"
345346
OPENIMAGEIO_CMAKE_FLAGS=-DBUILD_FMT_VERSION=7.1.3
346347
USE_OPENVDB=0 OPENCOLORIO_CXX=g++
347-
- desc: icx/C++17 llvm14 py3.9 oiio2.3 avx2
348+
- desc: icx/C++17 llvm14 py3.10 oiio-3.0 avx2
348349
nametag: linux-icx
349350
runner: ubuntu-latest
350351
container: aswftesting/ci-osl:2023-clang15
@@ -354,7 +355,7 @@ jobs:
354355
cxx_std: 17
355356
fmt_ver: 7.1.3
356357
opencolorio_ver: v2.3.2
357-
openimageio_ver: main
358+
openimageio_ver: v3.0.2.0
358359
python_ver: "3.10"
359360
pybind11_ver: v2.10.0
360361
simd: avx2,f16c
@@ -464,22 +465,22 @@ jobs:
464465
fail-fast: false
465466
matrix:
466467
include:
467-
- desc: Debug gcc7/C++17 llvm9 py3.7 oiio2.3 exr2.4 sse4 exr2.4
468-
nametag: linux-debug-gcc7-llvm9
468+
- desc: Debug gcc7/C++17 llvm11 py3.8 oiio2.5 exr3.1 sse4
469+
nametag: linux-debug-gcc7-llvm11
469470
runner: ubuntu-20.04
470471
cxx_compiler: g++-9
471472
cxx_std: 17
472473
openexr_ver: v3.1.11
473-
openimageio_ver: v2.4.13.0
474+
openimageio_ver: v2.5.4.0
474475
pybind11_ver: v2.7.0
475476
python_ver: 3.8
476477
simd: sse4.2
477478
setenvs: export CMAKE_BUILD_TYPE=Debug
478-
LLVM_VERSION=9.0.0
479+
LLVM_VERSION=11.0.0 LLVM_DISTRO_NAME=ubuntu-20.04
479480
PUGIXML_VERSION=v1.9
480481
CTEST_TEST_TIMEOUT=240
481-
- desc: gcc10/C++17 llvm10 oiio-2.5 avx2
482-
nametag: linux-2021ish-gcc10-llvm10
482+
- desc: gcc10/C++17 llvm11 oiio-2.5 avx2
483+
nametag: linux-2021ish-gcc10-llvm11
483484
runner: ubuntu-20.04
484485
cxx_compiler: g++-10
485486
cxx_std: 17
@@ -489,10 +490,10 @@ jobs:
489490
pybind11_ver: v2.8.1
490491
python_ver: 3.8
491492
simd: avx2,f16c
492-
setenvs: export LLVM_VERSION=10.0.0
493+
setenvs: export LLVM_VERSION=11.0.0 LLVM_DISTRO_NAME=ubuntu-20.04
493494
OPENIMAGEIO_CMAKE_FLAGS="-DBUILD_FMT_VERSION=7.0.1"
494495
PUGIXML_VERSION=v1.10
495-
- desc: latest releases gcc11/C++17 llvm17 exr3.2 py3.10 avx2 batch-b16avx512
496+
- desc: latest releases gcc11/C++17 llvm17 oiio-3.0 exr3.2 py3.12 avx2 batch-b16avx512
496497
nametag: linux-latest-releases
497498
runner: ubuntu-24.04
498499
cc_compiler: gcc-13
@@ -501,7 +502,7 @@ jobs:
501502
fmt_ver: 11.0.2
502503
opencolorio_ver: v2.4.0
503504
openexr_ver: v3.3.0
504-
openimageio_ver: main
505+
openimageio_ver: release
505506
pybind11_ver: v2.13.5
506507
python_ver: "3.12"
507508
simd: avx2,f16c
@@ -512,7 +513,7 @@ jobs:
512513
PTEX_VERSION=v2.4.3
513514
PUGIXML_VERSION=v1.14
514515
FREETYPE_VERSION=VER-2-13-3
515-
- desc: bleeding edge gcc12/C++17 llvm17 oiio/ocio/exr/pybind-main py3.10 avx2 batch-b16avx512
516+
- desc: bleeding edge gcc12/C++17 llvm17 oiio/ocio/exr/pybind-main py3.12 avx2 batch-b16avx512
516517
nametag: linux-bleeding-edge
517518
runner: ubuntu-24.04
518519
cc_compiler: gcc-13

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: BSD-3-Clause
33
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
44

5-
cmake_minimum_required (VERSION 3.15)
5+
cmake_minimum_required (VERSION 3.19)
66

77
set (OSL_VERSION "1.14.3.0")
88
set (OSL_VERSION_OVERRIDE "" CACHE STRING

INSTALL.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ Dependencies
1919
OSL requires the following dependencies or tools.
2020
NEW or CHANGED dependencies since the last major release are **bold**.
2121

22-
* Build system: [CMake](https://cmake.org/) **3.15 or newer** (tested through 3.30)
22+
* Build system: [CMake](https://cmake.org/) **3.19 or newer** (tested
23+
through 3.31)
2324

2425
* A suitable C++17 compiler to build OSL itself, which may be any of:
25-
- **GCC 9.3** or newer (tested through gcc 12.1)
26-
- **Clang 5** or newer (tested through clang 18)
26+
- **GCC 9.3** or newer (tested through gcc 13.1)
27+
- **Clang 5** or newer (tested through clang 19)
2728
- Microsoft Visual Studio 2017 or newer
2829
- Intel C++ compiler **icc version 19** or newer or LLVM-based icx compiler
2930
version 2022 or newer.
3031

31-
* **[OpenImageIO](http://openimageio.org) 2.4 or newer** (tested through 2.5 and main)
32+
* **[OpenImageIO](http://openimageio.org) 2.5 or newer** (tested through 3.0
33+
and main)
3234

3335
OSL uses OIIO both for its texture mapping functionality as well as
3436
numerous utility classes. If you are integrating OSL into an existing
@@ -47,8 +49,8 @@ NEW or CHANGED dependencies since the last major release are **bold**.
4749
$OpenImageIO_ROOT/lib to be in your LD_LIBRARY_PATH (or
4850
DYLD_LIBRARY_PATH on OS X).
4951

50-
* [LLVM](http://www.llvm.org) 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, or 19,
51-
including clang libraries.
52+
* [LLVM](http://www.llvm.org) 11, 12, 13, 14, 15, 16, 17, 18, or 19, including
53+
clang libraries.
5254

5355
* (optional) For GPU rendering on NVIDIA GPUs:
5456
* [OptiX](https://developer.nvidia.com/rtx/ray-tracing/optix) 7.0 or higher.

src/build-scripts/build_cmake.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -ex
1212
echo "Building cmake"
1313
uname
1414

15-
CMAKE_VERSION=${CMAKE_VERSION:=3.18.5}
15+
CMAKE_VERSION=${CMAKE_VERSION:=3.31.3}
1616
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
1717
CMAKE_INSTALL_DIR=${CMAKE_INSTALL_DIR:=${LOCAL_DEPS_DIR}/cmake}
1818

@@ -25,8 +25,8 @@ fi
2525

2626
if [[ `uname` == "Linux" && `uname -m` == "aarch64" ]] ; then
2727
mkdir -p ${CMAKE_INSTALL_DIR} || true
28-
curl --location https://anaconda.org/conda-forge/cmake/3.17.0/download/linux-aarch64/cmake-3.17.0-h28c56e5_0.tar.bz2 -o cmake-3.17.0-h28c56e5_0.tar.bz2
29-
tar -xjf cmake-3.17.0-h28c56e5_0.tar.bz2 -C ${CMAKE_INSTALL_DIR}
28+
curl --location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-aarch64.sh" -o "cmake.sh"
29+
sh cmake.sh --skip-license --prefix=${CMAKE_INSTALL_DIR}
3030
export PATH=${CMAKE_INSTALL_DIR}/bin:$PATH
3131

3232
# In case we ever need to build from scratch:

src/build-scripts/build_llvm.bash

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@ if [[ `uname` == "Linux" ]] ; then
1919
: ${LLVM_DISTRO_NAME:=ubuntu-18.04}
2020
LLVMTAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-${LLVM_DISTRO_NAME}.tar.xz
2121
echo LLVMTAR = $LLVMTAR
22-
if [[ "$LLVM_VERSION" == "9.0.0" ]] || [[ "$LLVM_VERSION" == "9.0.1" ]] ;
23-
then
24-
# old -- get rid of this when LLVM 10 is the newest we allow
25-
curl --location http://releases.llvm.org/${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
26-
else
27-
# new
28-
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
29-
fi
22+
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
3023
ls -l $LLVMTAR
3124
tar xf $LLVMTAR
3225
rm -f $LLVMTAR

src/cmake/externalpackages.cmake

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ set (OSL_USING_IMATH 3)
4848

4949
# OpenImageIO
5050
checked_find_package (OpenImageIO REQUIRED
51-
VERSION_MIN 2.4
51+
VERSION_MIN 2.5
5252
DEFINITIONS OIIO_HIDE_FORMAT=1)
5353

5454
checked_find_package (pugixml REQUIRED
@@ -57,7 +57,7 @@ checked_find_package (pugixml REQUIRED
5757

5858
# LLVM library setup
5959
checked_find_package (LLVM REQUIRED
60-
VERSION_MIN 9.0
60+
VERSION_MIN 11.0
6161
VERSION_MAX 19.9
6262
PRINT LLVM_SYSTEM_LIBRARIES CLANG_LIBRARIES)
6363
# ensure include directory is added (in case of non-standard locations
@@ -71,15 +71,6 @@ add_compile_definitions (OSL_LLVM_FULL_VERSION="${LLVM_VERSION}")
7171
if (LLVM_NAMESPACE)
7272
add_compile_definitions (LLVM_NAMESPACE=${LLVM_NAMESPACE})
7373
endif ()
74-
if (APPLE AND LLVM_VERSION VERSION_EQUAL 10.0.1 AND EXISTS "/usr/local/Cellar/llvm")
75-
message (WARNING
76-
"${ColorYellow}If you are using LLVM 10.0.1 installed by Homebrew, "
77-
"please note that a known bug in LLVM may produce a link error where "
78-
"it says it can't find libxml2.tbd. If you encounter this, please "
79-
"try upgrading to a newer LLVM: \n"
80-
" brew upgrade llvm \n"
81-
"${ColorReset}\n")
82-
endif ()
8374
if (LLVM_VERSION VERSION_GREATER_EQUAL 15.0 AND CMAKE_COMPILER_IS_CLANG
8475
AND ANY_CLANG_VERSION_STRING VERSION_LESS 15.0)
8576
message (WARNING

src/cmake/modules/FindLLVM.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ endif ()
9999
execute_process (COMMAND ${LLVM_CONFIG} --shared-mode
100100
OUTPUT_VARIABLE LLVM_SHARED_MODE
101101
OUTPUT_STRIP_TRAILING_WHITESPACE)
102-
if (LLVM_VERSION VERSION_GREATER_EQUAL 9.0 AND (LLVM_SHARED_MODE STREQUAL "shared"))
102+
if (LLVM_SHARED_MODE STREQUAL "shared")
103103
find_library ( _CLANG_CPP_LIBRARY
104104
NAMES "clang-cpp"
105105
PATHS ${LLVM_LIB_DIR}

src/liboslexec/llvm_passes.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ template<int WidthT> class PreventBitMasksFromBeingLiveinsToBasicBlocks {
6060
llvm::Type* llvm_type_bool = llvm::Type::getInt1Ty(context);
6161
llvm::Type* llvm_type_int32 = llvm::Type::getInt32Ty(context);
6262

63-
#if OSL_LLVM_VERSION >= 110
6463
m_llvm_mask_type = llvm::FixedVectorType::get(llvm_type_bool, WidthT);
6564
// NOTE: OSL doesn't have any 16 bit data types, so 32bit version
6665
// of the mask promotion will always be correct here. Should 16 bit
@@ -71,19 +70,13 @@ template<int WidthT> class PreventBitMasksFromBeingLiveinsToBasicBlocks {
7170
// livein.
7271
m_native_mask_type = llvm::FixedVectorType::get(llvm_type_int32,
7372
WidthT);
74-
# if OSL_LLVM_VERSION >= 112
73+
#if OSL_LLVM_VERSION >= 112
7574
m_wide_zero_initializer = llvm::ConstantDataVector::getSplat(
7675
WidthT, llvm::ConstantInt::get(context, llvm::APInt(32, 0)));
77-
# else
76+
#else
7877
m_wide_zero_initializer = llvm::ConstantVector::getSplat(
7978
llvm::ElementCount(WidthT, false),
8079
llvm::ConstantInt::get(context, llvm::APInt(32, 0)));
81-
# endif
82-
#else
83-
m_llvm_mask_type = llvm::VectorType::get(llvm_type_bool, WidthT);
84-
m_native_mask_type = llvm::VectorType::get(llvm_type_int32, WidthT);
85-
m_wide_zero_initializer = llvm::ConstantVector::getSplat(
86-
WidthT, llvm::ConstantInt::get(context, llvm::APInt(32, 0)));
8780
#endif
8881
}
8982

0 commit comments

Comments
 (0)