summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2023-04-23 18:09:08 -0400
committerLeo Famulari <leo@famulari.name>2023-04-23 19:05:15 -0400
commit186e516400d0676fcf50c653772cfe9ed3370db0 (patch)
tree43f1cc9900e2c6d108f1b314044827e933d2d9df /gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch
parent2a8e92f2d9bc57b9a40ece218a86da547e0c1885 (diff)
gnu: OpenColorIO: Fix build with GCC 11.
* gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/image-processing.scm (opencolorio)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch')
-rw-r--r--gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch b/gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch
new file mode 100644
index 0000000000..06507db206
--- /dev/null
+++ b/gnu/packages/patches/opencolorio-fix-build-with-gcc11.patch
@@ -0,0 +1,37 @@
+Fix build failure with GCC 11:
+
+------
+[...]
+/tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:60:51: error: ‘this’ pointer is null [-Werror=nonnull]
+ 60 | os << "width=" << packedImg->getWidth() << ", ";
+ | ^
+/tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:274:10: note: in a call to non-static member function ‘long int OpenColorIO::v1::PackedImageDesc::getWidth() const’
+ 274 | long PackedImageDesc::getWidth() const
+ | ^~~~~~~~~~~~~~~
+/tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:61:53: error: ‘this’ pointer is null [-Werror=nonnull]
+ 61 | os << "height=" << packedImg->getHeight() << ", ";
+ | ^
+/tmp/guix-build-opencolorio-1.1.1.drv-0/source/src/core/ImageDesc.cpp:279:10: note: in a call to non-static member function ‘long int OpenColorIO::v1::PackedImageDesc::getHeight() const’
+ 279 | long PackedImageDesc::getHeight() const
+ | ^~~~~~~~~~~~~~~
+cc1plus: all warnings being treated as errors
+[...]
+------
+
+Patch copied from Gentoo:
+
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e726d850502018b6760da78dbd4a419603016b8
+
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 1eb691b6..cff9bd83 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -23,8 +23,6 @@ if(WIN32)
+ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+ set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX")
+ endif()
+-else()
+- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror")
+ endif()
+
+ # SHARED