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

[apr] Build error /vcpkg/packages/apr_x64-linux/debug/lib/pkgconfig/apr-1.pc file failed to open for reading (No such file or directory): #23488

Closed
ywang2017 opened this issue Mar 10, 2022 · 7 comments · Fixed by #24220
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@ywang2017
Copy link

ywang2017 commented Mar 10, 2022

Host Environment

  • OS: [e.g. Windows Server 2019/ WSL Linux 20.04 LTS]
  • Compiler: gcc

To Reproduce
Steps to reproduce the behavior:

/usr/bin/cmake -G "Ninja"   -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="../cmake-install/WSL-GCC-Debug" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="/home/user/vcpkg/scripts/buildsystems/vcpkg.cmake" -  CMakeLists.txt;
1> [CMake] *** portable models build ***
1> [CMake] -- Running vcpkg install
1> [CMake] Detecting compiler hash for triplet x64-linux...
1> [CMake] The following packages will be built and installed:
1> [CMake]   * apr[core]:x64-linux -> 1.7.0#4 -- /home/ec2-user/vcpkg/buildtrees/versioning_/versions/apr/b9e93acdaa680398eaed361f1df530096ded84ff
1> [CMake]   * apr-util[core]:x64-linux -> 1.6.1#4 -- /home/ec2-user/vcpkg/buildtrees/versioning_/versions/apr-util/cf1a0e97d00a5748dc58db7d0a5da0fd7d5efb66
1> [CMake]     log4cxx[core]:x64-linux -> 0.11.0#3 -- /home/ec2-user/vcpkg/buildtrees/versioning_/versions/log4cxx/406017355e07d94a41999c3db5e015be8bf0fbbd
1> [CMake]     tbb[core]:x64-linux -> 2020_U3#6 -- /home/ec2-user/vcpkg/buildtrees/versioning_/versions/tbb/e168e03c2e5776bdee59accf5f643ae26b0ddd84
1> [CMake]     tinyxml2[core]:x64-linux -> 9.0.0 -- /home/ec2-user/vcpkg/buildtrees/versioning_/versions/tinyxml2/a8b086bdb3eaa94fea466bf8565d7c98b00c9f94
1> [CMake] Additional packages (*) will be modified to complete this operation.
1> [CMake] Restored 0 packages from /home/ec2-user/.cache/vcpkg/archives in 1.139 ms. Use --debug to see more details.
1> [CMake] Starting package 1/5: apr:x64-linux
1> [CMake] Building package apr[core]:x64-linux...
1> [CMake] -- Installing port from location: /home/ec2-user/vcpkg/buildtrees/versioning_/versions/apr/b9e93acdaa680398eaed361f1df530096ded84ff
1> [CMake] -- Using cached apr-1.7.0.tar.bz2.
1> [CMake] -- Cleaning sources at /home/ec2-user/vcpkg/buildtrees/apr/src/apr-1-3a6fcafcf9.clean. Use --editable to skip cleaning for the packages you specify.
1> [CMake] -- Extracting source /home/ec2-user/vcpkg/downloads/apr-1.7.0.tar.bz2
1> [CMake] -- Using source at /home/ec2-user/vcpkg/buildtrees/apr/src/apr-1-3a6fcafcf9.clean
1> [CMake] -- Configuring apr
1> [CMake] -- Getting CMake variables for x64-linux-dbg
1> [CMake] -- Getting CMake variables for x64-linux-rel
1> [CMake] -- Configuring x64-linux-rel
1> [CMake] -- Building x64-linux-rel
1> [CMake] -- Installing x64-linux-rel
**1> [CMake] CMake Error at scripts/cmake/vcpkg_replace_string.cmake:12 (file):
1> [CMake]   file failed to open for reading (No such file or directory):
1> [CMake] 
1> [CMake]     /home/ec2-user/vcpkg/packages/apr_x64-linux/debug/lib/pkgconfig/apr-1.pc
1> [CMake] Call Stack (most recent call first):**
1> [CMake]   buildtrees/versioning_/versions/apr/b9e93acdaa680398eaed361f1df530096ded84ff/portfile.cmake:81 (vcpkg_replace_string)
1> [CMake]   scripts/ports.cmake:145 (include)
1> [CMake] Error: Building package apr:x64-linux failed with: BUILD_FAILED
1> [CMake] Please ensure you're using the latest portfiles with `git pull` and `./vcpkg update`.
1> [CMake] Then check for known issues at:
1> [CMake]   https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+apr
1> [CMake] You can submit a new issue at:
1> [CMake]   https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[apr]+Build+error
1> [CMake] including:
1> [CMake]   package: apr[core]:x64-linux -> 1.7.0#4
1> [CMake]     vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e
1> [CMake]     vcpkg-scripts version: 6308196b2 2022-03-09 (17 hours ago)
1> [CMake] 
1> [CMake] Additionally, attach any relevant sections from the log files above.
1> [CMake] -- Running vcpkg install - failed
1> [CMake] CMake Error at /home/ec2-user/vcpkg/scripts/buildsystems/vcpkg.cmake:834 (message):
1> [CMake]   vcpkg install failed.  See logs for more information:
1> [CMake]  /cmake-build/WSL-GCC-Debug/vcpkg-manifest-install.log
1> [CMake] Call Stack (most recent call first):
1> [CMake]   /usr/share/cmake-3.19/Modules/CMakeDetermineSystem.cmake:123 (include)
1> [CMake]   CMakeLists.txt:31 (project)
1> [CMake] CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
1> [CMake] CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
1> [CMake] CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
1> [CMake] -- Configuring incomplete, errors occurred!

Additional context
Add any other context about the problem here, such as what you have already tried to resolve the issue.

@ywang2017
Copy link
Author

on successful build, build order debug first and release. How to change the build order?

Configuring x64-linux-dbg
2022-03-04T21:47:34.1439552Z -- Configuring x64-linux-rel
2022-03-04T21:47:38.2132393Z -- Building x64-linux-dbg

2022-03-04T21:47:43.5479220Z -- Installing x64-linux-dbg
2022-03-04T21:47:43.7810858Z -- Building x64-linux-rel
2022-03-04T21:47:49.0789934Z -- Installing x64-linux-rel

@dg0yt
Copy link
Contributor

dg0yt commented Mar 10, 2022

build order debug first and release. How to change the build order?

Maybe your first build attempt used overlay triplets to get a release-only build for x64-linux?
Port "apr" does not support single-config build at the moment.

@Adela0814 Adela0814 self-assigned this Mar 11, 2022
@Adela0814 Adela0814 added the requires:more-information This Issue requires more information to solve label Mar 11, 2022
@ywang2017
Copy link
Author

ls /root/vcpkg/packages/apr_x64-linux doesn't have debug folder while build Release version

@dg0yt
Copy link
Contributor

dg0yt commented Mar 13, 2022

@Adela0814 This issue doesn't require more information. The portfile must be fixed for single config build.

@Adela0814 Adela0814 added category:port-bug The issue is with a library, which is something the port should already support and removed requires:more-information This Issue requires more information to solve labels Mar 14, 2022
@ifrisbie
Copy link

ifrisbie commented Apr 15, 2022

I ran into the same issue but it just turned out to be a versioning problem where "NO_DEBUG" was being specified on the config line in the version I was downloading (of the port) and when I specifically targeted a more recent one it was fine.

@ywang2017
Copy link
Author

latest code still get same error. I need both debug and release, so VCPKG_BUILD_TYPE is not set.

replease

Building package apr[core]:x64-linux...
-- Installing port from location: /vcpkg/buildtrees/versioning_/versions/apr/b9e93acdaa680398eaed361f1df530096ded84ff
-- Downloading https://www.apache.org/dist/apr/apr-1.7.0.tar.bz2 -> apr-1.7.0.tar.bz2...
-- Extracting source /vcpkg/downloads/apr-1.7.0.tar.bz2
-- Using source at /vcpkg/buildtrees/apr/src/apr-1-3a6fcafcf9.clean
-- Configuring apr
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-rel
-- Building x64-linux-rel
-- Installing x64-linux-rel
CMake Error at scripts/cmake/vcpkg_replace_string.cmake:12 (file):
file failed to open for reading (No such file or directory):

/vcpkg/packages/apr_x64-linux/debug/lib/pkgconfig/apr-1.pc

Call Stack (most recent call first):
buildtrees/versioning_/versions/apr/b9e93acdaa680398eaed361f1df530096ded84ff/portfile.cmake:81 (vcpkg_replace_string)
scripts/ports.cmake:145 (include)

error: building apr:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles 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+apr
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[apr]+Build+error
including:
package: apr[core]:x64-linux -> 1.7.0#4
vcpkg-tool version: 2022-03-30-692785ac944e81417840c6de244fb3e18a4b35eb
vcpkg-scripts version: c8a56fd 2022-04-29 (2 days ago)

@dg0yt
Copy link
Contributor

dg0yt commented May 2, 2022

package: apr[core]:x64-linux -> 1.7.0#4
vcpkg-tool version: 2022-03-30-692785ac944e81417840c6de244fb3e18a4b35eb
vcpkg-scripts version: c8a56fd 2022-04-29 (2 days ago)

Your repo is not too old, but the port version is. The fix for this bug bumped the version to 1.7.0#8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants