Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 724092 - media-libs/openexr packages need build system patch which removes bashisms
Summary: media-libs/openexr packages need build system patch which removes bashisms
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL: https://github.com/AcademySoftwareFou...
Whiteboard:
Keywords: PATCH, PullRequest
Depends on: 728222
Blocks: nonbash
  Show dependency tree
 
Reported: 2020-05-19 20:01 UTC by Nico R.
Modified: 2020-07-21 19:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico R. 2020-05-19 20:01:22 UTC
Packages media-libs/ilmbase, media-libs/openexr, media-gfx/openexr_viewers, and dev-python/pyilmbase need patch https://github.com/AcademySoftwareFoundation/openexr/commit/ba329cba788d4f320e6fc455919233222c27a0dd in order to build correctly on systems where /bin/sh -> dash.

If the patch is not applied, strange things may happen, like media-libs/openimageio build failure due to a media-libs/openexr header with wrong autodetected values in it (in this case, ‘yes’ instead of ‘Imf’ as a namespace):

[41/162] ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DEMBED_PLUGINS=1 -DOpenImageIO_EXPORTS -DUSE_BOOST_ASIO=1 -DUSE_EXTERNAL_PUGIXML=1 -DUSE_FREETYPE -DUSE_JPEG_TURBO=1 -DUSE_OPENSSL=1 -DUSE_STD_REGEX -DUSE_WEBP=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/sr
c/include -I/usr/include/OpenEXR -I/usr/include/freetype2  -march=native -O2 -pipe -ggdb2 -fno-nonansi-builtins -fuse-cxa-atexit -fPIC   -Wall -fno-math-errno -Wno-error=unused-local-typedefs -Wno-unused-local-typedefs -Wno-unused-result -Wno-error=misleading-indentation -Wno-aligned-new -Wno-error=noexcept-type -std=c++11 -msse2 -msse3 -mssse3 -
msse4.1 -msse4.2 -mavx -mavx2 -UUSE_FIELD3D -MD -MT src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o -MF src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o.d -o src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o -c /var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/o
iio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp
FAILED: src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o 
ccache /usr/bin/x86_64-pc-linux-gnu-g++ -DEMBED_PLUGINS=1 -DOpenImageIO_EXPORTS -DUSE_BOOST_ASIO=1 -DUSE_EXTERNAL_PUGIXML=1 -DUSE_FREETYPE -DUSE_JPEG_TURBO=1 -DUSE_OPENSSL=1 -DUSE_STD_REGEX -DUSE_WEBP=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/include
 -I/usr/include/OpenEXR -I/usr/include/freetype2  -march=native -O2 -pipe -ggdb2 -fno-nonansi-builtins -fuse-cxa-atexit -fPIC   -Wall -fno-math-errno -Wno-error=unused-local-typedefs -Wno-unused-local-typedefs -Wno-unused-result -Wno-error=misleading-indentation -Wno-aligned-new -Wno-error=noexcept-type -std=c++11 -msse2 -msse3 -mssse3 -msse4.1 -
msse4.2 -mavx -mavx2 -UUSE_FIELD3D -MD -MT src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o -MF src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o.d -o src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/dpx.imageio/dpxinput.cpp.o -c /var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Relea
se-1.8.17/src/dpx.imageio/dpxinput.cpp
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:91:38: error: ‘Imf’ has not been declared
   91 |     std::string get_timecode_string (Imf::TimeCode &tc);
      |                                      ^~~
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:91:52: error: expected ‘,’ or ‘...’ before ‘&’ token
   91 |     std::string get_timecode_string (Imf::TimeCode &tc);
      |                                                    ^
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp: In member function ‘virtual bool OpenImageIO_v1_8::DPXInput::seek_subimage(int, int, OpenImageIO_v1_8::ImageSpec&)’:
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:491:9: error: ‘Imf’ has not been declared
  491 |         Imf::TimeCode tc(m_dpx.header.timeCode, m_dpx.header.userBits);
      |         ^~~
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:492:63: error: ‘tc’ was not declared in this scope; did you mean ‘tm’?
  492 |         m_spec.attribute ("dpx:TimeCode", get_timecode_string(tc));
      |                                                               ^~
      |                                                               tm
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp: At global scope:
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:797:1: error: ‘std::string OpenImageIO_v1_8::DPXInput::get_timecode_string’ is not a static data member of ‘class OpenImageIO_v1_8::DPXInput’
  797 | DPXInput::get_timecode_string (Imf::TimeCode &tc)
      | ^~~~~~~~
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:797:32: error: ‘Imf’ has not been declared
  797 | DPXInput::get_timecode_string (Imf::TimeCode &tc)
      |                                ^~~
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:797:47: error: ‘tc’ was not declared in this scope; did you mean ‘tm’?
  797 | DPXInput::get_timecode_string (Imf::TimeCode &tc)
      |                                               ^~
      |                                               tm
/var/tmp/portage/media-libs/openimageio-1.8.17-r2/work/oiio-Release-1.8.17/src/dpx.imageio/dpxinput.cpp:798:1: error: expected ‘,’ or ‘;’ before ‘{’ token
  798 | {
      | ^
Comment 1 Rémi Cardona gentoo-dev 2020-06-28 09:28:46 UTC
Got build errors in vigra because of this, working on a PR. Anyone minds if I push this once I got it working?

Thanks
Comment 2 Larry the Git Cow gentoo-dev 2020-07-02 06:03:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2fb5c7d2eb5ec24b001e5ff04891750695f323f

commit f2fb5c7d2eb5ec24b001e5ff04891750695f323f
Author:     Rémi Cardona <remi@gentoo.org>
AuthorDate: 2020-06-28 10:21:17 +0000
Commit:     Rémi Cardona <remi@gentoo.org>
CommitDate: 2020-07-02 06:02:01 +0000

    media-libs/openexr: fix bashisms in configure script
    
    Bug: https://bugs.gentoo.org/724092
    Package-Manager: Portage-2.3.102, Repoman-2.3.23
    Signed-off-by: Rémi Cardona <remi@gentoo.org>

 .../openexr/files/openexr-2.3.0-fix-bashisms.patch | 117 +++++++++++++++++++++
 media-libs/openexr/openexr-2.3.0.ebuild            |   1 +
 2 files changed, 118 insertions(+)
Comment 3 Andreas Sturmlechner gentoo-dev 2020-07-21 19:48:52 UTC
Thanks for fixing it, please note that >=2.5.2 is cmake based.