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

[OSG] new attempt to preserve ARGS #27967

Closed
wants to merge 1 commit into from

Conversation

JavierMatosD
Copy link
Contributor

Attempts to fix osg build fail on https://dev.azure.com/vcpkg/public/_build/results?buildId=81160&view=results.

Issue: find_package(${ARGS}) fails because ARGS is empty.
Stacking find_package calls within the macro results in ARGS being unset.

Tagging @Neumann-A for review to ensure this still fixes #27498 and #19030

@JavierMatosD JavierMatosD marked this pull request as ready for review November 22, 2022 23:20
@JavierMatosD JavierMatosD marked this pull request as draft November 22, 2022 23:29
if(DEFINED ARGS)
set(z_vcpkg_find_package_${z_vcpkg_find_package_backup_id}_backup_ARGS "${ARGS}")
set(z_vcpkg_find_package_${z_vcpkg_find_package_package_name}_backup_ARGS "${ARGS}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't use package_name due to nesting of calls to the same package. E.g. different parts of a nested calls looking up something very common like zlib on different levels. Having a unique id is the only save way to avoid overwriting previous values.

Copy link
Contributor

@ras0219-msft ras0219-msft Nov 22, 2022

Choose a reason for hiding this comment

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

nesting of calls to the same package. E.g. different parts of a nested calls looking up something very common like zlib on different levels

But this would require ZLIB to cyclically request ZLIB again, right? Not just A -> B -> ZLIB + A -> C -> ZLIB.

Though now that you mention it, ZLIB (MODULE) could chain-find ZLIB (CONFIG), so we would need to distinguish those cases :(

Copy link
Contributor

Choose a reason for hiding this comment

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

find_package(ZLIB NO_DEFAULT_PATH PATHS <somecustompath>) [<- custom module or config] which then calls the original find_package(ZLIB).

Copy link
Contributor

Choose a reason for hiding this comment

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

FTR the CURL find module calls CURL config.

@Neumann-A
Copy link
Contributor

consider waiting if the issue is still present with #27939 merged.
if it is: Please get a --trace-expand log of the failure before taking further action

@MonicaLiu0311 MonicaLiu0311 added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Nov 23, 2022
@Neumann-A
Copy link
Contributor

Neumann-A commented Nov 23, 2022

If #27971 builds qtmultimedia:x64-windows-static successfully the problem is already solved.

It already build osg:x64-window-static successfully so I assume the problem was solved by #27939

@JavierMatosD JavierMatosD deleted the osg_build_fail branch October 31, 2023 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vcpkg.cmake] Variable scoping bug in vcpkg.cmake find_package override
5 participants