microsoft / vcpkg

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

[vcpkg-tool] - post-build warnings and error: Found 1 post-build check problem(s). #29661

Closed StarGate-One closed 1 year ago

StarGate-One commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Some ports give warnings/erros on post-build checks after PR vcpkg-tool 856. Example below

cairomm error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: D:\vcpkg\ports\cairomm\portfile.cmake

Environment

To Reproduce Steps to reproduce the behavior (vcpkg classic mode, x64-windows set as default triplet, no binary caching, no manifests):

  1. .\vcpkg.exe install --recurse --keep-going --clean-buildtrees-after-build --clean-packages-after-build --no-print-usage allegro5[core] cairomm[core] fluidsynth[buildtools,core,sndfile] imgui-sfml[core] imgui[allegro5-binding,core,docking-experimental,dx10-binding,dx11-binding,dx12-binding,dx9-binding,freetype,glfw-binding,glut-binding,libigl-imgui,opengl3-binding,sdl2-binding,sdl2-renderer-binding,vulkan-binding,wchar32,win32-binding] ogre[assimp,core,freeimage,overlay,zip,zziplib] opusfile[core] sdl2-mixer[core,fluidsynth,libflac,libmodplug,libvorbis,mpg123,nativemidi,opusfile] sdl2pp[core]
  2. See console log error (showing only 3rd port cairomm being installed): Installing 3/9 cairomm:x64-windows... Building cairomm[core]:x64-windows... -- Using cached cairomm-1.16.2.tar.xz. -- Extracting source D:/vcpkg-downloads/cairomm-1.16.2.tar.xz -- Applying patch fix_include_path.patch -- Using source at D:/vcpkg/buildtrees/cairomm/src/cairomm-1-486fec65f2.clean -- Getting CMake variables for x64-windows -- Configuring x64-windows-dbg -- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst. -- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst. -- Using msys root at D:/vcpkg-downloads/tools/msys2/9a1ec3f33446b195 -- Configuring x64-windows-dbg done -- Configuring x64-windows-rel -- Configuring x64-windows-rel done -- Package x64-windows-dbg -- Package x64-windows-rel -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-ft-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-pdf-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-png-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-ps-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-svg-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-win32-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-win32-font-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-ft-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-pdf-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-png-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-ps-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-svg-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-win32-1.16.pc -- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-win32-font-1.16.pc -- Installing: D:/vcpkg/packages/cairomm_x64-windows/share/cairomm/copyright -- Performing post-build validation warning: pkgconfig directories should be one of share/pkgconfig (for header only libraries only), lib/pkgconfig, or lib/debug/pkgconfig. The following misplaced pkgconfig files were found: D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-ft-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-pdf-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-png-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-ps-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-svg-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-win32-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-win32-font-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-ft-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-pdf-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-png-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-ps-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-svg-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-win32-1.16.pc D:/vcpkg/packages/cairomm_x64-windows\lib\pkgconfig\cairomm-win32-font-1.16.pc You can move the pkgconfig files with commands similar to: file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/pkgconfig") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-ft-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-ft-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-pdf-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-pdf-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-png-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-png-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-ps-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-ps-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-svg-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-svg-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-win32-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-win32-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\debug\lib\pkgconfig\cairomm-win32-font-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-win32-font-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-ft-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-ft-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-pdf-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-pdf-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-png-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-png-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-ps-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-ps-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-svg-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-svg-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-win32-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-win32-1.16.pc") file(RENAME "${CURRENT_PACKAGES_DIR}\lib\pkgconfig\cairomm-win32-font-1.16.pc" "${CURRENT_PACKAGES_DIR}/share/pkgconfig/cairomm-win32-font-1.16.pc") vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE empty directories left by the above renames) error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: D:\vcpkg\ports\cairomm\portfile.cmake Elapsed time to handle cairomm:x64-windows: 15.45 s

Expected behavior A clear and concise description of what you expected to happen. I am not sure it even is a legit issue as the port installs and the pkgconfig shows they are for the debug build

Failure logs -(please attached failure logs) - attaching all logs although there was no failure cmake-vars-x64-windows.cmake.log cmake-vars-x64-windows-dbg.cmake.log cmake-vars-x64-windows-rel.cmake.log config-x64-windows-dbg-err.log config-x64-windows-dbg-intro-dependencies.json.log config-x64-windows-dbg-meson-log.txt.log config-x64-windows-dbg-out.log config-x64-windows-rel-err.log config-x64-windows-rel-intro-dependencies.json.log config-x64-windows-rel-meson-log.txt.log config-x64-windows-rel-out.log extract-err.log extract-out.log get-cmake-vars-x64-windows-dbg-CMakeCache.txt.log get-cmake-vars-x64-windows-err.log get-cmake-vars-x64-windows-out.log get-cmake-vars-x64-windows-rel-CMakeCache.txt.log meson-x64-windows-dbg.log meson-x64-windows-rel.log package-x64-windows-dbg-err.log package-x64-windows-dbg-out.log package-x64-windows-rel-err.log package-x64-windows-rel-out.log patch-x64-windows-0-err.log patch-x64-windows-0-out.log stdout-x64-windows.log x64-windows.vcpkg_abi_info.txt

Additional context Add any other context about the problem here.

xiaozhuai commented 1 year ago

Cannot reproduce on win10 with visual studio 2019. From your log, there is no problem with the path of the pc file. Here is the log on my machine.

Installing 1/1 cairomm:x64-windows...
Building cairomm[core]:x64-windows...
-- Using cached cairomm-1.16.2.tar.xz.
-- Extracting source D:/vcpkg/downloads/cairomm-1.16.2.tar.xz
-- Applying patch fix_include_path.patch
-- Using source at D:/vcpkg/buildtrees/cairomm/src/cairomm-1-486fec65f2.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Configuring x64-windows-dbg
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at D:/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Configuring x64-windows-dbg done
-- Configuring x64-windows-rel
-- Configuring x64-windows-rel done
-- Package x64-windows-dbg
-- Package x64-windows-rel
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-ft-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-pdf-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-png-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-ps-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-svg-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-win32-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/lib/pkgconfig/cairomm-win32-font-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-ft-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-pdf-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-png-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-ps-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-svg-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-win32-1.16.pc
-- Fixing pkgconfig file: D:/vcpkg/packages/cairomm_x64-windows/debug/lib/pkgconfig/cairomm-win32-font-1.16.pc
-- Installing: D:/vcpkg/packages/cairomm_x64-windows/share/cairomm/copyright
-- Performing post-build validation
Uploaded binaries to 1 HTTP remotes.
Elapsed time to handle cairomm:x64-windows: 11.39 s
Total install time: 13.31 s
dg0yt commented 1 year ago

Please report the vcpkg tool version. It is a post-build check by the tool. Note the mixed slashes in D:/vcpkg/packages/cairomm_x64-windows\debug\lib\pkgconfig\cairomm-ft-1.16.pc.

JonLiu1993 commented 1 year ago

@StarGate-One, Thanks for posting this issue, I use VS2022 and windows 11 can successfully install all port and features by your
command .\vcpkg.exe install --recurse --keep-going --clean-buildtrees-after-build --clean-packages-after-build --no-print-usage allegro5[core]:x64-windows cairomm[core]:x64-windows fluidsynth[buildtools,core,sndfile]:x64-windows imgui-sfml[core]:x64-windows imgui[allegro5-binding,core,docking-experimental,dx10-binding,dx11-binding,dx12-binding,dx9-binding,freetype,glfw-binding,glut-binding,libigl-imgui,opengl3-binding,sdl2-binding,sdl2-renderer-binding,vulkan-binding,wchar32,win32-binding]:x64-windows ogre[assimp,core,freeimage,overlay,zip,zziplib]:x64-windows opusfile[core]:x64-windows sdl2-mixer[core,fluidsynth,libflac,libmodplug,libvorbis,mpg123,nativemidi,opusfile]:x64-windows sdl2pp[core]:x64-windows

-- Performing post-build validation
Stored binary cache: "C:\Users\vzhli17\AppData\Local\vcpkg\archives\58\5818299d3aff9ea2b4d35ce0d860c196315c35f54661b21317060a23273ca577.zip"
Elapsed time to handle sdl2pp:x64-windows: 10.09 s
Total install time: 37.77 min
RESULTS
    ogre:x64-windows: REMOVED: 257.6 ms
    imgui:x64-windows: REMOVED: 17.9 ms
    libogg:x64-windows: SUCCEEDED: 12.95 s
    libflac:x64-windows: SUCCEEDED: 17.11 s
    libtheora:x64-windows: SUCCEEDED: 5.652 s
    libvorbis:x64-windows: SUCCEEDED: 7.847 s
    openal-soft:x64-windows: SUCCEEDED: 56.03 s
    opus:x64-windows: SUCCEEDED: 16.98 s
    opusfile:x64-windows: SUCCEEDED: 3.717 s
    physfs:x64-windows: SUCCEEDED: 4.767 s
    allegro5:x64-windows: SUCCEEDED: 52.84 s
    dirent:x64-windows: SUCCEEDED: 762.9 ms
    getopt-win32:x64-windows: SUCCEEDED: 2.524 s
    getopt:x64-windows: SUCCEEDED: 145.4 ms
    gettext:x64-windows: SUCCEEDED: 8.336 min
    gperf:x64-windows: SUCCEEDED: 6.028 s
    pthreads:x64-windows: SUCCEEDED: 17.95 s
    pthread:x64-windows: SUCCEEDED: 214 ms
    fontconfig:x64-windows: SUCCEEDED: 47.04 s
    lzo:x64-windows: SUCCEEDED: 51.99 s
    pixman:x64-windows: SUCCEEDED: 20.45 s
    cairo:x64-windows: SUCCEEDED: 59.27 s
    libsigcpp:x64-windows: SUCCEEDED: 5.634 s
    cairomm:x64-windows: SUCCEEDED: 21.01 s
    glib:x64-windows: SUCCEEDED: 2.181 min
    mp3lame:x64-windows: SUCCEEDED: 28.12 s
    yasm:x64-windows: SUCCEEDED: 25.53 s
    yasm-tool-helper:x64-windows: SUCCEEDED: 156.2 ms
    mpg123:x64-windows: SUCCEEDED: 29.38 s
    libsndfile:x64-windows: SUCCEEDED: 30.5 s
    fluidsynth:x64-windows: SUCCEEDED: 37.81 s
    glfw3:x64-windows: SUCCEEDED: 7.272 s
    vulkan:x64-windows: SUCCEEDED: 157.9 ms
    imgui:x64-windows: SUCCEEDED: 16.49 s
    sfml:x64-windows: SUCCEEDED: 42.56 s
    imgui-sfml:x64-windows: SUCCEEDED: 6.24 s
    libmodplug:x64-windows: SUCCEEDED: 11.5 s
    ogre:x64-windows: SUCCEEDED: 15.83 min
    sdl2-image:x64-windows: SUCCEEDED: 8.225 s
    sdl2-mixer:x64-windows: SUCCEEDED: 7.849 s
    sdl2-ttf:x64-windows: SUCCEEDED: 5.547 s
    sdl2pp:x64-windows: SUCCEEDED: 10.09 s

SUMMARY FOR x64-windows
    SUCCEEDED: 40
    REMOVED: 2
autoantwort commented 1 year ago

I guess you are using a build from source tool version with https://github.com/microsoft/vcpkg-tool/pull/865 included while the rest does use a vcpkg-tool version that does not include this PR.

autoantwort commented 1 year ago

@dg0yt @Neumann-A The tool now enforces that pc files, if they don't contain a Lib: ... line, to go share/pkgconfig instead of /lib/pkgconfig/ (And to /lib/pkgconfig/ and debug/lib/pkgconfig/ otherwise). This is probably a too restricting port build check...

StarGate-One commented 1 year ago

@autoantwort /cc: @BillyONeal I was using source built from vcpkg-tool 904, after Billy fixed the issue experience in issue https://github.com/microsoft/vcpkg/issues/29662 with vcpkg-tool 856. So to answer question, yes it was using vcpkg-tool commit e9487f1afae094f5ee02d332a9b56b53e4425523