Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gtk]: Enable gtk3 on windows and use shared glib when shared #11308

Closed
wants to merge 9 commits into from

Conversation

theartful
Copy link
Contributor

Specify library name and version: gtk

The major blocker for building gtk 3 on windows was LNK1170 error ; that is the linking command for gtk 3 was so big the msvc linker can't handle it even with short_paths on.

This patch fixes this by editing the ninja.build file and removing duplicates in the link arguments.

It's worth noting that for static gtk to work, it has to be built from scratch on the host device, since the location of the resources will be hard coded, and as such I propose to make gtk shared by default.


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the conan-center hook activated.

@ghost
Copy link

ghost commented Jun 21, 2022

I detected other pull requests that are modifying gtk/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit f4a621d
gtk/4.7.0
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'comctl32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'dwmapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'imm32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'setupapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'winmm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'crypt32' but it is not in cpp_info.system_libs.
gtk/4.3.2
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'crypt32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'setupapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'comctl32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'dwmapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'imm32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'winmm' but it is not in cpp_info.system_libs.
gtk/4.4.0
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'dwmapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'winmm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'comctl32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'crypt32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'imm32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'setupapi' but it is not in cpp_info.system_libs.
gtk/4.6.2
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'comctl32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'winmm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'crypt32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'imm32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'setupapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'dwmapi' but it is not in cpp_info.system_libs.
gtk/4.2.1
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'comctl32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'winmm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'crypt32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'imm32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'dwmapi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\gtk-4-1.dll' links to system library 'setupapi' but it is not in cpp_info.system_libs.

theartful added 6 commits July 1, 2022 14:17
the meson build script for gtk3 has:
- cairo_dep      = dependency('cairo', version: cairo_req, required: cc.get_id() != 'msvc')
that is cairo is not required if msvc, but this is because they use
another search criteria right after for windows
- if not cairo_dep.found() and cc.get_id() == 'msvc'
-   if cc.has_header('cairo.h') and cc.has_header('cairo-win32.h')
-     cairo_dep = cc.find_library('cairo', required: false)
-   endif
- endif
-
- if not cairo_dep.found()
-   cairo_dep      = dependency('cairo', version: cairo_req,
-                               fallback : ['cairo', 'libcairo_dep'])
- endif
and eventually cairo has to be found for gtk to be built
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@theartful theartful closed this Jul 3, 2022
@theartful theartful reopened this Jul 3, 2022
@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Jul 13, 2022
4 tasks
@conan-center-bot
Copy link
Collaborator

Failure in build 31 (7bf76052145a3d4a0b179cf6eaeaff481e0a110b):

  • gtk/4.4.0@:
    CI failed to create some packages (All logs)

    Logs for packageID dbcad92f73ef1f440147a9d7cdc0e1436c2acb42:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=gcc
    compiler.libcxx=libstdc++
    compiler.version=8
    os=Linux
    [options]
    gtk:shared=True
    
    [...]
        libpng/1.6.37:467ff13ea821860cb56c2ad8aecbd2e919deba86 - Download
        libselinux/3.3:7492981a28327864f27530e42e576c3785168063 - Download
        libtiff/4.3.0:806fba36d5562652f6f9d0d11ec44f45dfedebcf - Download
        libuuid/1.0.3:761432f3453a17c960259b5b2605153e3bcffd7d - Download
        libwebp/1.2.2:9cb84c66d3f950b57b3b86cf56808eb02a5f27d8 - Download
        libxft/2.3.4:02b536abaddeaf148106df9c9ada910b0caf6bca - Download
        lzo/2.10:761432f3453a17c960259b5b2605153e3bcffd7d - Download
        opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
        pango/1.50.7:4b4e28b2cdceba27d931f2662240093cab3ddafc - Download
        pcre/8.45:3bad01f9d936f64b519fb38e3b5aec8911dcd3f0 - Download
        pcre2/10.37:5e664bd5f078527642684c2d8aee0fe3ce716baf - Download
        pixman/0.40.0:761432f3453a17c960259b5b2605153e3bcffd7d - Download
        xorg/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
        xz_utils/5.2.5:761432f3453a17c960259b5b2605153e3bcffd7d - Download
        zlib/1.2.12:761432f3453a17c960259b5b2605153e3bcffd7d - Download
        zstd/1.5.2:b4937b9f80e5369bc75fda061a1ad94021458323 - Download
    Build requirements
        libiconv/1.16 from 'conan-center' - Downloaded
        libsass/3.6.4 from 'conan-center' - Downloaded
        libxml2/2.9.14 from 'conan-center' - Downloaded
        meson/0.62.2 from 'conan-center' - Downloaded
        ninja/1.10.2 from 'conan-center' - Downloaded
        pkgconf/1.7.4 from 'conan-center' - Downloaded
        sassc/3.6.2 from 'conan-center' - Downloaded
    Build requirements packages
        libiconv/1.16:761432f3453a17c960259b5b2605153e3bcffd7d - Download
        libsass/3.6.4:ab4797bac78775d9e373e5fbcbd9b3fb01264904 - Download
        libxml2/2.9.14:abb2e8f04876988d078512879a47a843140f0ba2 - Download
        meson/0.62.2:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
        ninja/1.10.2:cc9f9b2b9f92fc82888026414560bf79d8c3a052 - Download
        pkgconf/1.7.4:cc9f9b2b9f92fc82888026414560bf79d8c3a052 - Download
        sassc/3.6.2:b0e79e71a8f1ea4dc51e4cfcb9e0b60fe5ed9671 - Download
    
    Installing (downloading, building) binaries...
    
    WARN: libxft/2.3.4: requirement freetype/2.11.1 overridden by pango/1.50.7 to freetype/2.12.1 
    WARN: harfbuzz/4.3.0: requirement glib/2.73.1 overridden by pango/1.50.7 to glib/2.73.0 
    ERROR: Missing binary: harfbuzz/4.3.0:d66df390cf9319491d8845a81ef1f1cd40627e0f
    harfbuzz/4.3.0: WARN: Can't find a 'harfbuzz/4.3.0' package for the specified settings, options and dependencies:
    - Settings: arch=x86_64, build_type=Debug, compiler=gcc, compiler.libcxx=libstdc++, compiler.version=8, os=Linux
    - Options: shared=True, with_freetype=True, with_glib=True, with_icu=False, with_subset=False, brotli:fPIC=True, brotli:shared=False, bzip2:build_executable=True, bzip2:fPIC=True, bzip2:shared=False, freetype:fPIC=True, freetype:shared=False, freetype:subpixel=False, freetype:with_brotli=True, freetype:with_bzip2=True, freetype:with_png=True, freetype:with_zlib=True, glib:shared=True, glib:with_elf=True, glib:with_mount=True, glib:with_pcre=True, glib:with_selinux=True, libelf:fPIC=True, libelf:shared=False, libffi:fPIC=True, libffi:shared=False, libmount:fPIC=True, libmount:shared=False, libpng:api_prefix=, libpng:fPIC=True, libpng:shared=False, libpng:sse=True, libselinux:fPIC=True, libselinux:shared=False, pcre:build_pcre_16=True, pcre:build_pcre_32=True, pcre:build_pcre_8=True, pcre:build_pcrecpp=False, pcre:build_pcregrep=True, pcre:fPIC=True, pcre:shared=False, pcre:with_bzip2=True, pcre:with_jit=False, pcre:with_stack_for_recursion=True, pcre:with_unicode_properties=True, pcre:with_utf=True, pcre:with_zlib=True, pcre2:build_pcre2_16=True, pcre2:build_pcre2_32=True, pcre2:build_pcre2_8=True, pcre2:build_pcre2grep=True, pcre2:fPIC=True, pcre2:shared=False, pcre2:support_jit=False, pcre2:with_bzip2=True, pcre2:with_zlib=True, zlib:fPIC=True, zlib:shared=False
    - Dependencies: freetype/2.12.1, glib/2.73.0
    - Requirements: freetype/2.Y.Z, glib/2.73.0:34f239b81fd896e28e17d44b62c43ac5f8055894
    - Package ID: d66df390cf9319491d8845a81ef1f1cd40627e0f
    
    ERROR: Missing prebuilt package for 'harfbuzz/4.3.0'
    Use 'conan search harfbuzz/4.3.0 --table=table.html -r=remote' and open the table.html file to see available packages
    Or try to build locally from sources with '--build=harfbuzz'
    
    More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'
    
  • gtk/4.7.0@:
    Didn't run or was cancelled before finishing

  • gtk/4.1.2@:
    Didn't run or was cancelled before finishing

  • gtk/3.24.24@:
    Didn't run or was cancelled before finishing

  • gtk/3.24.34@:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants