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

Fix build issues on OSX #35

Merged
merged 3 commits into from
Aug 17, 2019
Merged

Conversation

ShnitzelKiller
Copy link
Contributor

@ShnitzelKiller ShnitzelKiller commented Aug 14, 2019

This is in reference to the errors described in #32, which was caused by the wrong standard library being used and not found by the compiler, due to python being built with an earlier version of OS X before that library was deprecated. This works around that by changing the target platform in the event that this is the case.

@ShnitzelKiller
Copy link
Contributor Author

However, for some reason on OS X, OpenEXR's exceptions aren't detected as derived from std::exception and don't get caught by the corresponding try/catch statements. I don't know why this is.

@jamesbowman jamesbowman merged commit f2c098c into jamesbowman:master Aug 17, 2019
@meshula
Copy link

meshula commented Aug 17, 2019

FWIW, OpenEXR 2.3 no longer derives its exceptions from std::exception.

@ShnitzelKiller
Copy link
Contributor Author

Why would they do that exactly?

@meshula
Copy link

meshula commented Aug 18, 2019

It’s not a portable construction. On Windows, std::exception is not marked for symbol export, which means sub-classing exception and marking the subclass with __declspec export, will result in undefined behavior if static members are accessed.

@meshula
Copy link

meshula commented Aug 19, 2019

I’m sorry, I misspoke. Iex::BaseExc used to be multiply-derived from std::string, which introduced the problems because std::string is not marked for symbol export. It is of course still derived from std::exception. AcademySoftwareFoundation/openexr@fa59776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants