View Issue Details

IDProjectCategoryView StatusLast Update
0000543Cinelerra-GGBugpublic2020-12-20 05:17
Reporterferdnyc Assigned ToPhyllisSmith  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Summary0000543: [PATCH] OpenEXR needs patching to build with GCC 11
DescriptionDoesn't look like this has been reported yet ­— building the 2020-10 snapshot with GCC 11, one of the OpenEXR
source files needs to be patched due to a missing include.
Steps To Reproduce1. Check out the 2020-10 tag
1. Build with GCC 11

Results:
  CXX ImfTiledMisc.lo
make[6]: Leaving directory '/builddir/build/BUILD/cinelerra-2020-10/cinelerra-5.1/thirdparty/openexr-2.4.1/OpenEXR/IlmImf'
ImfTiledMisc.cpp: In function 'int Imf_2_4::getTiledChunkOffsetTableSize(const Imf_2_4::Header&)':
ImfTiledMisc.cpp:375:67: error: 'numeric_limits' is not a member of 'std'
  375 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^~~~~~~~~~~~~~
ImfTiledMisc.cpp:375:82: error: expected primary-expression before 'int'
  375 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^~~
ImfTiledMisc.cpp:375:82: error: expected ')' before 'int'
  375 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^~~
      | )
ImfTiledMisc.cpp:375:82: error: expected ')' before 'int'
  375 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ~ ^~~
      | )
ImfTiledMisc.cpp:375:95: error: expected primary-expression before ')' token
  375 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^
ImfTiledMisc.cpp:387:71: error: 'numeric_limits' is not a member of 'std'
  387 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^~~~~~~~~~~~~~
ImfTiledMisc.cpp:387:86: error: expected primary-expression before 'int'
  387 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^~~
ImfTiledMisc.cpp:387:86: error: expected ')' before 'int'
  387 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^~~
      | )
ImfTiledMisc.cpp:387:86: error: expected ')' before 'int'
  387 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ~ ^~~
      | )
ImfTiledMisc.cpp:387:99: error: expected primary-expression before ')' token
  387 | if ( lineOffsetSize > static_cast<Int64>(std::numeric_limits<int>::max()) )
      | ^
make[6]: *** [Makefile:883: ImfTiledMisc.lo] Error 1
Additional InformationCopying the attached patch file into cinelerra-5.1/thirdparty/src/ fixes the build, by patching the source file
with the missing '#include <limits>'. There is no issue doing this unconditionally; the patch is correct even for
earlier GCC releases / other compilers.
TagsNo tags attached.
Attached Files
openexr-2.4.1.patch1 (637 bytes)   
From d891cfb0a2b8f6b48a9ede1a48aab022309100ed Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Mon, 14 Dec 2020 02:04:23 -0500
Subject: [PATCH] Include limits for std::numeric_limits

---
 OpenEXR/IlmImf/ImfTiledMisc.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OpenEXR/IlmImf/ImfTiledMisc.cpp b/OpenEXR/IlmImf/ImfTiledMisc.cpp
index 8552ada..bd865a1 100644
--- a/OpenEXR/IlmImf/ImfTiledMisc.cpp
+++ b/OpenEXR/IlmImf/ImfTiledMisc.cpp
@@ -45,6 +45,7 @@
 #include <ImfChannelList.h>
 #include <ImfTileDescription.h>
 #include <algorithm>
+#include <limits>
 
 #include "ImfNamespace.h"
 
-- 
2.29.2

openexr-2.4.1.patch1 (637 bytes)   

Activities

PhyllisSmith

2020-12-14 19:28

manager   ~0004424

@ferdnyc
This has been checked into GIT.
Thank you for explanation, patch, and confirmation of working on earlier versions/other compilers. I tested this on Fedora 32 with GCC 10.2.1-6 and visually looked at the patch and inspected the results of compilation to ensure the +limits was in ImfTiledMisc.cpp -- that is the extent of what I could do. Thanks so much for your continued support!

Issue History

Date Modified Username Field Change
2020-12-14 08:32 ferdnyc New Issue
2020-12-14 08:32 ferdnyc File Added: openexr-2.4.1.patch1
2020-12-14 19:28 PhyllisSmith Assigned To => PhyllisSmith
2020-12-14 19:28 PhyllisSmith Status new => acknowledged
2020-12-14 19:28 PhyllisSmith Note Added: 0004424
2020-12-15 19:19 PhyllisSmith Status acknowledged => resolved
2020-12-15 19:19 PhyllisSmith Resolution open => fixed
2020-12-20 05:17 PhyllisSmith Status resolved => closed