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

[fontconfig] build failure #15931

Closed
andresy opened this issue Jan 28, 2021 · 5 comments
Closed

[fontconfig] build failure #15931

andresy opened this issue Jan 28, 2021 · 5 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@andresy
Copy link

andresy commented Jan 28, 2021

Host Environment

  • OS: Linux
  • Compiler: gcc 9.3.0

To Reproduce
Steps to reproduce the behavior:

This assumes gperf is not available system-wide, but only through vcpkg.

./vcpkg install gperf
./vcpkg install fontconfig

Failure logs

Building package fontconfig[core]:x64-linux...
-- Using cached /private/home/locronan/vcpkg/downloads/fontconfig-fontconfig-844d8709a1f3ecab45015b24b72dd775c13b2421.tar.gz
-- Cleaning sources at /private/home/locronan/vcpkg/buildtrees/fontconfig/src/75c13b2421-4651fd65ce.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /private/home/locronan/vcpkg/downloads/fontconfig-fontconfig-844d8709a1f3ecab45015b24b72dd775c13b2421.tar.gz
-- Applying patch remove_tests.patch
-- Applying patch build.patch
-- Applying patch build2.patch
-- Applying patch disable-install-data.patch
-- Using source at /private/home/locronan/vcpkg/buildtrees/fontconfig/src/75c13b2421-4651fd65ce.clean
CMake Error at scripts/cmake/vcpkg_find_acquire_program.cmake:535 (message):
  Could not find gperf.  Please install it via your package manager.
Call Stack (most recent call first):
  ports/fontconfig/portfile.cmake:21 (vcpkg_find_acquire_program)
  scripts/ports.cmake:128 (include)


Error: Building package fontconfig:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: fontconfig:x64-linux
  Vcpkg version: 2021-01-13-unknownhash

Additional context

It looks like fontconfig relies on gperf (via vcpkg_find_acquire_program). When gperf is installed via vcpkg (not system install), fontconfig is unable to find gperf.

A workaround is to manually add in PATH the vcpkg gperf executable path, but I believe this should be automated.

@NancyLi1013
Copy link
Contributor

Hi @andresy

Thanks for posting this issue.

Currently, ports depend on the tools in vcpkg to build via vcpkg_find_acquire_program. Since the tool gperf is only supported on Windows, you need to install it manually via apt-get install gperf on Unix platform.

But you can post these issues there #6045.

@NancyLi1013 NancyLi1013 added the category:port-bug The issue is with a library, which is something the port should already support label Jan 29, 2021
@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) and removed category:port-bug The issue is with a library, which is something the port should already support labels Jan 29, 2021
@JackBoosY
Copy link
Contributor

I think we should add our tool path to head of CMAKE_PROGRAM_PATH.

@BillyONeal @ras0219 what do you think about?

@JackBoosY JackBoosY self-assigned this Jan 29, 2021
@BillyONeal
Copy link
Member

I think we should add our tool path to head of CMAKE_PROGRAM_PATH.

I believe not doing that and wanting porfile.cmakes to explicitly handle each of their dependencies is intended to discourage "accidental dependencies".

@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support and removed category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) labels Feb 1, 2021
@FrankXie05
Copy link
Contributor

@andresy Is still working for this issue, I didn't reproduce it locally. Make sure your vcpkg library is updated to the latest version and try again. If you still have questions, please reply to me. :)

test:~/test/vcpkg$ ./vcpkg install gperf
Computing installation plan...
The following packages will be built and installed:
    gperf[core]:x64-linux -> 3.1#3
Detecting compiler hash for triplet x64-linux...
Restored 0 packages from /home/test/.cache/vcpkg/archives in 49.47 ms. Use --debug to see more details.
Starting package 1/1: gperf:x64-linux
Building package gperf[core]:x64-linux...
-- Downloading http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz -> gperf-3.1.tar.gz...
-- Extracting source /home/test/test/vcpkg/downloads/gperf-3.1.tar.gz
-- Using source at /home/test/test/vcpkg/buildtrees/gperf/src/gperf-3-d4135ad4b1.clean
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Installing: /home/test/test/vcpkg/packages/gperf_x64-linux/share/gperf/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: /home/test/.cache/vcpkg/archives/2a/2afbf7aba7bdf4dbdd8deaf584c8fe037a94360ada856756b0fa43d951d3f617.zip
Installing package gperf[core]:x64-linux...
Elapsed time for package gperf:x64-linux: 3.426 s

Total elapsed time: 3.889 s

test:~/test/vcpkg$ ./vcpkg install fontconfig
Computing installation plan...
The following packages will be built and installed:
    fontconfig[core]:x64-linux -> 2.13.94#5
Detecting compiler hash for triplet x64-linux...
Restored 1 packages from /home/test/.cache/vcpkg/archives in 249.4 ms. Use --debug to see more details.
Starting package 1/1: fontconfig:x64-linux
Installing package fontconfig[core]:x64-linux...
Elapsed time for package fontconfig:x64-linux: 38.88 ms

Total elapsed time: 707.3 ms

@FrankXie05
Copy link
Contributor

Fixed by PR #24677

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

No branches or pull requests

5 participants