Host Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install openimageio[libraw] --triplet x64-windows
Failure logs
[3/142] C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1423~1.281\bin\Hostx64\x64\cl.exe /TP -DBOOST_ALL_DYN_LINK -DJAS_WIN_MSVC_BUILD -DOPENEXR_DLL -DOpenImageIO_Util_EXPORTS -DUSE_STD_REGEX -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -Iinclude -ID:\code\github\vcpkg\buildtrees\openimageio\src\1f1a9e36cd-295603f4f0\src\include -ID:\code\github\vcpkg\installed\x64-windows\include\OpenEXR -ID:\code\github\vcpkg\installed\x64-windows\include /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /W1 -UUSE_FIELD3D /showIncludes /Fosrc\libutil\CMakeFiles\OpenImageIO_Util.dir\hashes.cpp.obj /Fdsrc\libutil\CMakeFiles\OpenImageIO_Util.dir\ /FS -c D:\code\github\vcpkg\buildtrees\openimageio\src\1f1a9e36cd-295603f4f0\src\libutil\hashes.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9025 : overriding '/W3' with '/W1'
cl : Command line warning D9025 : overriding '/W3' with '/W1'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\memory(1766): error C2027: use of undefined type 'OpenImageIO_v2_1::ImageBufImpl'
D:\code\github\vcpkg\buildtrees\openimageio\src\1f1a9e36cd-295603f4f0\src\include\OpenImageIO/imagebuf.h(49): note: see declaration of 'OpenImageIO_v2_1::ImageBufImpl'
Same error with latest oiio : bd87d901218a86fa560dde752f141d30b62f55c4
Fixed locally by adding this to my triplet:
set(VCPKG_PLATFORM_TOOLSET v140)
So this must be an incompatibility with VS 2019 default toolset.
It built with vs2019 16.2.4 but when I updated to 16.3.1 I also got this error
I reported this as a bug at: https://developercommunity.visualstudio.com/content/problem/749973/vcpkgopenimageio-use-of-undefined-type-after-upgra.html
Although most compilers can handle this code, this doesn't mean I think it's a bug. If it's bug, they'll fix it. If not, they'll explain why and I have a reason to ask to change the code upstream. Interpreting the c++ standard is a bit above my pay grade.
Hi,
I'm an absolute beginner on the issue of compiling. I'm sorry this is off-topic but I don't know where else I could post my question...
I need to build openimageio with python 2.7 bindings for Windows x64.
After some research I found the vcpkg tool. I installed it, intalled VS 2017 and I did :
vcpkg install openimageio:x64-windows.
This completed successfully, but what do I need to do know ? I was expecting that vcpkg would create a directory containing the dll's and the exe's of openimageio (like oiiotool.exe) but I don't find those.
Any help would be greatly appreciated.
There is merged PR in openimageio official for this issue: https://github.com/OpenImageIO/oiio/pull/2350
Hi, I'm the lead author of OpenImageIO.
I have a fix for this already committed in OIIO's master branch, but I believe that the fix can't be backported to 2.0 because it will break ABI compatibility.
In the next couple months, we expect to release OIIO 2.1 as the supported release going forward, which will have the fix. In the mean time, is it reasonable to just use the older compiler compatibility flag for OIIO 2.0 for vcpkg?
I have the same error with VS2019 v16.3.5 toolset vc142 ... guess I'll wait until the new port is released. The VS2017 v15.9.17 is compiles and links properly, using that for an interim.
@Igritz Don't worry about backporting.
If it's time critical we can just pick any point in your git history (using git refs) and use that. The "scripting" clones the repo, checkout the specified point and tries to compile it.
I was wondering because 2.1 is some time away that maybe you could implement setting the python version using a cmake variable instead of using environment variables? Or maybe a mix, if it's not set in a cmake variable then it looks for the environment variable. This is to accommodate @dovanbel.
I did some quick and dirty tests and we could from our end easily build the python interface to OIIO.
Hi,
I managed to build OIIO with vcpkg using the v140 toolset. I had to modify the vcpkg port file, which took me quite a bit of time, but that's because I'm a complete beginner when it concerns compiling.
Regards
@justnope I'm not sure what you mean. There already is a PYTHON_VERSION cmake cache variable that ultimately controls it. But an environment variable called OIIO_PYTHON_VERSION, if set, overrides its default value.
Hey folks,
just stumbled into the same problem.
@lgritz Don't worry about backporting.
Can anybody describe how to set the triplet for this package to the v141 or v140 toolset? While I found some documents describing what the triplets are, none really showed how to configure it.
Where you installed vcpkg you have a subdirectory called triplets.
In that folder/directory you have files called "x64-windows.cmake", "x86-windows.cmake", "x64-windows-clang.cmake", etc..
Add an extra line to the triplet you're currently using. The variable is called "VCPKG_PLATFORM_TOOLSET". So in your case you need to add
set(VCPKG_PLATFORM_TOOLSET v141) to the triplet file you're using.
This is written from memory so I could be wrong in some details. The docs are at https://vcpkg.readthedocs.io/en/latest/users/triplets/
@edanvoye Thanks for posting this issue. Does the issue still occur? I installed it successfully with Visual Studio 2019 and VCPKG latest source.
Thanks for posting this issue. Please reopen this issue if this is still a problem for you.