microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.38k stars 6.46k forks source link

[pkgconf] Segmentation Fault when running the binary #41576

Open aabellagm opened 1 month ago

aabellagm commented 1 month ago

Describe the bug The pkgconf binary crashes (Segmentation Fault) in Fedora 41. That causes errors when building other packages, like ffmpeg.

Environment

To Reproduce Steps to reproduce the behavior:

  1. ./vcpkg install pkgconf
  2. ./installed/x64-linux/tools/pkgconf/pkgconf --version Segmentation fault (core dumped)

Expected behavior The command above should just run and print the version and it also should allow ffmpeg to be correctly built.

Additional context

Call Stack (most recent call first): ports/ffmpeg/portfile.cmake:874 (x_vcpkg_pkgconfig_get_modules) scripts/ports.cmake:192 (include)

error: building ffmpeg:x64-linux failed with: BUILD_FAILED <·······················>

Osyotr commented 1 month ago

Do you use system patchelf or vcpkg patchelf? If it comes from the system, could you try with --x-abi-tools-use-exact-versions?

aabellagm commented 1 month ago

I don't have patchelf installed in my system, so I guess it is using the one in VCPKG. I installed it, just in case it makes any difference, but nop, pkgconf crashes in the same way, with and without --x-abi-tools-use-exact-versions

JonLiu1993 commented 1 month ago

@aabellagm, Thanks for posting this issue, We don't have a Fedora environment at the moment. I haven't reproduced your error in my own Linux environment.

Elapsed time to handle pkgconf:x64-linux: 4.7 s
pkgconf:x64-linux package ABI: f2df7b47cdc541af74be1739210c641e55eb4caed05403b27abf8aef61ab1a9e
Total install time: 4.7 s
pkgconf provides pkg-config modules:

  # a library for accessing and manipulating development framework configuration
  libpkgconf

test@docker:~/Jon/vcpkg$ ./installed/x64-linux/tools/pkgconf/pkgconf --version
2.3.0
aabellagm commented 1 month ago

FTR: I've reproduced it with a small binary and it is reported here: Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2319341

aabellagm commented 1 month ago

FTR: It has been reported upstream by the Red Hat people: https://github.com/NixOS/patchelf/issues/568