Git Product home page Git Product logo

Comments (7)

inakleinbottle avatar inakleinbottle commented on June 13, 2024 1

After a lot of digging, I think this is caused by the vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Opus) function call in https://github.com/microsoft/vcpkg/blob/master/ports/opus/portfile.cmake.

The problem is that in OpusConfig.cmake, the path given as the install root directory is compute by

get_filename_component(PACKAGE_${CMAKE_FIND_PACKAGE_NAME}_COUNTER_1 "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

where the /../../../ is in term calculated by CMake at configure time using the following code:

  if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")
    set(absInstallDir "${CCF_INSTALL_DESTINATION}")
  else()
    set(absInstallDir "${installPrefix}/${CCF_INSTALL_DESTINATION}")
  endif()

  file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${installPrefix}" )

In Opus case, absInstallDir is

${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/

This is resolved to ${VCPKG_ROOT}/installed/lib/cmake/opus
Whence the install relative path is ${absInstallDir}/../../../. However, once the fixup function is called in the portfile, the path is moved to

${VCPKG_ROOT}/installed/x64-linux/share/opus

which is one level shallower than the true config install location. Thus the path defined in the CMake config file points to ${VCPKG_ROOT}/installed instead of ${VCPKG_ROOT}/installed/x64-linux, which causes the file not found error.

I don't exactly know what has caused this regression, since none of the repositories involved have changed in ~2 years so far as I can tell. My cmake version has recently been updated, but I can't see why that would make a difference. I hope this helps.

from vcpkg.

anbjoernskov avatar anbjoernskov commented on June 13, 2024 1

It is because of CMake 3.29.1. a lot of other packages also have the same issue. A temp fix is to use an older version of CMake.

from vcpkg.

Baklap4 avatar Baklap4 commented on June 13, 2024

Also failing on windows-x64-release

:\a\performous\performous\performous\cmake\triplets\x64-windows-release.cmake: info: loaded overlay triplet from here
-- Downloading https://github.com/libsndfile/libsndfile/archive/1.2.2.tar.gz -> libsndfile-libsndfile-1.2.2.tar.gz...
-- Extracting source D:/a/performous/performous/vcpkg/downloads/libsndfile-libsndfile-1.2.2.tar.gz
-- Applying patch 001-avoid-installing-find-modules.patch
-- Using source at D:/a/performous/performous/vcpkg/buildtrees/libsndfile/src/1.2.2-fa730f3d73.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows-release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v
    Working Directory: D:/a/performous/performous/vcpkg/buildtrees/libsndfile/x64-windows-release-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      D:\a\performous\performous\vcpkg\buildtrees\libsndfile\config-x64-windows-release-rel-CMakeCache.txt.log
      D:\a\performous\performous\vcpkg\buildtrees\libsndfile\config-x64-windows-release-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:252 (vcpkg_execute_required_process)
  ports/libsndfile/portfile.cmake:27 (vcpkg_cmake_configure)
  scripts/ports.cmake:175 (include)


error: building libsndfile:x64-windows-release failed with: BUILD_FAILED
Elapsed time to handle libsndfile:x64-windows-release: 1.6 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libsndfile
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[libsndfile]+Build+error+on+x64-windows-release&body=Copy+issue+body+from+D%3A%2Fa%2Fperformous%2Fperformous%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
You can also submit an issue by running (GitHub CLI must be installed):
  gh issue create -R microsoft/vcpkg --title "[libsndfile] Build failure on x64-windows-release" --body-file D:/a/performous/performous/vcpkg/installed/vcpkg/issue_body.md

from vcpkg.

dg0yt avatar dg0yt commented on June 13, 2024

#37968

from vcpkg.

inakleinbottle avatar inakleinbottle commented on June 13, 2024

Ok, so it is a cmake issue. I shall raise an issue there.

from vcpkg.

dg0yt avatar dg0yt commented on June 13, 2024

No, just follow the links,

from vcpkg.

Cheney-W avatar Cheney-W commented on June 13, 2024

Duplicate of #37968.
Don't use CMake 3.29.1, please refer to this solution: #37968 (comment) or use the CMake which downloaded by VCPKG..

from vcpkg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.