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

APPLE: Fix OpenImageIO and OpenEXR debug libraries not found #2079

Conversation

slingthor
Copy link
Contributor

Description of Change(s)

Modify build script to indicate to CMAKE we are building a debug build
If we are doing a debug build and we are doing a Mac build, append a postfix to correctly find the debug library files.

Fixes Issue(s)

Debug OpenImageIO / OpenEXR builds cannot be made on Apple platforms

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@slingthor slingthor force-pushed the thor/dev/oiio_openexr_debug_mac branch from 993b040 to 8a5b901 Compare November 2, 2022 10:54
@slingthor
Copy link
Contributor Author

Attempted to re-trigger the tests (initial run was a fault on my part), but after re-triggering they seem to be failing on startup. Is there any way to retry this?

@meshula
Copy link
Member

meshula commented Nov 3, 2022

@slingthor I gave it a kick

@sunyab
Copy link
Contributor

sunyab commented Nov 4, 2022

Filed as internal issue #USD-7742

Comment on lines +71 to +76
set(DEBUG_POSTFIX )
if(DEFINED PXR_USE_DEBUG_BUILD)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${PXR_USE_DEBUG_BUILD} MATCHES ON)
set(DEBUG_POSTFIX _d)
endif()
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are building a full debug and also building OpenEXR (and Alembic) statically. Locally I've added extra NAMES lines for debug and static. But I like your approach. When building OpenExr statically the libs are appended with "_s" and "_s_d". Could that be added here as well?

@meshula
Copy link
Member

meshula commented Feb 2, 2023

Per this issue #2231 the problem may extend into OpenVdb as well, in terms of needing to patch the OpenVdb find script, and also checking with the OpenVdb project to discover if the problem is fixed in a later revision.

@meshula
Copy link
Member

meshula commented Feb 8, 2023

Please note @Ben1138's feedback from #2231, quoted below. This patch is necessary for Windows, and probably Linux as well for debug builds.

Patching FindOpenEXR.cmake and build_usd.py as described in PR #2079 solved the issue of USD not finding OpenEXR. About OpenVDB, I just left it out (--no-openvdb). Now I got a successfull debug build!

When I patched FindOpenEXR.cmake I left out the if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" part, since I'm on Windows.
I didn't patch FindOpenImageIO.cmake though, since it built fine for me.

@slingthor slingthor closed this Nov 6, 2023
pixar-oss added a commit that referenced this pull request Jan 6, 2024
APPLE: Fix OpenImageIO and OpenEXR debug libraries not found

(Internal change: 2309779)
(Internal change: 2309783)
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.

4 participants