guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: OpenColorIO: Fix build with GCC 11.


From: guix-commits
Subject: 02/03: gnu: OpenColorIO: Fix build with GCC 11.
Date: Sun, 23 Apr 2023 19:05:59 -0400 (EDT)

lfam pushed a commit to branch core-updates
in repository guix.

commit 186e516400d0676fcf50c653772cfe9ed3370db0
Author: Leo Famulari <leo@famulari.name>
AuthorDate: Sun Apr 23 18:09:08 2023 -0400

    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.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/image-processing.scm                  |  1 +
 .../patches/opencolorio-fix-build-with-gcc11.patch | 37 ++++++++++++++++++++++
 3 files changed, 39 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index dc7cd66f28..fd9564477a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1626,6 +1626,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/openboardview-use-system-imgui.patch    \
   %D%/packages/patches/openboardview-use-system-mpc.patch      \
   %D%/packages/patches/openbox-python3.patch                   \
+  %D%/packages/patches/opencolorio-fix-build-with-gcc11.patch  \
   %D%/packages/patches/openfoam-4.1-cleanup.patch                      \
   %D%/packages/patches/openjdk-9-pointer-comparison.patch       \
   %D%/packages/patches/openjdk-9-setsignalhandler.patch         \
diff --git a/gnu/packages/image-processing.scm 
b/gnu/packages/image-processing.scm
index 42bd34bd63..cc0d5789b3 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -262,6 +262,7 @@ of external libraries that provide additional 
functionality.")
        (uri (git-reference
              (url "https://github.com/AcademySoftwareFoundation/OpenColorIO";)
              (commit (string-append "v" version))))
+       (patches (search-patches "opencolorio-fix-build-with-gcc11.patch"))
        (sha256
         (base32 "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb"))
        (file-name (git-file-name name version))
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]