Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56778 closed defect (fixed)

gstreamer1-gst-plugins-base upgrade fails: Variant x11 conflicts with cocoa

Reported by: squizzgitmon Owned by: Mihai Moldovan <ionic@…>
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Ionic (Mihai Moldovan), tehcog (tehcog), ryandesign (Ryan Carsten Schmidt)
Port: gstreamer1-gst-plugins-base

Description

I've just done my weekly "sudo port -d selfupdate;sudo port upgrade outdated". I have not installed any new ports recently. It fails with:

Error: gstreamer1-gst-plugins-base: Variant x11 conflicts with cocoa

This is not a port I have installed myself, so it must be a dependency. Somewhere something I have not touched is causing this conflict.

Change History (17)

comment:1 Changed 6 years ago by jmroot (Joshua Root)

Cc: Ionic added
Port: gstreamer1-gst-plugins-base added

I guess it was previously installed with +cocoa and now it's setting +x11 as a default variant because +cocoa won't work on your OS/architecture. If you specify -cocoa when upgrading it, that should work around the problem.

The portfile could perhaps explicitly disable cocoa in the circumstances where it will select +x11, or only create the cocoa variant on platforms where it will work?

comment:2 Changed 6 years ago by Ionic (Mihai Moldovan)

Hmm, can we see port -v installed gstreamer1-gst-plugins-base please?

Last edited 6 years ago by Ionic (Mihai Moldovan) (previous) (diff)

comment:3 in reply to:  2 Changed 6 years ago by tehcog (tehcog)

Replying to Ionic:

Hmm, can we see port -v installed gstreamer1-gst-plugins-base please?

This is what I have:

The following ports are currently installed:
  gstreamer1-gst-plugins-base @1.14.1_3+cocoa+ogg+x11 (active) platform='darwin 13' archs='x86_64' date='2018-07-04T12:03:01-0400'

comment:4 Changed 6 years ago by tehcog (tehcog)

Cc: tehcog added

comment:5 Changed 6 years ago by basmac

"port upgrade gstreamer1-gst-plugins-base -cocoa" worked for me, thanks

comment:6 Changed 6 years ago by Ionic (Mihai Moldovan)

Okay, that explains your situation.

+x11 was the default variant in the past. I have added +cocoa a few days ago, but it turned out that having both the GLX (x11) and Cocoa OpenGL backend enabled is a bad idea, since we really don't want to link two different OpenGL implementations into the same binary.

Your platform supports both, so we cannot hide either to make it unavailable and resolve the conflict.

I probably could forcefully disable either cocoa or x11 if both are set. Since the X11 backend actually works and the Cocoa does not really work, I guess we should go for preferring the x11 variant.

Will test around with that tomorrow to give users a better upgrade path if possible.

comment:7 Changed 6 years ago by tehcog (tehcog)

Thanks for your help

comment:8 Changed 6 years ago by jmroot (Joshua Root)

Summary: gstreamer1-gst-plugins-base build fails on latest upgradegstreamer1-gst-plugins-base upgrade fails: Variant x11 conflicts with cocoa

comment:9 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

This also affects the buildbot when trying to build gstreamer1-gst-plugins-base +universal as a dependency of wine.

Error: gstreamer1-gst-plugins-base: Variant x11 conflicts with cocoa
Error evaluating variants
    while executing
"error "Error evaluating variants""
    (procedure "mportopen" line 59)
    invoked from within
"mportopen $dep_portinfo(porturl) $dep_options [array get variation_array]"
    (procedure "mportdepends" line 147)
    invoked from within
"mportdepends $mport "activate""
    invoked from within
"if {[mportdepends $mport "activate"] != 0} {
    ui_error "mportdepends $portname activate failed."
    exit 1
}"
    (file "/opt/bblocal/var/buildworker/ports/build/mpbb/tools/dependencies.tcl" line 84)
Calculating dependencies for 'wine-devel' failed, aborting.
./mpbb/mpbb: error: `install-dependencies' failed to run successfully
program finished with exit code 1

comment:10 Changed 6 years ago by Ionic (Mihai Moldovan)

I've cobbled together some... very ugly mechanism (worsened by the fact that we have variant_set in base, but not variant_unset).

Adding a negative variant via default_variants is not sufficient to override the already installed variants for some reason.

Let me test it and it'll go live.

comment:11 Changed 6 years ago by Mihai Moldovan <ionic@…>

Owner: set to Mihai Moldovan <ionic@…>
Resolution: fixed
Status: newclosed

In bed79e26ac5a2438559d6577e773e0a18d59f700/macports-ports (master):

gnome/gstreamer1-gst-plugins-base: enable cocoa xor x11, prefer x11.

Fixes: #56778

This employs a horrible hack to forcefully deactivate the conflicting
variant in case it's not compatible with the system or other variants.

comment:12 Changed 6 years ago by Ionic (Mihai Moldovan)

This is terrible, but the best I could come up with. If anyone else has better ideas, go ahead and make it less hacky.

comment:13 in reply to:  10 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

I'm a bit concerned because this -x11 seems to be getting passed down to dependencies too.

The build log looks strange:

https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/29493/steps/install-dependencies/logs/stdio

----> Installing dependency (107 of 153) 'gstreamer1-gst-plugins-base' with variants '+ogg+universal' (requesting '+universal-x11')
--->  Attempting to fetch gstreamer1-gst-plugins-base-1.14.1_5+ogg+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/gstreamer1-gst-plugins-base

I don't understand why it's using neither the cocoa nor the x11 variant here; I don't see a codepath in the portfile that could cause that to happen.

It ultimately fails when it tries to do the same thing with the gtk3 port, which has a check for that:

Error: Failed to configure gtk3: Either +x11 or +quartz is required

comment:14 Changed 6 years ago by Ionic (Mihai Moldovan)

Crap. I hoped that it would stay local to the port, not be passed-down to others as well. Wouldn't that also affect all ports that are already using variant_set (just in the opposite way)?

Hm, it's a normal/new install... since universal is set, it should pull-in x11 as a default flag and disable cocoa. I'm stumped, x11 should be getting enabled. Maybe I need to quote variations("cocoa/x11") instead of not quoting them? I've tried that at first (as set variations("cocoa") "-", quoting both the variant string and the disable character), but that didn't seem to work at all.

If everything fails and this turns out to have highly disadvantageous effects, we can just comment out/remove the cocoa variant again and only use GLX/x11. That'll break the OpenGL implementation in plugins-base, but I hardly doubt anyone is actually using that... short of for testing gstreamer.

comment:15 in reply to:  14 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to Ionic:

Crap. I hoped that it would stay local to the port, not be passed-down to others as well. Wouldn't that also affect all ports that are already using variant_set (just in the opposite way)?

I'm not aware of variant_set causing problems; it's used in several ports. But I haven't tested for this problem specifically.

Maybe passing the variant down to dependencies is not a problem. That is of course what happens when variants are specified by the user on the command line, if the dependencies are not yet installed.

Hm, it's a normal/new install... since universal is set, it should pull-in x11 as a default flag and disable cocoa. I'm stumped, x11 should be getting enabled. Maybe I need to quote variations("cocoa/x11") instead of not quoting them? I've tried that at first (as set variations("cocoa") "-", quoting both the variant string and the disable character), but that didn't seem to work at all.

The problem I'm seeing on the buildbot might well be specific to mpbb. comment:9 showed the problem occurring in mpbb code before you changed the variant code.

comment:16 Changed 6 years ago by splaisan (Stephane Plaisance)

any progress? I still have the error and do not see a fix here above.

Error: Failed to configure gstreamer1-gst-plugins-bad: gstreamer1-gst-plugins-base must be installed with +x11. Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gstreamer1-gst-plugins-bad/gstreamer1-gst-plugins-bad/main.log for details.

:debug:configure Active variants check for source-type install considers depends_fetch depends_extract depends_lib depends_build depends_run: xz gstreamer1-gst-plugins-base curl faad2 fluidsynth lcms2 libass libdca libdvdread libdvdnav libexif libmms libmodplug libmpcdec libnice librsvg libssh2 mesa libGLU nettle openal-soft openexr openjpeg orc rtmpdump soundtouch spandsp-devel neon webp x265 gobject-introspection chromaprint pkgconfig autoconf automake libtool
:debug:configure Checking gstreamer1-gst-plugins-base for active variants for depspec 'port:gstreamer1-gst-plugins-base'
:debug:configure gstreamer1-gst-plugins-base is installed with the following variants: +ogg
:debug:configure   required: x11, forbidden: 
:debug:configure   rejected, because required variant x11 is missing
:error:configure Failed to configure gstreamer1-gst-plugins-bad: gstreamer1-gst-plugins-base must be installed with +x11.
:debug:configure Error code: NONE
:debug:configure Backtrace: gstreamer1-gst-plugins-base must be installed with +x11.
:debug:configure     while executing
:debug:configure "$pre $targetname"
Last edited 6 years ago by splaisan (Stephane Plaisance) (previous) (diff)

comment:17 Changed 6 years ago by Ionic (Mihai Moldovan)

Please CC to #57020. I've just forgotten about that, thanks for the reminder.

Note: See TracTickets for help on using tickets.