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

[geographiclib] Update to 1.50.1 #11687

Conversation

NancyLi1013
Copy link
Contributor

Update geographiclib to the latest version 1.50.1.

Other changes:

  • Update the patches
  • Update the usage file

Also fix the usage error like this:

CMake Error at F:/test/vcpkg/scripts/buildsystems/vcpkg.cmake:329 (_find_package):
1> [CMake]   Could not find a configuration file for package "geographiclib" that is
1> [CMake]   compatible with requested version "".
1> [CMake] 
1> [CMake]   The following configuration files were considered but not accepted:
1> [CMake] 
1> [CMake]     F:/test/vcpkg/installed/x64-windows/share/geographiclib/geographiclib-config.cmake, version: 1.47 (package = GeographicLib, NOT geographiclib)
1> [CMake] 
1> [CMake] Call Stack (most recent call first):
1> [CMake]   CMakeProject8/CMakeLists.txt:5 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!

Resolve #10293

Note: No feature need to test.

@NancyLi1013 NancyLi1013 added info:internal This PR or Issue was filed by the vcpkg team. category:port-update The issue is with a library, which is requesting update new revision labels Jun 1, 2020
@NancyLi1013
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NancyLi1013 NancyLi1013 marked this pull request as ready for review June 11, 2020 06:48
@NancyLi1013 NancyLi1013 requested a review from JackBoosY June 11, 2020 06:48
@@ -2,7 +2,6 @@ The package geographiclib:x64-linux provides CMake targets:

find_package(GeographicLib CONFIG REQUIRED)
#dynamic
target_link_libraries(main PRIVATE GeographicLib GeographicLib::GeographicLib)
target_link_libraries(main PRIVATE GeographicLib GeographicLib_SHARED GeographicLib::GeographicLib GeographicLib::GeographicLib_SHARED)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add vcpkg-cmake-wrapper to solve this?

@NancyLi1013 NancyLi1013 marked this pull request as draft June 11, 2020 07:46
@Mistrical
Copy link

Mistrical commented Jun 16, 2020

I downloaded this PR as a patch from https://github.com/microsoft/vcpkg/pull/11687.patch

I tried applying this patch to vcpkg:master at commit 7192d3a, but it failed to apply. See below:

$ git apply 11687.patch
11687.patch:46: trailing whitespace.
diff --git a/CMakeLists.txt b/CMakeLists.txt
11687.patch:47: trailing whitespace.
index 4a9ec4e..57bf448 100644
11687.patch:48: trailing whitespace.
--- a/CMakeLists.txt
11687.patch:49: trailing whitespace.
+++ b/CMakeLists.txt
11687.patch:50: trailing whitespace.
@@ -46,6 +46,7 @@ set (LIBVERSION_API 19)
error: patch failed: ports/geographiclib/CONTROL:1
error: ports/geographiclib/CONTROL: patch does not apply
error: patch failed: ports/geographiclib/portfile.cmake:45
error: ports/geographiclib/portfile.cmake: patch does not apply

Is the patch invalid or am I doing something wrong?

@NancyLi1013
Copy link
Contributor Author

@Mistrical
The error is like here:
11687.patch:46: trailing whitespace.
You might need to handle trailing whitespace issue.

@Mistrical
Copy link

@NancyLi1013 Is this PR likely to be finished/merged soon?

I'm happy to help with testing it, but I still can't seem to apply the patch to master at commit 70ab27f

@Septarius
Copy link
Contributor

@Mistrical Try git pull upstream pull/11687/head on the local branch you want to patch. It should work if you have your upstream remote set on your fork. There are conflicts that you can accept incoming on in: ports/geographiclib/CONTROL and ports/geographiclib/portfile.cmake

@JackBoosY
Copy link
Contributor

Please resolve the file conflicts.

NancyLi1013 added 3 commits July 8, 2020 19:01
…NancyLi10293/update-geographiclib

# Conflicts:
#	ports/geographiclib/CONTROL
#	ports/geographiclib/portfile.cmake
@NancyLi1013 NancyLi1013 marked this pull request as ready for review July 9, 2020 03:14
@cffk
Copy link
Contributor

cffk commented Jul 9, 2020

@NancyLi1013 Hi, I'm the author of geographiclib. I would be interested in hearing from you how I can simplify the deployment of a vcpkg for geographiclib. Perhaps a single flag in CMakeLists.txt? I also have some questions/comments about the patches:

  • I see that the tools are not being built. Perhaps they should be, but not installed? That way the tests could be enabled.

  • I've tried to make the version checking in project-config-cmake.cmake.in as robust as possible. Do you have any suggestions here?

@strega-nil strega-nil self-assigned this Jul 9, 2020
@NancyLi1013
Copy link
Contributor Author

NancyLi1013 commented Jul 10, 2020

Hi @cffk
Thanks a lot for coming here. It will be so great with your support and help.

It would be better to add the OPTIONS for these parts:

add_subdirectory (tools)
add_subdirectory (man)
add_subdirectory (doc)
add_subdirectory (js)
add_subdirectory (matlab)
add_subdirectory (python/geographiclib)
add_subdirectory (examples)

If so, we can disable the codes that we don't need to build via setting the value of options as off instead of making patches. Or we can add them as features for geographiclib.

I need to investigate why tools are disabled in current version since it was introduced by some older changes. I will try to build and install tools if there are no errors.

As for the usage, I just added this line:
set(PROJECT_NAME_LOWER ${PROJECT_NAME})

Since the package name seems to be updated from GeographicLib as geographiclib.

We should use find_package(GeographicLib CONFIG REQUIRED) instead of find_package(geographiclib CONFIG REQUIRED).

Thanks again for your support.

@NancyLi1013
Copy link
Contributor Author

When I try to use geographiclib in release type, it references to a debug file. Since I only copy tools from bin/ directory to tools/geographiclib directory.

CMake Error at F:/11687/vcpkg/installed/x64-windows/share/geographiclib/geographiclib-targets.cmake:118 (message):
1> [CMake]   The imported target "CartConvert" references the file
1> [CMake] 
1> [CMake]      "F:/11687/vcpkg/installed/x64-windows/tools/geographiclib/CartConvert_d.exe"
1> [CMake] 
1> [CMake]   but this file does not exist.  Possible reasons include:
1> [CMake] 
1> [CMake]   * The file was deleted, renamed, or moved to another location.
1> [CMake] 
1> [CMake]   * An install or uninstall procedure did not complete successfully.
1> [CMake] 
1> [CMake]   * The installation package was faulty and contained
1> [CMake] 
1> [CMake]      "F:/11687/vcpkg/installed/x64-windows/share/geographiclib/geographiclib-targets.cmake"
1> [CMake] 
1> [CMake]   but not all the files it references.

@cffk
Copy link
Contributor

cffk commented Jul 10, 2020

Let me try to get my arms around vcpkg and the changes that are being made to the build of GeographicLib. Then I will be able to offer some intelligent feedback. (A colleague at work was telling me about vcpkg since a year ago, but I haven't looked at it until now.) I hope to get back to you within a couple of weeks.

@strega-nil
Copy link
Contributor

@cffk if you have any questions about how this stuff works, we're available on discord, slack, and github issues 😄😄😄

@cffk
Copy link
Contributor

cffk commented Jul 11, 2020

OK, I've submitted an independent PR #12379. I've configured this from scratch and expect that the next release of GeographicLib will need a minimal patch to work with vcpkg. By the way, what's the recommended CMake variable, e.g., _VCPKG_ROOT to test for to see if a vcpkg port is being built.

@NancyLi1013
Copy link
Contributor Author

Closed this PR since @cffk has submitted another PR #12379 to update geographiclib .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[geographiclib] update to 1.50.1
7 participants