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

[RealSense] Update to 2.54.1 #32389

Merged
merged 11 commits into from
Jul 11, 2023

Conversation

Tamir91
Copy link
Contributor

@Tamir91 Tamir91 commented Jul 4, 2023

RealSense version updated to 2.54.1
OSX patch removed

Tamir91 added 5 commits June 19, 2023 18:11
Patch disabled due to an issue:
-- Applying patch fix_openni2.patch
-- Applying patch fix_config_osx.patch
CMake Error at scripts/cmake/z_vcpkg_apply_patches.cmake:34 (message):
  Applying patch failed: Checking patch CMake/unix_config.cmake...

  error: while searching for:

      ?
      if(APPLE)?
          set(FORCE_RSUSB_BACKEND ON)?
          set(BUILD_WITH_TM2 ON)?
      endif()?
      ?
      if(FORCE_RSUSB_BACKEND)?

  error: patch failed: CMake/unix_config.cmake:35

  error: CMake/unix_config.cmake: patch does not apply

Call Stack (most recent call first):
  scripts/cmake/vcpkg_extract_source_archive.cmake:153 (z_vcpkg_apply_patches)
  scripts/cmake/vcpkg_extract_source_archive_ex.cmake:8 (vcpkg_extract_source_archive)
  scripts/cmake/vcpkg_from_github.cmake:113 (vcpkg_extract_source_archive_ex)
  ports/realsense2/portfile.cmake:1 (vcpkg_from_github)
  scripts/ports.cmake:147 (include)
No need for a patch - fix_config_osx.patch
@MonicaLiu0311 MonicaLiu0311 self-assigned this Jul 5, 2023
@MonicaLiu0311 MonicaLiu0311 added the category:port-update The issue is with a library, which is requesting update new revision label Jul 5, 2023
@Tamir91
Copy link
Contributor Author

Tamir91 commented Jul 5, 2023

@microsoft-github-policy-service agree company="Intel"

@MonicaLiu0311
Copy link
Contributor

##[error]Found the following errors:
##[error]versions/r-/realsense2.json(2,): error : while parsing versions for realsense2 from version/r-/realsense2.json
2.54.1 is declared with d8884a0ab29863bd7fa8aeb6167c75a8b66513dc, but the local port has a different SHA cb6ef9deafcbb447cbb7903412b4a1acca8b20ea.

Please run ./vcpkg x-add-version portName --overwrite-version.

--overwrite-version
After the first modification, please run ./vcpkg x-add-version portName to generate the corresponding json; for subsequent modifications of the same version, please use ./vcpkg x-add-version portName --overwrite-version to update git-tree.

@Tamir91
Copy link
Contributor Author

Tamir91 commented Jul 6, 2023

##[error]Found the following errors:
##[error]versions/r-/realsense2.json(2,): error : while parsing versions for realsense2 from version/r-/realsense2.json
2.54.1 is declared with d8884a0ab29863bd7fa8aeb6167c75a8b66513dc, but the local port has a different SHA cb6ef9deafcbb447cbb7903412b4a1acca8b20ea.

Please run ./vcpkg x-add-version portName --overwrite-version.

--overwrite-version After the first modification, please run ./vcpkg x-add-version portName to generate the corresponding json; for subsequent modifications of the same version, please use ./vcpkg x-add-version portName --overwrite-version to update git-tree.

Hi, Monica!

Thank you for your aid!
I generated new git-tree key...

@MonicaLiu0311 MonicaLiu0311 changed the title Update RealSense to 2.54.1 [RealSense] Update to 2.54.1 Jul 7, 2023
@MonicaLiu0311
Copy link
Contributor

An error occurred while testing usage.

usage:

realsense2 provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(realsense2 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE realsense2::fw realsense2::rsutils realsense2::realsense2 realsense2::realsense-file)

When testing usage, the following error occurs:

>------ Rebuild All started: Project: CMakeFindUsage, Configuration: x64-Debug ------
  MSBuild version 17.6.3+07e294721 for .NET Framework
  
  MSBuild version 17.6.3+07e294721 for .NET Framework
  
    Checking Build System
    Building Custom Rule C:/Users/monica/source/repos/CMakeFindUsage/CMakeFindUsage/CMakeLists.txt
    CMakeFindUsage.cpp
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\include\ostream(774,1): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc 
  C:\Users\monica\source\repos\CMakeFindUsage\CMakeFindUsage\CMakeFindUsage.cpp(10,7): message : see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::operator <<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char>> &,const char *)' being compiled [C:\Users\monica\source\repos\CMakeFindUsage\out\build\x64-Debug\CMakeFindUsage\main.vcxproj]
C:\Users\monica\source\repos\CMakeFindUsage\out\build\x64-Debug\CMakeFindUsage\LINK : fatal error LNK1104: cannot open file 'E:\realsense\installed\x64-windows\common\fw\fw.res' 

Rebuild All failed.
CMakeFindUsage.cpp
#include <iostream>
#include "librealsense2/rs.h"

using namespace std;

int main()
{
cout << "Hello CMake." << endl;
return 0;
}

CMakeLists.txt
cmake_minimum_required (VERSION 3.8)

set(CMAKE_TOOLCHAIN_FILE "E:/realsense/scripts/buildsystems/vcpkg.cmake")

project ("CMakeFindUsage")

add_executable (main "CMakeFindUsage.cpp")

find_package(realsense2 CONFIG REQUIRED)

target_link_libraries(main PRIVATE realsense2::fw realsense2::rsutils realsense2::realsense2 realsense2::realsense-file)

Upstream related: https://github.com/IntelRealSense/librealsense/blob/v2.54.1/common/fw/CMakeLists.txt#L41-L47.

@MonicaLiu0311
Copy link
Contributor

MonicaLiu0311 commented Jul 7, 2023

Currently this file is in vcpkg\buildtrees\realsense2\x64-windows-rel\common\fw\fw.res, you can use the following statement in portfile.cmake to install it to the specified location vcpkg\installed\ x64-windows\common\fw\fw.res:

if(VCPKG_TARGET_IS_WINDOWS)
    ...
    file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/common/fw")
    file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/common/fw/fw.res" DESTINATION "${CURRENT_PACKAGES_DIR}/common/fw")
endif()

@Tamir91
Copy link
Contributor Author

Tamir91 commented Jul 10, 2023

Currently this file is in vcpkg\buildtrees\realsense2\x64-windows-rel\common\fw\fw.res, you can use the following statement in portfile.cmake to install it to the specified location vcpkg\installed\ x64-windows\common\fw\fw.res:

if(VCPKG_TARGET_IS_WINDOWS)
    ...
    file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/common/fw")
    file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/common/fw/fw.res" DESTINATION "${CURRENT_PACKAGES_DIR}/common/fw")
endif()

Hi, Monica!

I added lines according your guidelines. I will push it now.

Thank you for your support!

@MonicaLiu0311 MonicaLiu0311 marked this pull request as ready for review July 11, 2023 06:17
@MonicaLiu0311
Copy link
Contributor

All features are tested successfully in the following triplet:

x86-windows
x64-windows

@MonicaLiu0311 MonicaLiu0311 added the info:reviewed Pull Request changes follow basic guidelines label Jul 11, 2023
@BillyONeal BillyONeal merged commit 62c4a7a into microsoft:master Jul 11, 2023
@BillyONeal
Copy link
Member

Thanks!

@Tamir91
Copy link
Contributor Author

Tamir91 commented Jul 12, 2023

Hi Monica!

Are you know why RealSense version was not updated to 2.54.1 version in "Browse packages"?

image

@Tamir91
Copy link
Contributor Author

Tamir91 commented Jul 13, 2023

Hi, Monica

I noted that the RealSense version was changed to 2.53.1 but it still an old version...
May you explain about this repo behavior?

image
Thank you!

@MonicaLiu0311
Copy link
Contributor

Hi, Monica

I noted that the RealSense version was changed to 2.53.1 but it still an old version... May you explain about this repo behavior?

image Thank you!

Because it is not yet able to maintain real-time synchronization with vcpkg.
See related issues: vcpkg/vcpkg.github.io#48
See related PR: vcpkg/vcpkg.github.io#60

Comment on lines -28 to -30
"tm2": {
"description": "Build Intel® RealSense™ T265 device"
},
Copy link
Contributor

@autoantwort autoantwort Aug 8, 2023

Choose a reason for hiding this comment

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

It seems that rtabmap still depends on this:

"realsense2": {
"description": "Build RTAB-Map with RealSense2 camera driver",
"dependencies": [
{
"name": "realsense2",
"default-features": false,
"features": [
"tm2"
]
}
]
},

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.

4 participants