microsoft/vcpkg

[simdutf] Build error on x64-linux

nanoric opened this issue · 6 comments

Package: simdutf:x64-linux@5.2.2

Host Environment

  • Host: x64-linux
  • Compiler: GNU 13.2.1
  • vcpkg-tool version: 2024-03-14-7d353e869753e5609a1f1a057df3db8fd356e49d
    vcpkg-scripts version: 5fa0f07 2024-04-05 (2 days ago)

To Reproduce

vcpkg install --clean-after-build simdutf
Failure logs

-- Downloading https://github.com/simdutf/simdutf/archive/v5.2.2.tar.gz -> simdutf-simdutf-v5.2.2.tar.gz...
-- Extracting source /vcpkg/downloads/simdutf-simdutf-v5.2.2.tar.gz
-- Using source at /vcpkg/buildtrees/simdutf/src/v5.2.2-4a2e23facb.clean
-- Found external ninja('1.11.1').
-- Configuring x64-linux
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Fixing pkgconfig file: /vcpkg/packages/simdutf_x64-linux/lib/pkgconfig/simdutf.pc
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:134 (message):
  /bin/pkg-config --exists simdutf failed with error code: 1

      ENV{PKG_CONFIG_PATH}: "/vcpkg/packages/simdutf_x64-linux/lib/pkgconfig:/vcpkg/packages/simdutf_x64-linux/share/pkgconfig:/vcpkg/installed/x64-linux/lib/pkgconfig:/vcpkg/installed/x64-linux/share/pkgconfig:/gcc/lib64/pkgconfig:"
      output: Package simdutf was not found in the pkg-config search path.

  Perhaps you should add the directory containing `simdutf.pc'

  to the PKG_CONFIG_PATH environment variable

  Package 'simdutf', required by 'virtual:world', not found
Call Stack (most recent call first):
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:196 (z_vcpkg_fixup_pkgconfig_check_files)
  ports/simdutf/portfile.cmake:24 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:175 (include)

Sorry, I haven't reproduced this issue locally.
image

-- Fixing pkgconfig file: /vcpkg/packages/simdutf_x64-linux/lib/pkgconfig/simdutf.pc

At this point, the file seems to exist. So it is strange that the validation with pkg-config fails.

Can you please share

  • the file
  • the output of pkg-config --version.

cat /vcpkg/packages/simdutf_x64-linux/lib/pkgconfig/simdutf.pc

prefix=${pcfiledir}/../..
 includedir=${prefix}/include
 libdir=${prefix}/lib

 Name: simdutf
 Description: Fast Unicode validation, transcoding and processing
 URL:
 Version: 5.2.2
 Cflags: "-I${includedir}"
 Libs: "-L${libdir}" -lsimdutf

pkg-config --version

1.7.3

Maybe that old version (2020) of pkg-config which actually is pkgconf has bugs. I don't know.

I've been hit by this problem too.

My magnificent sysadmin tracked the source of this problem back to the simdutf.pc.in file here: https://github.com/simdutf/simdutf/blob/master/simdutf.pc.in

This has a leading space on every line. When he deleted the spaces, pkgconf (version 1.4.2) started working. I assume later versions of pkgconf are smart enough to strip the leading spaces? But I have no proof of that.

simdutf have released version 5.2.5 in the last 20 minutes including my fix to the .pc.in file.

@dg0yt can you update the port please? Or do you need me/someone else to do that?