oiio-python icon indicating copy to clipboard operation
oiio-python copied to clipboard

giflib causes wheel import error on macOS

Open fredrikaverpil opened this issue 6 years ago • 1 comments

2019-02-01T21:15:04.5740960Z ImportError while importing test module '/Users/vsts/agent/2.144.2/work/1/s/tests/test_imagedimensions.py'.
2019-02-01T21:15:04.5741100Z Hint: make sure your test modules/packages have valid Python names.
2019-02-01T21:15:04.5741270Z Traceback:
2019-02-01T21:15:04.5741320Z test_imagedimensions.py:5: in <module>
2019-02-01T21:15:04.5741380Z     from oiio import OpenImageIO as oiio
2019-02-01T21:15:04.5742050Z E   ImportError: dlopen(/Users/vsts/hostedtoolcache/Python/3.6.5/x64/lib/python3.6/site-packages/oiio/OpenImageIO.so, 2): Symbol not found: _GifLastError
2019-02-01T21:15:04.5742610Z E     Referenced from: /Users/vsts/hostedtoolcache/Python/3.6.5/x64/lib/python3.6/site-packages/oiio/OpenImageIO.so
2019-02-01T21:15:04.5742780Z E     Expected in: flat namespace
2019-02-01T21:15:04.5743330Z E    in /Users/vsts/hostedtoolcache/Python/3.6.5/x64/lib/python3.6/site-packages/oiio/OpenImageIO.so

Link: https://fredrikaverpil.visualstudio.com/oiio-python/_build/results?buildId=827&view=logs&jobId=71d407c9-c576-569c-7d43-abe3f2f427cf&taskId=61447aba-a88d-5c82-03aa-a6e79ea00334&lineStart=58&lineEnd=66&colStart=1&colEnd=130

fredrikaverpil avatar Feb 01 '19 21:02 fredrikaverpil

Hey Fredrik! This happens because of incorrect use of headers/ library versions when oiio gif module is built. The build uses header files from a different version of giflib than the libraries. Did a quick check of my build, it's most likely a problem with the built in CMake find module for giflib. Easly fixed by removing multiple versions of giflib on the build system (Visual studio and others installs a Mono.Framework version in /Library/Frameworks/Mono.framework).

Found the issue on Google :-)

mikaelsundell avatar Nov 07 '20 13:11 mikaelsundell