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

[grpc] install error on x64-linux #42277

Open
ShineSea opened this issue Nov 21, 2024 · 6 comments
Open

[grpc] install error on x64-linux #42277

ShineSea opened this issue Nov 21, 2024 · 6 comments
Assignees
Labels
category:question This issue is a question

Comments

@ShineSea
Copy link

Describe the bug
When I install grpc, the log kept getting stuck in the Fixing pkgconfig file, and did not enter the Installing step. Waiting time exceeds 30 minutes.

Environment

  • OS: x64-linux (Centos 7)
  • Compiler: GNU 13.3.0

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install grpc
  2. Console Information:
    Computing installation plan...
    The following packages will be built and installed:
    grpc[codegen,core]:[email protected]
    Detecting compiler hash for triplet x64-linux...
    Compiler found: /usr/local/bin/c++
    Restored 0 package(s) from /root/.cache/vcpkg/archives in 8.45 us. Use --debug to see more details.
    Installing 1/1 grpc[codegen,core]:[email protected]...
    Building grpc[codegen,core]:[email protected]...
    -- Using cached grpc-grpc-v1.65.5.tar.gz.
    -- Cleaning sources at /root/workspace/vcpkg/buildtrees/grpc/src/v1.65.5-472dc5d7e8.clean. Use --editable to skip cleaning for the packages you specify.
    -- Extracting source /root/workspace/vcpkg/downloads/grpc-grpc-v1.65.5.tar.gz
    -- Applying patch 00001-fix-uwp.patch
    -- Applying patch 00002-static-linking-in-linux.patch
    -- Applying patch 00004-link-gdi32-on-windows.patch
    -- Applying patch 00005-fix-uwp-error.patch
    -- Applying patch 00006-utf8-range.patch
    -- Applying patch 00015-disable-download-archive.patch
    -- Applying patch 00016-fix-plugin-targets.patch
    -- Applying patch 00017-fix-NAN-on-Win11.patch
    -- Applying patch 00018-fix-windows-event-engine.patch
    -- Using source at /root/workspace/vcpkg/buildtrees/grpc/src/v1.65.5-472dc5d7e8.clean
    -- Configuring x64-linux
    -- Building x64-linux-dbg
    -- Building x64-linux-rel
    -- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/gpr.pc
    -- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc++.pc
    -- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc++_unsecure.pc
    -- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc.pc
    -- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc_unsecure.pc
@FrankXie05
Copy link
Contributor

@ShineSea Is your CPU or memory usage full?

@FrankXie05 FrankXie05 added the category:question This issue is a question label Nov 21, 2024
@ShineSea
Copy link
Author

ShineSea commented Nov 21, 2024

@FrankXie05 Thank you for your reply.I just checked the CPU usage, and the pkg-config process is using around 100%.I also modified the \ scripts\cmake\vcpkg_fixup_pkgconfig.cmake myself, changed debug_message to message and reinstalled it. The console log is as follows:

Computing installation plan...
The following packages will be built and installed:
    grpc[codegen,core]:[email protected]
Detecting compiler hash for triplet x64-linux...
Compiler found: /usr/local/bin/c++
Restored 0 package(s) from /root/.cache/vcpkg/archives in 13.2 us. Use --debug to see more details
Installing 1/1 grpc[codegen,core]:[email protected]...
Building grpc[codegen,core]:[email protected]...
-- Using cached grpc-grpc-v1.65.5.tar.gz.
-- Cleaning sources at /root/workspace/vcpkg/buildtrees/grpc/src/v1.65.5-472dc5d7e8.clean. Use --eecify.
-- Extracting source /root/workspace/vcpkg/downloads/grpc-grpc-v1.65.5.tar.gz
-- Applying patch 00001-fix-uwp.patch
-- Applying patch 00002-static-linking-in-linux.patch
-- Applying patch 00004-link-gdi32-on-windows.patch
-- Applying patch 00005-fix-uwp-error.patch
-- Applying patch 00006-utf8-range.patch
-- Applying patch 00015-disable-download-archive.patch
-- Applying patch 00016-fix-plugin-targets.patch
-- Applying patch 00017-fix-NAN-on-Win11.patch
-- Applying patch 00018-fix-windows-event-engine.patch
-- Using source at /root/workspace/vcpkg/buildtrees/grpc/src/v1.65.5-472dc5d7e8.clean
-- Configuring x64-linux
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- RELEASE Files: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/gpr.pc;/root/worksparpc++.pc;/root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc++_unsecure.pc;/root/workg/grpc.pc;/root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc_unsecure.pc
-- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/gpr.pc
-- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc++.pc
-- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc++_unsec
-- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc.pc
-- Fixing pkgconfig file: /root/workspace/vcpkg/packages/grpc_x64-linux/lib/pkgconfig/grpc_unsecur
-- Using pkg-config from: /bin/pkg-config
-- Checking package (RELEASE): gpr
-- pkg-config --exists gpr output:
-- Checking package (RELEASE): grpc++

It seems

execute_process(
        COMMAND "${PKGCONFIG}" --print-errors --exists "${package_name}"
        WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
        RESULT_VARIABLE error_var
        OUTPUT_VARIABLE output
        ERROR_VARIABLE  output
        OUTPUT_STRIP_TRAILING_WHITESPACE
        ERROR_STRIP_TRAILING_WHITESPACE
    )

This command is stuck, and now it has been waiting for more than 15 minutes without a response. Is there any way to solve this problem?

@ShineSea
Copy link
Author

I waited for a few hours and the installation was successful.

@FrankXie05
Copy link
Contributor

FrankXie05 commented Nov 22, 2024

When grpc is built, pkg-config requires resources to ensure the build proceeds. 🧐
vcpkg can only logically reduce the number of calls to pkg-config to reduce build time.

@FAKERINHEART
Copy link

FAKERINHEART commented Nov 22, 2024

you should use pkgconf instead of the old pkg-config
https://github.com/pkgconf/pkgconf

@dg0yt
Copy link
Contributor

dg0yt commented Nov 22, 2024

pkg-config is just pkgconf on modern systems. Some versions of pkgconf, and also some distributions, are known to make problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

4 participants