Summary: | media-libs/osl-1.9.9 and 1.9.11 with media-libs/openexr-2.3.0 - CMake Error at src/cmake/modules/FindOpenEXR.cmake:59 (string): string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to command. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Helmut Jarausch <jarausch> |
Component: | Current packages | Assignee: | Adrian <agrigo2001> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ago, agrigo2001, darkdexter, dracwyrm, grosgood, O01eg, proxy-maint, waebbl-gentoo |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/12074 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
patch for FindOpenEXR.cmake emerge-info.txt |
FindOpenEXR.cmake is broken: # Try to figure out version number if (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h") # Must be at least 2.0 file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_STRING .*$") string (REGEX MATCHALL "[0-9]+[.0-9]+" OPENEXR_VERSION ${TMP}) file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_MAJOR .*$") string (REGEX MATCHALL "[0-9]+" OPENEXR_VERSION_MAJOR ${TMP}) file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_MINOR .*$") string (REGEX MATCHALL "[0-9]+" OPENEXR_VERSION_MINOR ${TMP}) This cannot work with openexr-2.3.0 which installs /usr/include/OpenEXR/OpenEXRConfig.h which is only a wrapper - in my case (x86_64) to /usr/include/x86_64-pc-linux-gnu/OpenEXR/OpenEXRConfig.h Therefore the 'file' command above finds noting => ${TMP} is empty ! Furthermore /usr/include/x86_64-pc-linux-gnu/OpenEXR/OpenEXRConfig.h doesn't contain #define OPENEXR_VERSION_STRING but #define OPENEXR_PACKAGE_STRING "OpenEXR 2.3.0" Appears related to bug 668444 and bug 668466 logged for media-libs/openimageio-1.8.13 in that both this and openimageio projects appear to use similar (identical? haven't diffed...) FindOpenEXR.cmake files. I used the patch proposed by Attila Toth in bug 668466 comment 14 on this project as well; it successfully patched the FindOpenEXR.cmake file, configuration succeeded and media-libs/osl could be built and installed. The patch (and the circumstances arising from it) prevail when media-libs/openexr-2.3.0 is installed. See Attila Toth's bug 668444 comment 12. Forgive my typo in Comment 2. Should read: > patch proposed by Attila Toth in bug 668444 comment 14. Apologies. Created attachment 553504 [details, diff]
patch for FindOpenEXR.cmake
(In reply to Garry R. Osgood from comment #3) > Forgive my typo in Comment 2. Should read: > > > patch proposed by Attila Toth in bug 668444 comment 14. > > Apologies. Many thanks for this hint. With a tiny modification this works - see my patch. That's caused by the multilib wrapped header file. They were already in the ebuild when I picked them up for finishing them. On x86 arch the files for abi_x86_64 and abi_x86_32 are identical, so the wrapping might not be needed at all. But I don't have any other arch available to test for the wrapping. @Jonathan: What do you think, whether we need these multilib wrapped header file for openexr? I can confirm this bug and that "patch_for_FindOpenEXR.cmake" is working. Thank you Confirmed problem and resolution. All was fine before I installed wine and required mutlilib USE flags x86_32 patched the FindOpenEXR.cmake and it worked. Issue also present 1.8.xx Looking for a multilib friendly patch for this, I found it fails to compile against llvm-7 as well: [ 32%] oslc /var/tmp/portage/media-libs/osl-1.9.9/work/osl-1.9.9_build/src/shaders/MaterialX/mx_blur_color2.osl cd /var/tmp/portage/media-libs/osl-1.9.9/work/osl-1.9.9_build/src/shaders/MaterialX && python /var/tmp/portage/media-libs/osl-1.9.9/ work/OpenShadingLanguage-Release-1.9.9/src/shaders/MaterialX/build_materialX_osl.py -s mx_blur -t color2 -mx /var/tmp/portage/media- libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/shaders/MaterialX -o /var/tmp/portage/media-libs/osl-1.9.9/work/osl-1.9.9_ build/src/shaders/MaterialX cd /var/tmp/portage/media-libs/osl-1.9.9/work/osl-1.9.9_build/src/shaders/MaterialX && /var/tmp/portage/media-libs/osl-1.9.9/work/os l-1.9.9_build/src/oslc/oslc -q -I/var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/shaders/MaterialX -I/var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/shaders/MaterialX -I/var/tmp/portage/media-libs/o sl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/shaders -I/var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release -1.9.9/src/shaders /var/tmp/portage/media-libs/osl-1.9.9/work/osl-1.9.9_build/src/shaders/MaterialX/mx_blur_color2.osl -o /var/tmp/p ortage/media-libs/osl-1.9.9/work/osl-1.9.9_build/src/shaders/MaterialX/mx_blur_color2.oso /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp: In member function ‘void OSL_v1_9::pvt::LLVM_Util::setup_optimization_passes(int)’: /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp:708:24: error: ‘createInst ructionCombiningPass’ is not a member of ‘llvm’ mpm.add (llvm::createInstructionCombiningPass()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 33%] oslc /var/tmp/portage/media-libs/osl-1.9.9/work/osl-1.9.9_build/src/shaders/MaterialX/mx_blur_color4.osl /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp:708:24: note: suggested al ternative: ‘createFunctionInliningPass’ mpm.add (llvm::createInstructionCombiningPass()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ createFunctionInliningPass /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp:726:24: error: ‘createPromoteMemoryToRegisterPass’ is not a member of ‘llvm’ mpm.add (llvm::createPromoteMemoryToRegisterPass()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp:726:24: note: suggested alternative: ‘createLowerTypeTestsPass’ mpm.add (llvm::createPromoteMemoryToRegisterPass()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ createLowerTypeTestsPass and /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp: In member function ‘void OSL_v1_9::pvt::LLVM_Util::write_bitcode_file(const char*, std::__cxx11::string*)’: /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp:1684:37: error: invalid initialization of reference of type ‘const llvm::Module&’ from expression of type ‘llvm::Module*’ llvm::WriteBitcodeToFile (module(), out); ~~~~~~^~ In file included from /var/tmp/portage/media-libs/osl-1.9.9/work/OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp:63: /usr/lib64/llvm/7/include/llvm/Bitcode/BitcodeWriter.h:129:8: note: in passing argument 1 of ‘void llvm::WriteBitcodeToFile(const llvm::Module&, llvm::raw_ostream&, bool, const llvm::ModuleSummaryIndex*, bool, llvm::ModuleHash*)’ void WriteBitcodeToFile(const Module &M, raw_ostream &Out, ^~~~~~~~~~~~~~~~~~ Created attachment 577288 [details]
emerge-info.txt
output of emerge --info =media-libs/osl-1.9.9::gentoo-git
Additionally, version 1.9.9 seems to be outdated. Checking the imageworks github page, I noticed version 1.10.5 has been released earlier this month. Looking closer at the released version on https://github.com/imageworks/OpenShadingLanguage/releases?after=Release-1.9.12 they have versions 1.9.11 and 1.9.10, but no 1.9.9. I would vote for removing this release from the tree. I was able to compile and install the 1.10.5 version, fixing this issue and I'm going to prepare a PR for it. Comment #9 seems to be a duplicate of bug #666698 *** Bug 713990 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=644803619331091d1288fb46d35d86eb25834ca8 commit 644803619331091d1288fb46d35d86eb25834ca8 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-03-22 18:22:02 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-03-22 18:24:00 +0000 media-libs/osl: Drop 1.8.12, 1.9.6 and 1.9.9 Closes: https://bugs.gentoo.org/666698 Closes: https://bugs.gentoo.org/669508 Closes: https://bugs.gentoo.org/673440 Package-Manager: Portage-2.3.94, Repoman-2.3.21 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> media-libs/osl/Manifest | 3 - media-libs/osl/files/osl-1.8.12-cmake-fixes.patch | 332 ---------------------- media-libs/osl/osl-1.8.12.ebuild | 70 ----- media-libs/osl/osl-1.9.6.ebuild | 69 ----- media-libs/osl/osl-1.9.9.ebuild | 68 ----- 5 files changed, 542 deletions(-) |
Created attachment 552702 [details] build log Building osl (1.9.9 or the recent 1.9.11) fails with openexr-2.3.0 installed with CMake Error at src/cmake/modules/FindOpenEXR.cmake:59 (string): string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to command. Call Stack (most recent call first): src/cmake/externalpackages.cmake:34 (find_package) CMakeLists.txt:123 (include) What am I missing?