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

Add "lib" to the Windows curl search path. #96

Merged
merged 1 commit into from
May 3, 2024

Conversation

clalancette
Copy link
Contributor

In CMake 3.3, a commit made it so that the find_package module in CMake had a compatibility mode where it would automatically search for packages in a /lib subdirectory. In CMake 3.6, this compatibility mode was reverted for all platforms except Windows.

That means that since CMake 3.3, we haven't actually been using the path as specified in curl_DIR, but we have instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for Windows, meaning that we are now failing to find_package(curl) in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should have been there. I'll note that this only affects our Windows builds, because this code is in a if(WIN32) block.


The commit to CMake that caused this is Kitware/CMake@0a81110

I'll note that this one is kind of hard to test; just running CI on this won't show us succeeding before and after. I will say that in local testing, where I've upgraded my CMake to 3.29.2 on Windows, this fixes the issue for me. And of course I'll run CI on it just to make sure there are no ill effects on earlier CMake versions.

In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Contributor Author

By the way: huge thanks to @azeey for realizing what the actual problem here is; I'm just making the pull requests.

@clalancette
Copy link
Contributor Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor Author

@Mergifyio backport jazzy iron humble

Copy link

mergify bot commented May 3, 2024

backport jazzy iron humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request May 3, 2024
In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit 1839d58)
@clalancette clalancette mentioned this pull request May 3, 2024
mergify bot pushed a commit that referenced this pull request May 3, 2024
In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit 1839d58)
mergify bot pushed a commit that referenced this pull request May 3, 2024
In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit 1839d58)
clalancette added a commit that referenced this pull request May 6, 2024
In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit 1839d58)

Co-authored-by: Chris Lalancette <clalancette@gmail.com>
clalancette added a commit that referenced this pull request May 6, 2024
In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit 1839d58)

Co-authored-by: Chris Lalancette <clalancette@gmail.com>
clalancette added a commit that referenced this pull request May 6, 2024
In CMake 3.3, a commit made it so that the find_package
module in CMake had a compatibility mode where it would
automatically search for packages in a <prefix>/lib subdirectory.
In CMake 3.6, this compatibility mode was reverted for all
platforms *except* Windows.

That means that since CMake 3.3, we haven't actually been
using the path as specified in `curl_DIR`, but we have
instead been inadvertently relying on that fallback behavior.

In CMake 3.28, that compatibilty mode was also removed for
Windows, meaning that we are now failing to find_package(curl)
in downstream packages (like resource_retriever).

Fix this by adding in the "lib" directory that always should
have been there.  I'll note that this *only* affects our
Windows builds, because this code is in a if(WIN32) block.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
(cherry picked from commit 1839d58)

Co-authored-by: Chris Lalancette <clalancette@gmail.com>
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.

Error while building for Windows - curl configuration not found
3 participants