[vcpkg-make] default --prefix not passed to ./configure on fresh autotools builds → install lands under usr/local, vcpkg_fixup_pkgconfig fails (repro: jemalloc)
Nobody has claimed this yet.
- Dominant language
- CMake
- Stars
- 27.5k
- Forks
- 7.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 321
Description
Summary
Under vcpkg baseline 56bb2411609227288b70117ead2c47585ba07713 (release 2026.04.27; host vcpkg-make ~2026-01-01), vcpkg_make_configure's default path/configure options — which carry --prefix=${CURRENT_INSTALLED_DIR} — do not reach the port's ./configure. Only a portfile's explicit OPTIONS pass through. With no --prefix, autotools configure defaults prefix=/usr/local, so make install DESTDIR=… lands files under <pkg>/usr/local; vcpkg_make_install's package-root rename (keyed on ${CURRENT_INSTALLED_DIR}) never fires; the .pc is stranded at usr/local/lib/pkgconfig; and vcpkg_fixup_pkgconfig aborts the build.
This is latent behind the binary cache — a pre-regression binary restores in milliseconds, so it only surfaces on a fresh build (cache eviction, baseline bump, or an overlay edit that re-keys the ABI).
Repro
- Triplet
x64-linux, cleanubuntu:24.04, baseline56bb2411, binary cache cleared (fresh build). - Build an autotools port that relies on
vcpkg_make_configure's default prefix propagation (observed withjemalloc5.3.1). config.logshows./configureinvoked with no--prefix(e.g. only./configure --enable-prof).- Build fails at
vcpkg_fixup_pkgconfig; the.pcis at…/usr/local/lib/pkgconfig/<port>.pcinstead of…/lib/pkgconfig/.
Scope
Leans generic to vcpkg-make, not port-specific: the default-options function appends --prefix unconditionally (no per-port gate), and the drop is in the generic OPTIONS-assembly → configure path. A second fresh autotools-port build would settle it definitively. Possibly the same root cause as #50681 ([libb2] Build error on arm64-osx (pkg-config issue)).
Workaround (consumer side)
Pass the prefix + install-dir layout explicitly via per-config OPTIONS_RELEASE / OPTIONS_DEBUG (these do reach configure), mirroring vcpkg_make_common.cmake's own default-options block (RELEASE path_suffix "", DEBUG /debug). After that, config.log shows ./configure … --prefix=<CURRENT_INSTALLED_DIR> '--libdir=${prefix}/lib' … and the .pc lands correctly under lib/pkgconfig (release) / debug/lib/pkgconfig (debug).
Environment
- vcpkg baseline
56bb2411609227288b70117ead2c47585ba07713(release 2026.04.27) x64-linux,ubuntu:24.04- host
vcpkg-makeat the ~2026-01-01 revision
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the default-options block in vcpkg_make_common.cmake and trace how its OPTIONS are assembled before reaching ./configure. Reproduce a clean jemalloc build with the binary cache cleared, then inspect config.log and the installed .pc path. Done means the default --prefix and layout options reach configure and vcpkg_fixup_pkgconfig succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100