Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openimageio] /utf-8 is required on Windows, but not supplied by the cmake target #41405

Closed
LegalizeAdulthood opened this issue Oct 7, 2024 · 5 comments · Fixed by #41429
Closed
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@LegalizeAdulthood
Copy link

Is your feature request related to a problem? Please describe.

If you include <openimageio.h> on Windows you get the following compilation error:

1>D:\legalize\utahcpp\openimageio\build-oiio-example-default\vcpkg_installed\x64-windows\include\OpenImageIO\detail\fmt\base.h(458,28): error C2338: static_assert failed: 'Unicode support requires compiling with /utf-8'

This is because openimageio depends on libfmt v11 which requires this. However, the OpenImageIO::OpenImageIO target doesn't add this as a PUBLIC compile option for this target, so the required switch is not propagated to clients of the OpenImageIO target.

Proposed solution

Add the necessary compile option on Windows

Describe alternatives you've considered

There really isn't one as it prevents any portion of the library from being used.

Additional context

See attached ZIP of source code that reproduces the problem.
oiio-utf8.zip

@LegalizeAdulthood LegalizeAdulthood added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Oct 7, 2024
@autoantwort
Copy link
Contributor

I guess this is a bug of openimageio and not vcpkg and should be reported there :)

@LegalizeAdulthood
Copy link
Author

OK, so the CMake targets don't come from the port?

@autoantwort
Copy link
Contributor

Yes, normally the cmake config files are generated by the upstream project. Sometimes they are patched in by vcpkg, but then they starts with unofficial::.

@dg0yt
Copy link
Contributor

dg0yt commented Oct 8, 2024

And still, it might be a port bug. At least I don't see the port disabling INTERNALIZE_FMT. This results in openimageio target not linking the fmt target, and this results in the public compile options not being forwarded.

@dg0yt
Copy link
Contributor

dg0yt commented Oct 8, 2024

Please test #41429, I don't have MSVC. (But I checked the generated config.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants