[MacPorts] #69643: gstreamer1 @1.24.1_0+universal: linking of temporary binary failed

MacPorts noreply at macports.org
Mon Apr 1 21:02:35 UTC 2024


#69643: gstreamer1 @1.24.1_0+universal: linking of temporary binary failed
-------------------------+-------------------------------
  Reporter:  thetrial    |      Owner:  barracuda156
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.9.1
Resolution:              |   Keywords:  legacy-os, sierra
      Port:  gstreamer1  |
-------------------------+-------------------------------
Changes (by ryandesign):

 * owner:  (none) => barracuda156
 * status:  new => assigned


Comment:

 I see this in the log which may not be related to the problem you're
 seeing but definitely looks wrong:

 {{{
 :info:build ../gstreamer-1.24.1-x86_64/plugins/tracers/gstrusage.c:50:5:
 warning: 'MAC_OS_X_VERSION_MIN_REQUIRED' is not defined, evaluates to 0
 [-Wundef]
 :info:build #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
 :info:build     ^
 :info:build ../gstreamer-1.24.1-x86_64/plugins/tracers/gstrusage.c:333:5:
 warning: 'MAC_OS_X_VERSION_MIN_REQUIRED' is not defined, evaluates to 0
 [-Wundef]
 :info:build #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
 :info:build     ^
 :info:build 2 warnings generated.
 }}}

 This block of code, whatever it is, is intended for macOS versions earlier
 than 10.5, but because `MAC_OS_X_VERSION_MIN_REQUIRED` is not defined and
 evaluates to `0`, it is taking effect for all versions of macOS. This file
 needs to `#include <AvailabilityMacros.h>` to get the definition of
 `MAC_OS_X_VERSION_MIN_REQUIRED`.

 As for the real problem in the log, I see you're building universal and
 that this port uses the muniversal portgroup so it builds the different
 architectures separately. I'm seeing a successful build of the x86_64 part
 but the i386 part fails because the right arch flags have not been used
 for everything, specifically not when building the temporary binary used
 for gobject introspection:

 {{{
 :info:build linking of temporary binary failed: Command
 '['/usr/bin/clang', '-o',
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1/gstreamer1/work/build-i386
 /tmp-introspectpzl0fa8a/Gst-1.0',
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1/gstreamer1/work/build-i386
 /tmp-introspectpzl0fa8a/Gst-1.0.o', '-L.', '-Wl,-rpath,.',
 '-L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1/gstreamer1/work/build-i386/gst',
 '-Wl,-rpath,/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1/gstreamer1/work/build-i386/gst',
 '-lgstreamer-1.0', '-lgobject-2.0', '-lglib-2.0', '-lintl',
 '-lgmodule-2.0', '-lm', '-ldl', '-lgirepository-1.0', '-lgio-2.0',
 '-lgobject-2.0', '-lgmodule-2.0', '-lglib-2.0', '-lintl']' returned non-
 zero exit status 1.
 }}}

 Since there were no `-arch` flags here, it built for the default arch
 x86_64 and was unable to link with the i386 flavor of the library that was
 just built:

 {{{
 :info:build ld: warning: ignoring file
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1/gstreamer1/work/build-i386/gst/libgstreamer-1.0.dylib,
 file was built for i386 which is not the architecture being linked
 (x86_64):
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1/gstreamer1/work/build-i386/gst/libgstreamer-1.0.dylib
 }}}

 As a result, all of the symbols that that library should provide are
 undefined:

 {{{
 :info:build Undefined symbols for architecture x86_64:
 :info:build   "_gst_allocation_params_get_type", referenced from:
 :info:build       _GI_GET_TYPE_FUNCS_ in Gst-1.0.o
 :info:build   "_gst_allocator_flags_get_type", referenced from:
 :info:build       _GI_GET_TYPE_FUNCS_ in Gst-1.0.o
 …
 }}}

 This is exactly the problem that the gobject_introspection 1.0 portgroup
 was designed to solve. The port used to include that portgroup until
 yesterday when [changeset:f1deda0b5165af7be670c2505c66123ea4cf59df
 /macports-ports the port was updated to a new version and its build system
 was switched to meson]. The gobject_introspection 1.0 portgroup was
 designed for the autotools build system and I don't know if it works with
 the meson build system. If not, hopefully it can be enhanced to do so.
 I've seen many ports remove the inclusion of the gobject_introspection 1.0
 portgroup and instead copy/paste code into the Portfile to handle the
 situation, a practice I would really love to see the end of. That's why we
 have portgroups: to consolidate common logic in one place.

-- 
Ticket URL: <https://trac.macports.org/ticket/69643#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list