[MacPorts] #56495: gstreamer1-gst-plugins-base @1.14.1 +universal: error: -fobjc-arc is not supported on platforms using the legacy runtime

MacPorts noreply at macports.org
Sun Jun 24 22:30:29 UTC 2018


#56495: gstreamer1-gst-plugins-base @1.14.1 +universal: error: -fobjc-arc is not
supported on platforms using the legacy runtime
------------------------------------------+-----------------------
  Reporter:  ryandesign                   |      Owner:  (none)
      Type:  defect                       |     Status:  new
  Priority:  Normal                       |  Milestone:
 Component:  ports                        |    Version:
Resolution:                               |   Keywords:  legacy-os
      Port:  gstreamer1-gst-plugins-base  |
------------------------------------------+-----------------------

Comment (by Ionic):

 This seems to work around the issue and provide a cleanish upgrade path
 without manual user intervention:

 {{{
 #!diff
 diff --git a/gnome/gstreamer1-gst-plugins-base/Portfile b/gnome/gstreamer1
 -gst-plugins-base/Portfile
 index ff1e52c483..15b60a2cd7 100644
 --- a/gnome/gstreamer1-gst-plugins-base/Portfile
 +++ b/gnome/gstreamer1-gst-plugins-base/Portfile
 @@ -51,6 +51,7 @@ configure.args-append \
                      --disable-ivorbis \
                      --disable-x \
                      --disable-xvideo \
 +                    --disable-cocoa \
                      --disable-xshm

  #gstbasetextoverlay.c:1511: error: 'for' loop initial declaration used
 outside C99 mode
 @@ -63,9 +64,6 @@ platform darwin {
      if {${os.major} < 10 } {
          depends_lib-delete port:graphene
      }
 -    if {${os.major} < 13 } {
 -        configure.args-append   --disable-cocoa --disable-opengl
 -    }
  }

  variant x11 {
 @@ -102,6 +100,20 @@ variant cdparanoia description {Enable (currently
 broken) cdparanoia plugin} {
      configure.args-delete --disable-cdparanoia
  }

 +variant cocoa conflicts universal description {Add support for native
 Cocoa output. Only supported for pure x86_64 builds.} {
 +    if {${os.major} < 10} {
 +        ui_error "The variant cocoa is not supported on platforms older
 than 10.6"
 +        error "Platform too old to support Cocoa output"
 +    }
 +
 +    configure.args-replace  --disable-cocoa \
 +                            --enable-cocoa
 +}
 +
 +if {${os.major} >= 10 && ![variant_isset universal] && ${build_arch} eq
 "x86_64"} {
 +    default_variants +cocoa
 +}
 +
  #-fgcse (from -O2) causes build failures, but -O2 -fno-gcse doesn't seem
 to work
  if {[string match "*gcc-4.2" ${configure.compiler}]} {
      lappend merger_configure_cflags(i386) -O1 -fexpensive-optimizations
 }}}

 We'll lose Cocoa output on non-`x86_64` platforms and for `+universal`
 builds, but retain OpenGL support via X11.

 Interestingly, `-fobjc-arc` will still be used when building the OpenGL
 plugin, but that doesn't seem to have adverse effects if ARC is not
 actually used in the code.

 I'll commit it myself, just throwing it in here for review first.

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


More information about the macports-tickets mailing list