microsoft / vcpkg

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

gtk 4.10.4#1 installation #32618

Closed rubenh2905 closed 1 year ago

rubenh2905 commented 1 year ago

Describe the bug I'm trying to install the gtk4 using vcpkg, it's saying that it's installed but i cant find the .pc file anywhere

Environment

To Reproduce Steps to reproduce the behavior:

  1. vcpkg install gtk
  2. in explorer search the *4*.pc or *.pc or *.dll
  3. i cant find anything that say gtk

Expected behavior Use the builded file with pkg-config that needs .pc file to compile a rust code, it did found gio, glib, etc... but not gtk4.pc

Failure logs


C:\tools\vcpkg>vcpkg search gtk
atkmm                    2.36.1#2         atkmm is the official C++ interface for the ATK accessibility toolkit libr...
gtk                      4.10.4#1         Portable library for creating graphical user interfaces.
gtk[introspection]                        build with introspection
gtk3                     3.24.38          Portable library for creating graphical user interfaces.
gtk3[introspection]                       build with introspection
gtkmm                    4.10.0#1         gtkmm is the official C++ interface for the popular GUI library GTK+.
libcanberra[gtk3]                         Enable optional GTK3 support
opencv[gtk]                               GTK support for opencv
opencv2[gtk]                              GTK support for opencv
opencv3[gtk]                              GTK support for opencv
opencv4[gtk]                              GTK support for opencv
scintilla                4.4.6#2          A free source code editing component for Win32, GTK+, and OS X
The result may be outdated. Run `git pull` to get the latest results.
If your port is not listed, please open an issue at and/or consider making a pull request.    -  https://github.com/Microsoft/vcpkg/issues

C:\tools\vcpkg>vcpkg install gtk
warning: Starting with the September 2023 release, the default triplet for vcpkg libraries will change from x86-windows to the detected host triplet (x64-windows). To resolve this message, add --triplet x86-windows to keep the same behavior.
Computing installation plan...
The following packages will be rebuilt:
  * cairo[core,fontconfig,freetype,gobject]:x64-windows -> 1.17.8#3
  * fontconfig:x64-windows -> 2.14.2
  * gdk-pixbuf:x64-windows -> 2.42.10#1
  * gdk-pixbuf:x86-windows -> 2.42.10#1
  * gettext[core,tools]:x64-windows -> 0.21.1#2
  * glib:x64-windows -> 2.76.3#1
  * graphene:x64-windows -> 1.10.8#2
  * graphene:x86-windows -> 1.10.8#2
  * harfbuzz[core,glib]:x86-windows -> 8.0.0
  * pango:x86-windows -> 1.50.14#2
  * pango:x64-windows -> 1.50.14#2
The following packages will be built and installed:
  * atk:x86-windows -> 2.38.0#7
    gtk:x86-windows -> 4.10.4#1
  * libepoxy:x86-windows -> 1.5.10#2
  * libsass:x64-windows -> 3.6.5#1
  * sassc:x64-windows -> 3.6.2
Additional packages (*) will be modified to complete this operation.
warning: If you are sure you want to rebuild the above packages, run the command with the --recurse option.

C:\tools\vcpkg>

C:\Users\Administrator\Documents\IdeaProjectsRust\rust-gtk-test1>cargo build
   Compiling gdk4-sys v0.6.3
   Compiling gsk4-sys v0.6.3
   Compiling gtk4-sys v0.6.3
error: failed to run custom build command for `gdk4-sys v0.6.3`

Caused by:
  process didn't exit successfully: `C:\Users\Administrator\Documents\IdeaProjectsRust\rust-gtk-test1\target\debug\build\gdk4-sys-eda4a84fd6baad28\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  `"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
  error: could not find system library 'gtk4' required by the 'gdk4-sys' crate

  --- stderr
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found

warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: `"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1

error: failed to run custom build command for `gsk4-sys v0.6.3`

Caused by:
  process didn't exit successfully: `C:\Users\Administrator\Documents\IdeaProjectsRust\rust-gtk-test1\target\debug\build\gsk4-sys-c036d46edbd74df6\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
  error: could not find system library 'gtk4' required by the 'gsk4-sys' crate

  --- stderr
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found

The following warnings were emitted during compilation:

warning: `"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1

error: failed to run custom build command for `gtk4-sys v0.6.3`

Caused by:
  process didn't exit successfully: `C:\Users\Administrator\Documents\IdeaProjectsRust\rust-gtk-test1\target\debug\build\gtk4-sys-93112f521c44df8d\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=`"pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.0.0"` did not exit successfully: exit code: 1
  error: could not find system library 'gtk4' required by the 'gtk4-sys' crate

  --- stderr
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found
  Package gtk4 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk4.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk4' found

C:\Users\Administrator\Documents\IdeaProjectsRust\rust-gtk-test1>

Additional context

image image

Adela0814 commented 1 year ago

Please find .pc file from vcpkg\installed\x64-windows\lib\pkgconfig\: image

rubenh2905 commented 1 year ago

i should install gtk 4.10.4#1 Portable library for creating graphical user interfaces. or gtk[introspection] build with introspection

Adela0814 commented 1 year ago

gtk [introspection] means enabling the introspectionfeature. If you need to use introspectionrelated functions, you can use the command vcpkg install gtk[introspection] to install. If you don't need it, you can install it directly by vcpkg install gtk.

rubenh2905 commented 1 year ago

image as you can see i have already added this to path and pkg-config can find the *.pc files, path changed from /tools/vcpkg to /vcpkg because of last night i'm was testing and reinstalling, the gtkmm installed after this and worked fine but gtk[introspection] and gtk have there own problems for me, gtk did not generate the .pc file and gtk[introspection] bet build error at gtk[core,introspection] build stepone one of the port cmake files, idk what was it for when i'm was reding older issues i got something that have same but on ubuntu that was saying it was for wron glib version ? i just installed ffmpeg (normal one not the all one) befor the gtk, maybe this was the issue ? if you need the logs i can try to reinstall it again with a fresh vcpkg