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

Modify glib port to use 2.58.3 with patches for static lib #12094

Closed
zcream opened this issue Jun 24, 2020 · 6 comments
Closed

Modify glib port to use 2.58.3 with patches for static lib #12094

zcream opened this issue Jun 24, 2020 · 6 comments
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@zcream
Copy link

zcream commented Jun 24, 2020

I have patches for glib 2.58.3 that have worked previously for a static build. I have modified portfile.cmake to incorporate these patches.
I am stuck at the error

scripts/cmake/vcpkg_configure_cmake.cmake:299 (vcpkg_execute_required_process)
ports/glib/portfile.cmake:38 (vcpkg_configure_cmake)
scripts/ports.cmake:73 (include)

glib-changes.zip

-- Downloading https://ftp.gnome.org/pub/gnome/sources/glib/2.58/glib-2.58.3.tar.xz...
-- Extracting source C:/Users/Administrator/vcpkg/downloads/glib-2.58.3.tar.xz
-- Applying patch 0001.patch
-- Applying patch 0002.patch
-- Using source at C:/Users/Administrator/vcpkg/buildtrees/glib/src/2.58.3-27c0cc6a70
-- Configuring x86-windows-static
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
Command failed: ninja -v
Working Directory: C:/Users/Administrator/vcpkg/buildtrees/glib/x86-windows-static-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\Users\Administrator\vcpkg\buildtrees\glib\config-x86-windows-static-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:299 (vcpkg_execute_required_process)
ports/glib/portfile.cmake:38 (vcpkg_configure_cmake)
scripts/ports.cmake:73 (include)

Error: Building package glib:x86-windows-static failed with: BUILD_FAILED

@zcream zcream changed the title Modify gib for static lib Modify glib port to use 2.58.3 with patches for static lib Jun 24, 2020
@zcream
Copy link
Author

zcream commented Jun 24, 2020

I need to pass these pre-processor defines to the glib sources.
GLIB_STATIC_COMPILATION=1 G_INTL_STATIC_COMPILATION=1

I cannot figure out how to do that.

@ghost
Copy link

ghost commented Jun 24, 2020

Please attach the C:\Users\Administrator\vcpkg\buildtrees\glib\config-x86-windows-static-out.log so we can see what errors are being produced and may be able to assist further.

@NancyLi1013 NancyLi1013 added the requires:more-information This Issue requires more information to solve label Jun 28, 2020
@zcream
Copy link
Author

zcream commented Jun 28, 2020

I was able to use the patches offered by magicfoo https://github.com/microsoft/vcpkg/pull/9031/files# in order to do a static build of the current 2.52.3 version.
I have deleted the 2.58.3 and no longer have that. However, I would recommend integrating the magicfoo patches in the current build.

@NancyLi1013
Copy link
Contributor

Glib cannot be built as a static lib in vcpkg. Please refer to the comments here #9031 (comment).

@NancyLi1013 NancyLi1013 added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist and removed requires:more-information This Issue requires more information to solve labels Jul 3, 2020
@darkstar
Copy link

I tried building a static glib version today. Got this error:

Building package glib[core]:x64-windows-static...
Could not locate cached archive: C:\Users\Drueing\AppData\Local\vcpkg/archives\27\276f60b76f3dbcd9db27a2916d3a032ebbbb7f40.zip
-- Note: glib only supports dynamic library linkage. Building dynamic library.
CMake Error at scripts/cmake/vcpkg_check_linkage.cmake:42 (message):
  Refusing to build unexpected dynamic library against the static CRT.  If
  this is desired, please configure your triplet to directly request this
  configuration.
Call Stack (most recent call first):
  ports/glib/portfile.cmake:6 (vcpkg_check_linkage)
  scripts/ports.cmake:79 (include)

However, I know I have successfully built glib as static library by hand before, and there are even patches that allow this (like the one here: https://gitlab.gnome.org/GNOME/glib/-/issues/692)

It would be great to have one of those patches in vcpkg

@NancyLi1013
Copy link
Contributor

Thanks for everyone joining the discussion. Since it's duplicated to #3409, let's track this issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

3 participants