pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: glib2 build failure on Darwin aarch64



On Thu, May 18, 2023 at 05:36:18PM -0500, Jason Bacon wrote:
> I'm looking into the error below on my Mac M1 with Ventura (macOS 13).
> If someone already knows the solution, please chime in.

Perhaps the attached PR?
 Thomas
--- Begin Message ---
>Number:         57415
>Category:       pkg
>Synopsis:       devel/glib2 build does not complete on macOS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 17 15:00:01 +0000 2023
>Originator:     jonathan buschmann
>Release:        pkgsrc trunk / HEAD
>Organization:
>Environment:
sw_vers
ProductName:    macOS
ProductVersion: 12.6.5
BuildVersion:   21G531

Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

XCode 14.2
>Description:
devel/glib2 fails to complete the build process due to the fact that the binary used for generating/compiling the tests is dependent on a library not yet installed.
>How-To-Repeat:

>Fix:
Fix is to use `DYLD_FALLBACK_LIBRARY_PATH` to allow this tool to find the dynamic libraries and run correctly.

diff --git c/devel/glib2/distinfo i/devel/glib2/distinfo
index 755c5ecc0c6..cabcd350f6a 100644
--- c/devel/glib2/distinfo
+++ i/devel/glib2/distinfo
@@ -13,7 +13,7 @@ SHA1 (patch-gio_gunixmounts.c) = 48b6945fde5b1721ca246eb7e79f73b5b480e816
 SHA1 (patch-gio_inotify_inotify-kernel.c) = 78544b4c32ef3b44e8721b1c07407f46a9e8c8a4
 SHA1 (patch-gio_meson.build) = c2900405ed83fa84d5590b83c7bcf6f994694388
 SHA1 (patch-gio_tests_gdbus-export.c) = 59d85ca079d02b52e33153c7d2ac1cc48c26707a
-SHA1 (patch-gio_tests_meson.build) = 88dad0c56d7d5a4915b20745a7d582039163d852
+SHA1 (patch-gio_tests_meson.build) = 6e02b4b16b7e668e91b6d308b70c3e5492aef038
 SHA1 (patch-glib_gatomic.c) = deb2e74010523ad41ce141aa2f49b807ba2672e6
 SHA1 (patch-glib_gatomic.h) = d1c39c3594a5c89d196349e5eafb5512795f55f8
 SHA1 (patch-glib_genviron.c) = dd25be36536d56dfe933225d785eb65f753c4a97
diff --git c/devel/glib2/patches/patch-gio_tests_meson.build i/devel/glib2/patches/patch-gio_tests_meson.build
index f03781e38f4..408b549f70a 100644
--- c/devel/glib2/patches/patch-gio_tests_meson.build
+++ i/devel/glib2/patches/patch-gio_tests_meson.build
@@ -1,62 +1,83 @@
 $NetBSD: patch-gio_tests_meson.build,v 1.6 2023/05/11 04:43:36 schmonz Exp $
 
-Work around PR pkg/57399.
+Work around PR pkg/57399. + DYLD_LIBRARY_PATH for macOS
 
---- gio/tests/meson.build.orig	2023-02-23 13:54:27.000000000 +0000
-+++ gio/tests/meson.build
-@@ -662,6 +662,7 @@ if meson.can_run_host_binaries()
+--- gio/tests/meson.build	2023-02-23 21:54:27.000000000 +0800
++++ gio/tests/meson.build	2023-05-16 13:37:44.000000000 +0800
+@@ -662,6 +662,10 @@
      plugin_resources_c = custom_target('plugin-resources.c',
        input : 'test4.gresource.xml',
        output : 'plugin-resources.c',
-+      env : {'LC_ALL': 'en_US.UTF-8'},
++      env : {
++        'LC_ALL': 'en_US.UTF-8',
++        'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++      },
        command : [glib_compile_resources,
                   compiler_type,
                   '--target=@OUTPUT@',
-@@ -690,6 +691,7 @@ if meson.can_run_host_binaries()
+@@ -690,6 +694,10 @@
    test_gresource = custom_target('test.gresource',
      input : 'test.gresource.xml',
      output : 'test.gresource',
-+    env : {'LC_ALL': 'en_US.UTF-8'},
++    env : {
++      'LC_ALL': 'en_US.UTF-8',
++      'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++    },
      command : [glib_compile_resources,
                 compiler_type,
                 '--target=@OUTPUT@',
-@@ -704,6 +706,7 @@ if meson.can_run_host_binaries()
+@@ -704,6 +712,10 @@
    test_resources2_c = custom_target('test_resources2.c',
      input : 'test3.gresource.xml',
      output : 'test_resources2.c',
-+    env : {'LC_ALL': 'en_US.UTF-8'},
++    env : {
++      'LC_ALL': 'en_US.UTF-8',
++      'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++    },
      command : [glib_compile_resources,
                 compiler_type,
                 '--target=@OUTPUT@',
-@@ -717,6 +720,7 @@ if meson.can_run_host_binaries()
+@@ -717,6 +729,10 @@
    test_resources2_h = custom_target('test_resources2.h',
      input : 'test3.gresource.xml',
      output : 'test_resources2.h',
-+    env : {'LC_ALL': 'en_US.UTF-8'},
++    env : {
++      'LC_ALL': 'en_US.UTF-8',
++      'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++    },
      command : [glib_compile_resources,
                 compiler_type,
                 '--target=@OUTPUT@',
-@@ -731,6 +735,7 @@ if meson.can_run_host_binaries()
+@@ -731,6 +747,10 @@
      input : 'test2.gresource.xml',
      depends : big_test_resource,
      output : 'test_resources.c',
-+    env : {'LC_ALL': 'en_US.UTF-8'},
++    env : {
++      'LC_ALL': 'en_US.UTF-8',
++      'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++    },
      command : [glib_compile_resources,
                 compiler_type,
                 '--target=@OUTPUT@',
-@@ -744,6 +749,7 @@ if meson.can_run_host_binaries()
+@@ -744,6 +764,10 @@
    digit_test_resources_c = custom_target('digit_test_resources.c',
      input : '111_digit_test.gresource.xml',
      output : 'digit_test_resources.c',
-+    env : {'LC_ALL': 'en_US.UTF-8'},
++    env : {
++      'LC_ALL': 'en_US.UTF-8',
++      'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++    },
      command : [glib_compile_resources,
                 compiler_type,
                 '--target=@OUTPUT@',
-@@ -757,6 +763,7 @@ if meson.can_run_host_binaries()
+@@ -757,6 +781,10 @@
    digit_test_resources_h = custom_target('digit_test_resources.h',
      input : '111_digit_test.gresource.xml',
      output : 'digit_test_resources.h',
-+    env : {'LC_ALL': 'en_US.UTF-8'},
++    env : {
++      'LC_ALL': 'en_US.UTF-8',
++      'DYLD_FALLBACK_LIBRARY_PATH': '@0@/glib:@0@/gio:@0@/gobject:@0@/gmodule'.replace('@0@', meson.project_build_root())
++    },
      command : [glib_compile_resources,
                 compiler_type,
                 '--target=@OUTPUT@',


--- End Message ---


Home | Main Index | Thread Index | Old Index