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

[ceres + downstreams] Update to ceres to 2.2.0 #42475

Draft
wants to merge 70 commits into
base: master
Choose a base branch
from

Conversation

ahojnnes
Copy link
Contributor

@ahojnnes ahojnnes commented Dec 2, 2024

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@ahojnnes
Copy link
Contributor Author

ahojnnes commented Dec 2, 2024

@microsoft-github-policy-service agree

@ahojnnes
Copy link
Contributor Author

ahojnnes commented Dec 2, 2024

Build failures appear to be unrelated to this change? vtk[core]:x64-windows seems to not exist?

@BillyONeal
Copy link
Member

BillyONeal commented Dec 3, 2024

Build failures appear to be unrelated to this change? vtk[core]:x64-windows seems to not exist?

They look legitimate to me? A couple of examples:

Direct failures:

REGRESSION: ceres:x86-windows failed with BUILD_FAILED. If expected, add ceres:x86-windows=fail to D:\a\_work\1\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: ceres:x64-windows failed with BUILD_FAILED. If expected, add ceres:x64-windows=fail to D:\a\_work\1\s\scripts\azure-pipelines/../ci.baseline.txt.

Indirect failures, for instance:

REGRESSION: cartographer:arm64-osx failed with BUILD_FAILED. If expected, add cartographer:arm64-osx=fail to /Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt.
REGRESSION: openturns:arm64-osx failed with BUILD_FAILED. If expected, add openturns:arm64-osx=fail to /Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt.
REGRESSION: openmvg:arm64-osx failed with BUILD_FAILED. If expected, add openmvg:arm64-osx=fail to /Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt.
REGRESSION: vcpkg-ci-itk:arm64-osx cascaded, but it is required to pass. (/Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt).
REGRESSION: vcpkg-ci-paraview:arm64-osx cascaded, but it is required to pass. (/Users/vcpkg/Data/work/1/s/scripts/azure-pipelines/../ci.baseline.txt).

are downstream broken components:

PS D:\vcpkg> .\vcpkg.exe depend-info cartographer 2>&1 | findstr ceres
ceres[lapack, suitesparse]: eigen3, glog, lapack, suitesparse, vcpkg-cmake, vcpkg-cmake-config
cartographer: boost-iostreams, cairo, ceres, gflags, glog, gtest, lua, protobuf, vcpkg-cmake, vcpkg-cmake-config
PS D:\vcpkg> .\vcpkg.exe depend-info openturns 2>&1 | findstr ceres   
ceres: eigen3, glog, vcpkg-cmake, vcpkg-cmake-config
openturns: blas, boost-multiprecision, boost-random, ceres, cminpack, dlib, exprtk, hdf5, lapack, libxml2, mpc, mpfr, muparser, nlopt, pagmo2, pthread, python3, spectra, tbb, vcpkg-cmake, vcpkg-cmake-config
PS D:\vcpkg> .\vcpkg.exe depend-info openmvg 2>&1 | findstr ceres     
ceres[cxsparse, lapack, suitesparse]: eigen3, glog, lapack, suitesparse, vcpkg-cmake, vcpkg-cmake-config
openmvg: cereal, ceres, coin-or-clp, coin-or-osi, coinutils, eigen3, flann, libjpeg-turbo, liblemon, libpng, tiff, vcpkg-cmake, vcpkg-cmake-config, vlfeat, zlib
PS D:\vcpkg> 

@BillyONeal BillyONeal marked this pull request as draft December 3, 2024 00:49
@JonLiu1993 JonLiu1993 added the category:port-update The issue is with a library, which is requesting update new revision label Dec 3, 2024
versions/o-/openmvg.json Outdated Show resolved Hide resolved
@JonLiu1993
Copy link
Member

Whene I tested the usage of cartographer, I get thie error, please take a look:
CMakeLists.txt:

cmake_minimum_required(VERSION 3.5)

project(test)

find_package(cartographer CONFIG REQUIRED)

add_executable(test CMakeProject1.cpp)

target_link_libraries(test PRIVATE cartographer)

Cofig:

1> CMake generation started for default configuration: 'x64-Debug'.
1> Found and using vcpkg toolchain file (F:/Feature-test/ceres/scripts/buildsystems/vcpkg.cmake).
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject1\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe"   -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" -DCMAKE_TOOLCHAIN_FILE="F:/Feature-test/ceres/scripts/buildsystems/vcpkg.cmake" "C:\Users\test\source\repos\CMakeProject1" 2>&1"
1> Working directory: C:\Users\test\source\repos\CMakeProject1\out\build\x64-Debug
1> [CMake] -- The C compiler identification is MSVC 19.41.34123.0
1> [CMake] -- The CXX compiler identification is MSVC 19.41.34123.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Looking for sgemm_
1> [CMake] -- Looking for sgemm_ - found
1> [CMake] -- Found BLAS: F:/Feature-test/ceres/installed/x64-windows/debug/lib/openblas.lib
1> [CMake] -- Using VCPKG FindLAPACK from package 'lapack-reference'
1> [CMake] -- Looking for cheev_
1> [CMake] -- Looking for cheev_ - found
1> [CMake] -- A library with LAPACK API found.
1> [CMake] -- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.5/include (found suitable version "12.5.40", minimum required is "12.5.40")
1> [CMake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
1> [CMake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
1> [CMake] -- Looking for pthread_create in pthreads
1> [CMake] -- Looking for pthread_create in pthreads - not found
1> [CMake] -- Looking for pthread_create in pthread
1> [CMake] -- Looking for pthread_create in pthread - not found
1> [CMake] -- Found Threads: TRUE
1> [CMake] -- Found required Ceres dependency: Eigen version 3.4.0 in F:/Feature-test/ceres/installed/x64-windows/share/eigen3
1> [CMake] -- Found Ceres version: 2.2.0 installed in: F:/Feature-test/ceres/installed with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
1> [CMake] -- Configuring done (15.8s)
1> [CMake] CMake Error at F:/Feature-test/ceres/installed/x64-windows/share/cartographer/CartographerTargets.cmake:61 (set_target_properties):
1> [CMake]   The link interface of target "cartographer" contains:
1> [CMake] 
1> [CMake]     Boost::iostreams
1> [CMake] 
1> [CMake]   but the target was not found.  Possible reasons include:
1> [CMake] 
1> [CMake]     * There is a typo in the target name.
1> [CMake]     * A find_package call is missing for an IMPORTED target.
1> [CMake]     * An ALIAS target is missing.
1> [CMake] 
1> [CMake] Call Stack (most recent call first):
1> [CMake]   F:/Feature-test/ceres/installed/x64-windows/share/cartographer/cartographer-config.cmake:72 (include)
1> [CMake]   F:/Feature-test/ceres/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
1> [CMake]   CMakeProject1/CMakeLists.txt:7 (find_package)
1> [CMake] -- Generating done (0.0s)
1> [CMake] CMake Generate step failed.  Build files cannot be regenerated correctly.
1> 'C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject1\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe"   -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" -DCMAKE_TOOLCHAIN_FILE="F:/Feature-test/ceres/scripts/buildsystems/vcpkg.cmake" "C:\Users\test\source\repos\CMakeProject1" 2>&1"' execution failed with error: ''C:\WINDOWS\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject1\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe"   -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" -DCMAKE_TOOLCHAIN_FILE="F:/Feature-test/ceres/scripts/buildsystems/vcpkg.cmake" "C:\Users\test\source\repos\CMakeProject1" 2>&1"' returned with exit code: 1'.

@ahojnnes
Copy link
Contributor Author

@JonLiu1993 Thanks for finding the issue. This should also be fixed now.

@BillyONeal
Copy link
Member

The patches look bigger than they are. They are mostly the same but with the following changes: (1) Some of the patches were combined into a single logical patch instead of applying a chain of patches on top of the same files (which becomes very hard to maintain).

What matters is the total size of the patches, not how many files it's split into; I agree separating them would be bad.

However, theia and cartographer are both unmaintained codebases.

Hmmmm.... they also have very high port-versions suggesting that they are painful. Perhaps we should deindex them.

@BillyONeal BillyONeal added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Dec 10, 2024
@ahojnnes
Copy link
Contributor Author

The patches look bigger than they are. They are mostly the same but with the following changes: (1) Some of the patches were combined into a single logical patch instead of applying a chain of patches on top of the same files (which becomes very hard to maintain).

What matters is the total size of the patches, not how many files it's split into; I agree separating them would be bad.

That's not what I meant to say. To clarify: what I meant is that I only added a relatively small delta of new changes to the existing patches. The main change I made was to reapply them to the updated underlying sources and combined them into fewer patch files. The only project with somewhat significant changes is rtabmap, for which I already upstreamed the changes in a PR. It will take time for these to be consumable here though. I would argue that, if we were fine accepting these patches in the past, then we should be fine again now. It would be unfortunate if we delay the update of ceres much longer. Many external projects rely on it and would greatly benefit from this update.

I still recommend decommissioning the theia and cartographer ports, given that the upstream projects are not maintained anymore.

@BillyONeal BillyONeal removed the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Dec 11, 2024
@BillyONeal
Copy link
Member

That's not what I meant to say. To clarify: what I meant is that I only added a relatively small delta of new changes to the existing patches.

I guess, what I mean is, I don't think we should have accepted a 1500 line patch in the first place. That's well outside of our normal patch guidelines, and it's unwarranted if there is no universe where upstream could someday accept it.

I still recommend decommissioning the theia and cartographer ports, given that the upstream projects are not maintained anymore.

Yes, those are the two in question here. @AugP @ras0219-msft @JavierMatosD @vicroms and I discussed today and agree these should be removed from the index. I'll push that into this PR shortly.

@BillyONeal
Copy link
Member

Whene I tested the usage of cartographer, I get thie error, please take a look:

I deindexed cartographer entirely and have an action item to update the maintainer guide about these cases where large patches are necessary to get unmaintained downstream dependents functional. Do you have other concerns here @JonLiu1993 ?

@ahojnnes Are you happy with this 'the ports got deindexed' outcome?

@JonLiu1993
Copy link
Member

JonLiu1993 commented Dec 11, 2024

Tested usage successfully by ceres:x64-windows
All features of port ceres are tested successfully in the following triplet:

  • x86-windows
  • x64-windows
  • x64-windows-sttaic

ports/openmvg/portfile.cmake Outdated Show resolved Hide resolved
@ahojnnes
Copy link
Contributor Author

Whene I tested the usage of cartographer, I get thie error, please take a look:

I deindexed cartographer entirely and have an action item to update the maintainer guide about these cases where large patches are necessary to get unmaintained downstream dependents functional. Do you have other concerns here @JonLiu1993 ?

@ahojnnes Are you happy with this 'the ports got deindexed' outcome?

Thank you, sounds good to me!

@JonLiu1993
Copy link
Member

Looks there is a error in x64-linux, this is error log:
install-x64-linux-dbg-out.log

@ahojnnes
Copy link
Contributor Author

@JonLiu1993 Shouldn't have removed the openmvg:x64-linux from the ci exclusions :-) I'll see if I can fix it, but otherwise will revert back to the previous state and skip it.

@ahojnnes ahojnnes force-pushed the user/jsch/ceres-2.2.0 branch from f4e9c34 to 4301643 Compare December 11, 2024 16:20
@ahojnnes
Copy link
Contributor Author

@JonLiu1993 @BillyONeal All checks should be green now. Thank you for your reviews and support.

@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Dec 12, 2024
Copy link
Contributor

@JavierMatosD JavierMatosD left a comment

Choose a reason for hiding this comment

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

LGTM, please fix the file conflicts

# search should be for an exact match, but for usability reasons do a soft
# match and reject with an explanation below.
-find_package(Eigen3 ${CERES_EIGEN_VERSION} QUIET)
+find_package(Eigen3 CONFIG ${CERES_EIGEN_VERSION} QUIET)
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 calls should never be QUIET in vcpkg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you look at the next few lines in the original config file, you will find that it is not really quiet but it fails if the find_package call was unsuccessful. It has some custom logic that alters internal variables. I suggest keeping the patch minimal, as the behavior will be the same.

@JavierMatosD JavierMatosD marked this pull request as draft December 12, 2024 20:45
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:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants