From e89e10b6c48eebedcd5d334764631631f41a2512 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 14 Aug 2026 15:58:48 -0700 Subject: [PATCH 1/4] IECore : Add missing includes for GCC 14 https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes --- include/IECore/MurmurHash.h | 1 + src/IECore/RunTimeTyped.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/IECore/MurmurHash.h b/include/IECore/MurmurHash.h index 91b20ea83a..22aef4c2d5 100644 --- a/include/IECore/MurmurHash.h +++ b/include/IECore/MurmurHash.h @@ -37,6 +37,7 @@ #include "IECore/Export.h" +#include #include #include #include diff --git a/src/IECore/RunTimeTyped.cpp b/src/IECore/RunTimeTyped.cpp index 2d17497737..e4064d65ba 100644 --- a/src/IECore/RunTimeTyped.cpp +++ b/src/IECore/RunTimeTyped.cpp @@ -36,6 +36,7 @@ #include "IECore/MessageHandler.h" +#include #include #include From e0c2da280e2c0750792fc390ccc6b4b984947ce3 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 14 Aug 2026 15:59:27 -0700 Subject: [PATCH 2/4] IECorePython : Remove redundant moves This reverts 814f9d251e7e007d57d9deba88fc1d84fb2e8fbf as GCC 14 now reports these as redundant with `-Werror=redundant-move`, and modern Xcode is no longer bothered. --- src/IECorePython/FileSequenceBinding.cpp | 4 ++-- src/IECorePython/FileSequenceFunctionsBinding.cpp | 2 +- src/IECorePython/SearchPathBinding.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/IECorePython/FileSequenceBinding.cpp b/src/IECorePython/FileSequenceBinding.cpp index 4706d28f7b..799a2cec42 100644 --- a/src/IECorePython/FileSequenceBinding.cpp +++ b/src/IECorePython/FileSequenceBinding.cpp @@ -130,7 +130,7 @@ struct FileSequenceHelper l.append( make_tuple( it->first, it->second ) ); } - return std::move( l ); + return l; } else { @@ -144,7 +144,7 @@ struct FileSequenceHelper d[ it->first ] = it->second; } - return std::move( d ); + return d; } } diff --git a/src/IECorePython/FileSequenceFunctionsBinding.cpp b/src/IECorePython/FileSequenceFunctionsBinding.cpp index 14cdc36e46..adf52891f2 100644 --- a/src/IECorePython/FileSequenceFunctionsBinding.cpp +++ b/src/IECorePython/FileSequenceFunctionsBinding.cpp @@ -101,7 +101,7 @@ struct FileSequenceFunctionsHelper result.append( *it ); } - return std::move( result ); + return result; } return object(); diff --git a/src/IECorePython/SearchPathBinding.cpp b/src/IECorePython/SearchPathBinding.cpp index 2f6b7e6670..b9259e4763 100644 --- a/src/IECorePython/SearchPathBinding.cpp +++ b/src/IECorePython/SearchPathBinding.cpp @@ -69,7 +69,7 @@ object getPaths( const SearchPath &s ) { l.append( it->string() ); } - return std::move( l ); + return l; } void setPaths( SearchPath &s, const object &p ) From 212c2c8019b3e5941e717e5a6c793f4050a9ae0e Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 14 Aug 2026 17:07:53 -0700 Subject: [PATCH 3/4] ShaderNetworkBinding : Avoid `-Wdangling-reference` on GCC14 This silences GCC 14's grumble that this is possibly a dangling reference to a temporary... ``` src/IECoreScene/bindings/ShaderNetworkBinding.cpp:60:31: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 60 | const Shader &shader = extract( items[i][1] )(); | ^~~~~~ src/IECoreScene/bindings/ShaderNetworkBinding.cpp:60:78: note: the temporary was destroyed at the end of the full expression 'boost::python::extract(boost::python::api::proxy::operator boost::python::api::object() const [with Policies = boost::python::api::item_policies]()).boost::python::extract::boost::python::converter::extract_reference.boost::python::converter::extract_reference::operator()()' 60 | const Shader &shader = extract( items[i][1] )(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ ``` --- src/IECoreScene/bindings/ShaderNetworkBinding.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IECoreScene/bindings/ShaderNetworkBinding.cpp b/src/IECoreScene/bindings/ShaderNetworkBinding.cpp index efdc0dca8f..7f20795c0b 100644 --- a/src/IECoreScene/bindings/ShaderNetworkBinding.cpp +++ b/src/IECoreScene/bindings/ShaderNetworkBinding.cpp @@ -57,7 +57,8 @@ ShaderNetworkPtr constructor( dict shaders, list connections, object output ) for( size_t i = 0, e = len( items ); i < e; ++i ) { InternedString handle = extract( items[i][0] )(); - const Shader &shader = extract( items[i][1] )(); + extract shaderExtractor( items[i][1] ); + const Shader &shader = shaderExtractor(); result->addShader( handle, &shader ); } From 560bc116df5f74226c906d7a409680b844535430 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 14 Aug 2026 17:21:36 -0700 Subject: [PATCH 4/4] SConstruct : Avoid `-Wmaybe-uninitialized` false-positives in GCC 14 --- Changes | 5 +++++ SConstruct | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Changes b/Changes index 69d171b63a..2c85314be6 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,11 @@ Improvements - PathMatcher : Added `in()` and `containing()` methods. +Build +----- + +- GCC : Added compatibility with GCC 14. + 10.7.0.0 ======== diff --git a/SConstruct b/SConstruct index 34dcdae00a..0d04e36b7c 100644 --- a/SConstruct +++ b/SConstruct @@ -1222,6 +1222,11 @@ if env["PLATFORM"] != "win32" : # fully work. Reenable when we encounter versions that work correctly. basePythonEnv.Append( CXXFLAGS = [ "-Wno-strict-aliasing" ] ) + if "g++" in os.path.basename( env["CXX"] ) and not "clang++" in os.path.basename( env["CXX"] ) : + ## GCC 14 reports -Wmaybe-uninitialized warnings from Boost.Python's extract<>. + # Keep the warning enabled, but don't fail the build. + basePythonEnv.Append( CXXFLAGS = [ "-Wno-error=maybe-uninitialized" ] ) + # get the python link flags if basePythonEnv["PYTHON_LINK_FLAGS"]=="" : basePythonEnv["PYTHON_LINK_FLAGS"] = getPythonConfig( basePythonEnv, "--ldflags" )