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

[rtabmap] update to 0.21.0 #30254

Merged
merged 29 commits into from
Apr 3, 2023
Merged

[rtabmap] update to 0.21.0 #30254

merged 29 commits into from
Apr 3, 2023

Conversation

matlabbe
Copy link
Contributor

@matlabbe matlabbe commented Mar 17, 2023

  • 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.

Fixes #30293

@matlabbe matlabbe marked this pull request as ready for review March 18, 2023 23:14
@matlabbe
Copy link
Contributor Author

I would need help from vcpkg maintainers, The CI is failing without any description of the error, and I cannot reproduce it on my computer. Here is the output on my side:

c:\vcpkg>vcpkg install rtabmap --triplet=x64-windows
Computing installation plan...
The following packages will be built and installed:
    rtabmap[core,gui,opencv-contrib,opencv-nonfree,tools]:x64-windows -> 0.21.0#4
Detecting compiler hash for triplet x64-windows...
Restored 0 package(s) from C:\Users\Mathieu\AppData\Local\vcpkg\archives in  334 us. Use --debug to see more details.
Installing 1/1 rtabmap:x64-windows...
Building rtabmap[core,gui,opencv-contrib,opencv-nonfree,tools]:x64-windows...
-- Using cached introlab-rtabmap-ab99719a78de5ffe6dd9f22576eed3f56a3aa731.tar.gz.
-- Cleaning sources at C:/vcpkg/buildtrees/rtabmap/src/f56a3aa731-0ec3dda1b9.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/vcpkg/downloads/introlab-rtabmap-ab99719a78de5ffe6dd9f22576eed3f56a3aa731.tar.gz
-- Applying patch qtdeploy.patch
-- Using source at C:/vcpkg/buildtrees/rtabmap/src/f56a3aa731-0ec3dda1b9.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows-dbg
-- Configuring x64-windows-rel
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: C:/vcpkg/packages/rtabmap_x64-windows/share/rtabmap/copyright
-- Performing post-build validation
Stored binary cache: "C:\Users\Mathieu\AppData\Local\vcpkg\archives\b6\b62372dd03227f9ddab02d21da00246ae9fb3bc4de3f81fcb62ad45eadcd48fd.zip"
Elapsed time to handle rtabmap:x64-windows: 10.747169716666667 min
Total install time: 10.781853376666668 min
rtabmap provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(RTABMap CONFIG REQUIRED)
    target_link_libraries(main PRIVATE rtabmap::gui rtabmap::core rtabmap::rtabmap rtabmap::utilite)

@dg0yt
Copy link
Contributor

dg0yt commented Mar 19, 2023

You can click through from checks to the "failure logs" artifacts on GH actions. This is the error:

FAILED: guilib/src/rtabmap_gui_autogen/timestamp guilib/src/rtabmap_gui_autogen/mocs_compilation.cpp D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/rtabmap_gui_autogen/timestamp D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/rtabmap_gui_autogen/mocs_compilation.cpp 
cmd.exe /C "cd /D D:\buildtrees\rtabmap\x64-windows-dbg\guilib\src && D:\downloads\tools\cmake-3.25.1-windows\cmake-3.25.1-windows-i386\bin\cmake.exe -E cmake_autogen D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/CMakeFiles/rtabmap_gui_autogen.dir/AutogenInfo.json Debug && D:\downloads\tools\cmake-3.25.1-windows\cmake-3.25.1-windows-i386\bin\cmake.exe -E touch D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/rtabmap_gui_autogen/timestamp && D:\downloads\tools\cmake-3.25.1-windows\cmake-3.25.1-windows-i386\bin\cmake.exe -E cmake_transform_depfile Ninja gccdepfile D:/buildtrees/rtabmap/src/f56a3aa731-0ec3dda1b9.clean D:/buildtrees/rtabmap/src/f56a3aa731-0ec3dda1b9.clean/guilib/src D:/buildtrees/rtabmap/x64-windows-dbg D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/rtabmap_gui_autogen/deps D:/buildtrees/rtabmap/x64-windows-dbg/CMakeFiles/d/0a441891f1c00df32e3906b95be69955b3a0261703dc7babd5fc127664899f01.d"

AutoUic error
-------------
"SRC:/guilib/src/AboutDialog.cpp"
includes the uic file "ui_aboutDialog.h",
but the user interface file "aboutDialog.ui"
could not be found in the following directories
  "SRC:/guilib/src"

AFAICS the project uses qt5_wrap_ui, so AUTOUIC shouldn't be used? OTOH I don't see a defined order between generating and using ui_aboutDialog.h.

Note that the cmake config error log has two warnings related to policies affecting autouic - also on your system.

@matlabbe
Copy link
Contributor Author

matlabbe commented Mar 19, 2023

The project uses Qt6 and qt5_wrap_ui is not even used with the Qt5 version (see here).

I compared the logs on my computer and the one on Azure, see attachments:
install-x64-windows-dbg-out-AZURE.log
install-x64-windows-dbg-out-MYCOMPUTER.log

It seems they are not using the same compiler, maybe it is the issue why I cannot reproduce on my side. Here the logs when it fails on Azure:

[131/254] cmd.exe /C "cd /D D:\buildtrees\rtabmap\x64-windows-dbg\guilib\src && D:\downloads\tools\cmake-3.25.1-windows\cmake-3.25.1-windows-i386\bin\cmake.exe -E cmake_autogen D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/CMakeFiles/rtabmap_gui_autogen.dir/AutogenInfo.json Debug && D:\downloads\tools\cmake-3.25.1-windows\cmake-3.25.1-windows-i386\bin\cmake.exe -E touch D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/rtabmap_gui_autogen/timestamp && D:\downloads\tools\cmake-3.25.1-windows\cmake-3.25.1-windows-i386\bin\cmake.exe -E cmake_transform_depfile Ninja gccdepfile D:/buildtrees/rtabmap/src/f56a3aa731-0ec3dda1b9.clean D:/buildtrees/rtabmap/src/f56a3aa731-0ec3dda1b9.clean/guilib/src D:/buildtrees/rtabmap/x64-windows-dbg D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/rtabmap_gui_autogen/deps D:/buildtrees/rtabmap/x64-windows-dbg/CMakeFiles/d/0a441891f1c00df32e3906b95be69955b3a0261703dc7babd5fc127664899f01.d"
FAILED: guilib/src/rtabmap_gui_autogen/timestamp guilib/src/rtabmap_gui_autogen/mocs_compilation.cpp 

and corresponding lines on my computer (they are completely different):

[125/246] cmd.exe /C "cd /D C:\vcpkg\buildtrees\rtabmap\x64-windows-dbg\guilib\src\__\include\rtabmap\gui && C:\vcpkg\installed\x64-windows\tools\Qt6\bin\moc.exe @C:/vcpkg/buildtrees/rtabmap/x64-windows-dbg/guilib/src/__/include/rtabmap/gui/moc_MainWindow.cpp_parameters"
[126/246] cmd.exe /C "cd /D C:\vcpkg\buildtrees\rtabmap\x64-windows-dbg\guilib\src\__\include\rtabmap\gui && C:\vcpkg\installed\x64-windows\tools\Qt6\bin\moc.exe @C:/vcpkg/buildtrees/rtabmap/x64-windows-dbg/guilib/src/__/include/rtabmap/gui/moc_PreferencesDialog.cpp_parameters"

On CI, I am not sure why it is using cmake_autogen, as on my computer it is using qt moc.exe directly. Is it just a cmake version difference? My computer is using cmake 3.24.2 from Visual Studio Community 2022, while CI is using 3.25.1.

EDIT: cmake config:
config-x64-windows-dbg-out-AZURE.log
config-x64-windows-dbg-out-MYCOMPUTER.log

@dg0yt
Copy link
Contributor

dg0yt commented Mar 19, 2023

I may have hit an old version, but is it significant? The current version is using qt6_wrap_ui now, i.e. does not rely on the modern AUTOUIC, but still the error is reported from "AutoUic." Maybe run CMake with --trace-expand?

@matlabbe
Copy link
Contributor Author

Oh sorry, yeah the project indeed uses qt6_wrap_ui, but it is strange that CI and my computer are not calling the same tools. I am currently releasing new RTAB-Map binaries, I may return debugging vcpkg later and try --trace-expand.

Comment on lines 42 to 51
"description": "Build RTAB-Map with GUI support (Qt)",
"dependencies": [
{
"name": "pcl",
"default-features": false,
"features": [
"qt"
]
}
]
Copy link
Contributor

Choose a reason for hiding this comment

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

To build with Qt support, there should be an explicit dependency on qtbase and the other qt ports which are needed here.

Copy link
Contributor Author

@matlabbe matlabbe Mar 20, 2023

Choose a reason for hiding this comment

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

It worked thx! actually no... :(

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 expect it to fix the issue. Still waiting for --trace-expand.
FTR I would also add "default-features": false for qtbase so that users can control which features they want from the default set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated qtbase without defautl features. Here is the --trace-expand:

vcpkg install rtabmap --x-cmake-args=--trace-expand > output.txt

cmake-trace.txt

Copy link
Contributor

Choose a reason for hiding this comment

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

We need it from the failing CI, i.e. add it to OPTIONS of vcpkg_cmake_configure.

@FrankXie05 FrankXie05 added the category:port-update The issue is with a library, which is requesting update new revision label Mar 20, 2023
Copy link
Contributor

@FrankXie05 FrankXie05 left a comment

Choose a reason for hiding this comment

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

versions/r-/rtabmap.json Outdated Show resolved Hide resolved
@matlabbe matlabbe marked this pull request as draft March 20, 2023 03:20
@matlabbe
Copy link
Contributor Author

matlabbe commented Mar 20, 2023

Reconverted to Draft, as this issue #30254 (comment) is still there on CI. As I cannot reproduce the error on my computer, it is quite difficult to debug this. I'll check back later when I will have some spare time.

@dg0yt
Copy link
Contributor

dg0yt commented Mar 21, 2023

Now we have a big log file.
I don't claim I can immediately say what is wrong because variable scopes are difficult to track.
Looking for autouic yields:

D:/installed/x64-windows/share/opencv/OpenCVModules.cmake(54):  set(CMAKE_AUTOUIC ON )

but also

D:/installed/x64-windows/share/Qt6Widgets/Qt6WidgetsMacros.cmake(63):  set_source_files_properties(D:/buildtrees/rtabmap/x64-windows-dbg/guilib/src/ui_aboutDialog.h PROPERTIES SKIP_AUTOUIC ON )

I still don't see how CMake could determine that compiling AboutDialog.cpp depends the qt6_wrap_ui results, and the 32 jobs of vcpkg ci could make a difference with regard to the 16 jobs on your machine.

@matlabbe
Copy link
Contributor Author

matlabbe commented Mar 24, 2023

@dg0yt FYI

Because OpenCV dependency imported target explicitly sets:

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

the trick is to explicitly add this for downstream packages depending on Qt and OpenCV:

set(CMAKE_AUTOMOC OFF)
set(CMAKE_AUTORCC OFF)
set(CMAKE_AUTOUIC OFF)

... well, for packages not using yet autouic for qt. Still not sure why that bug was not happening on my computer though, so I made a patch here instead of making the change in rtabmap library.

Ready to be merged!

@matlabbe matlabbe marked this pull request as ready for review March 24, 2023 04:27
@FrankXie05 FrankXie05 added requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function info:reviewed Pull Request changes follow basic guidelines and removed requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function labels Mar 24, 2023
@FrankXie05
Copy link
Contributor

The features have been test successfully locally.

Comment on lines -75 to -84
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/unofficial-rtabmap/unofficial-rtabmap-config.cmake"
[[# Generated by CMake]]
[[# Generated by CMake
include(CMakeFindDependencyMacro)
find_dependency(OpenCV)
find_dependency(PCL)
find_dependency(ZLIB)
find_dependency(VTK)
find_dependency(OpenMP)]]
)
Copy link
Member

Choose a reason for hiding this comment

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

don't we need to patch these transitive dependencies anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there something missing on downstream packages? rtabmap now uses targets, and provide already those checks: https://github.com/introlab/rtabmap/blob/6dca8ab0f366b2628cafc332ec5ef10869e120b3/RTABMapConfig.cmake.in#L3-L47

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.

[rtabmap] update to 0.21.0
6 participants