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: Remove multiple instances of ZLIB #3551

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

dgovil
Copy link
Collaborator

@dgovil dgovil commented Feb 27, 2025

Description of Change(s)

Due to a prior change in OpenUSD, ZLIB was moved to a conditional dependency, and then removed from the list if run on Linux or macOS

Unfortunately, the removal only removes the first found instance of ZLib, so doesn't remove it if multiple dependencies ask for it.

A future clang version also has issues with the ZLib version used here so this would be needed to pass builds soon. However, since clang is used primarily on Linux and Mac, it is preferred to just use the OS provided version of Zlib.

Checklist

Due to a prior change in OpenUSD, ZLIB was moved to a conditional dependency, and then removed from the list if run on Linux or macOS

Unfortunately, the removal only removes the first found instance of ZLib, so doesn't remove it if multiple dependencies ask for it.

A future clang version also has issues with the ZLib version used here so this would be needed to pass builds soon. However, since clang is used primarily on Linux and Mac, it is preferred to just use the OS provided version of Zlib.
@@ -2514,7 +2514,7 @@ def ForceBuildDependency(self, dep):
# itself does not require it. The --no-zlib flag can be passed to the build
# script to allow the dependency to find zlib in the build environment.
if (Linux() or not context.buildZlib) and ZLIB in requiredDependencies:
requiredDependencies.remove(ZLIB)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think requiredDependencies could be a set to avoid this issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we rely on requiredDependencies being ordered to ensure we build dependencies before their dependents.

Copy link
Collaborator Author

@dgovil dgovil Feb 27, 2025

Choose a reason for hiding this comment

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

Unfortunately, not. It needs to preserve ordering and afaik that's still not guaranteed for a set in Python.
Edit: replied at the same time as Sunya

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense.

@nvmkuruc nvmkuruc added the build Build-related issue/PR label Feb 27, 2025
@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10713

(This is an automated message. See here for more information.)

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build-related issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants