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

[realsense2] Build error on x64-windows #38777

Open
sidy3d opened this issue May 17, 2024 · 4 comments
Open

[realsense2] Build error on x64-windows #38777

sidy3d opened this issue May 17, 2024 · 4 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@sidy3d
Copy link
Contributor

sidy3d commented May 17, 2024

Package: realsense2:x64-windows@2.54.2#2

Host Environment

  • Host: x64-windows
  • Compiler: MSVC 19.39.33523.0
  • vcpkg-tool version: 2024-03-14-7d353e869753e5609a1f1a057df3db8fd356e49d
    vcpkg-scripts version: 6b99cf1 2024-05-16 (4 hours ago)

To Reproduce

vcpkg install
Failure logs

-- Using cached IntelRealSense-librealsense-v2.54.2.tar.gz.
-- Cleaning sources at C:/dev/vcpkg/buildtrees/realsense2/src/v2.54.2-e3f135a521.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/dev/vcpkg/downloads/IntelRealSense-librealsense-v2.54.2.tar.gz
-- Applying patch fix_openni2.patch
-- Applying patch fix-osx.patch
-- Using source at C:/dev/vcpkg/buildtrees/realsense2/src/v2.54.2-e3f135a521.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at C:/Users/sidyn/AppData/Local/vcpkg/registries/git-trees/b15354f0a205d2288e63564e2789e317442bd999/portfile.cmake:54 (file):
  file INSTALL cannot find
  "C:/dev/vcpkg/buildtrees/realsense2/x64-windows-rel/common/fw/fw.res": File
  exists.
Call Stack (most recent call first):
  scripts/ports.cmake:175 (include)



Additional context

vcpkg.json
{
  "dependencies": [
    "opencv2",
    "tiff",
    "realsense2"
  ]
}

@LilyWangLL LilyWangLL added the requires:repro The issue is not currently repro-able label May 17, 2024
@LilyWangLL
Copy link
Contributor

I can't repro this issue locally.

 .\vcpkg.exe install realsense2:x64-windows --binarysource=clear
Computing installation plan...
The following packages will be built and installed:
    realsense2:x64-windows@2.54.2#2
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe
Installing 1/1 realsense2:x64-windows@2.54.2#2...
Building realsense2:x64-windows@2.54.2#2...
-- Downloading https://github.com/IntelRealSense/librealsense/archive/v2.54.2.tar.gz -> IntelRealSense-librealsense-v2.54.2.tar.gz...
-- Extracting source F:/0515/downloads/IntelRealSense-librealsense-v2.54.2.tar.gz
-- Applying patch fix_openni2.patch
-- Applying patch fix-osx.patch
-- Using source at F:/0515/buildtrees/realsense2/src/v2.54.2-e3f135a521.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: F:/0515/packages/realsense2_x64-windows/common/fw/fw.res
-- Installing: F:/0515/packages/realsense2_x64-windows/share/realsense2/copyright
-- Fixing pkgconfig file: F:/0515/packages/realsense2_x64-windows/lib/pkgconfig/realsense2.pc
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1~2.2.0-1-any.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.4.10-4-x86_64.pkg.tar.zst.
-- Using msys root at F:/0515/downloads/tools/msys2/d33df895d441a36d
-- Fixing pkgconfig file: F:/0515/packages/realsense2_x64-windows/debug/lib/pkgconfig/realsense2.pc
-- Performing post-build validation
Elapsed time to handle realsense2:x64-windows: 2.4 min
realsense2:x64-windows package ABI: 1941d4dbbd287bbe6bddd08e50fbef1e4b9c2015e4988af583bc9bb6bab98460
Total install time: 2.4 min
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)

realsense2 provides pkg-config modules:

  # Intel(R) RealSense(tm) Cross Platform API
  realsense2

 .\vcpkg.exe --version
vcpkg package management program version 2024-04-23-d6945642ee5c3076addd1a42c331bbf4cfc97457

@sidy3d
Copy link
Contributor Author

sidy3d commented May 17, 2024

Hi @LilyWangLL,
I am using vcpkg with manifests mode in a standard Visual Studio project. Can you try to repo again?

  • Windows Version: 22631.3593
  • Visual Studio Version: Version 17.9.7

@sidy3d
Copy link
Contributor Author

sidy3d commented May 17, 2024

This seems to be related to this, not sure how to fix:
IntelRealSense/librealsense#7947

@dg0yt
Copy link
Contributor

dg0yt commented May 17, 2024

And IntelRealSense/librealsense#9772.

The port installs common/fw/fw.res. Apart from the unusal common prefix... IIUC the INTERFACE_LINK_LIBRARIES property of the exported realsense2::fw must be replaced with a relative path, so that it is found in the installed dir instead of buildtrees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

3 participants