Comments (7)
If std::numeric_limits<intptr_t>::max()
works, the equivalent value could be generated via
std::numeric_limits<intptr_t>::max() / 2
Are you able to test that?
Since the /4 makes the number positive it doesn't seem important that kMaxSize needs to be a uintptr_t.
from openexr.
@reumia, that's curious as it's far from the only use of uintptr_t
, it's used in the OpenEXR and OpenEXRCore libraries, so I would expect the failure there first if it's not defined, is that not happening? Are we missing an include?
@peterhillman, could you possibly take a look at this? The code in question declares kMaxSize
as uintptr_t
then only uses it on the following line where it's cast to streampos
. Wouldn't it be better to simply declare it as streampos
in the first place? And I'm not sure what edge case the uintptr_t(-1)
is intended to catch, can that be simplified?
from openexr.
I think @kdt3rd wrote that bit. It certainly looks cleverer than anything I'd write. I would have been tempted to put a constant in there for the maximum file size that will be loaded into memory. I think declaring it as streampos isn't equivalent: a processor could have a 32 bit memory pointer size but still support 64 bit file pointers.
from openexr.
Thanks for the answers all, this got me into looking a bit closer at the issue and while I don't understand everything yet, I believe this might be partly an issue coming from OpenColorIO, here are some more information:
- We use
OPENEXR_INSTALL_TOOLS
instead of the correctOPENEXR_BUILD_TOOLS=OFF
so in theory should not even build the tools and would not have seen any issues, - OpenColorIO platform latest nightly build try to use C++20, this might not even be supported / tested by OpenEXR (goal of this workflow is to find issues early though)
- OpenColorIO still installs an "old" version of OpenEXR for this CI workflow, 3.1.5 by default (Apr. 2022)
- Looking at the compilation log, OpenEXRCore compile flags do not include any
-std=c++20
or-std=gnu++20
, rest of the libraries (Iex, IlmThread) and tools do which probably trigger the error here (as @cary-ilm rightfully pointed out, OpenEXRCore use that type in a few places already). I don't know exactly why OpenEXRCore doesn't get the C++ standard flag but suspect this is related to it's dependency with Imath, will have to dig further to understand.
from openexr.
Following up on this, did this get resolved?
And @remia, in case it matters, the reason that OpenEXRCore doesn't get the C++ standard flag is that it's written in C, not C++.
from openexr.
Related Issues (20)
- Homebrew add static lib HOT 1
- missing _compress referenced in openexr v3.1.11 what should i do? HOT 1
- Linker error while installing `opencv`: Undefined symbols for architecture arm64 HOT 3
- Regression: Build fails with custom namespaces HOT 1
- Regression in v3.2.1: no longer finds -ldeflate on FreeBSD, breaks build HOT 5
- macOS: OpenEXR dylib names: changed with each release, breaking dependent binaries HOT 13
- Website fails to build on Windows HOT 5
- Imath includes shall be guarded HOT 1
- Use CMake's find_package to include libdeflate HOT 7
- Not building on Archlinux HOT 2
- SIGSEGV on file open error HOT 1
- NetBSD: bswap header use incorrect
- OpenEXR.cpp:1:10: fatal error: Python.h: No such file or directory in Ubuntu 18.04 and Blender Bundled Python 3.5m
- g++ -pthread -shared -L/opt/lib/bz2/lib -L/opt/lib/lzma/lib -L/opt/lib/ssl/lib -L/opt/lib/zlib/lib -L/opt/lib/libc6/lib -L/opt/lib/ncurses/lib -L/opt/lib/gpm/lib -L/opt/lib/sqlite/lib -L/opt/lib/readline/lib -Wl,--version-script=python.map build/temp.linux-x86_64-3.5/OpenEXR.o -L/usr/lib -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/opt/openexr/lib -L/opt/homebrew/opt/imath/lib -lIex -lHalf -lImath -lIlmImf -lz -o build/lib.linux-x86_64-3.5/OpenEXR.cpython-35m-x86_64-linux-gnu.so /usr/bin/ld: cannot open linker script file python.map: No such file or directory HOT 2
- /workspace/ubuntu18.04/openexr/src/wrappers/python/OpenEXR.cpp:7:10: fatal error: Python.h: No such file or directory #include <Python.h> HOT 2
- MacPorts deprecation needs to be removed HOT 2
- OpenEXR - Python IntelliSense HOT 6
- Imath - Remove Enumerated Class and replace with Enum Class HOT 1
- Unable to build openexr with python bindings via cmake HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openexr.