Opened 7 years ago

Closed 7 years ago

#54649 closed defect (fixed)

gstreamer1-gst-plugins-bad @1.12.2 error: use of undeclared identifier 'GL_CONTEXT_PROFILE_MASK'

Reported by: kencu (Ken) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: majoc-at-astro (majoc-at-astro), Schamschula (Marius Schamschula), SpikeLightfoot, yan12125 (Chih-Hsuan Yen), jeremyhu (Jeremy Huddleston Sequoia)
Port: gstreamer1-gst-plugins-bad

Description

Attempting to install webkit2-gtk-devel on Sierra, with gtk3 +quartz. gtk3 is already installed +quartz:

$ port installed gtk3
The following ports are currently installed:
  gtk3 @3.22.17_0+quartz (active)

this install command I'm using is:

sudo port -v install webkit2-gtk-devel +quartz +minibrowser

this pulls in a requirement for gstreamer1-gst-plugins-bad, which then fails to install with this error:

gstglcontext.c:630:29: error: use of undeclared identifier 'GL_CONTEXT_CORE_PROFILE_BIT'
        if (context_flags & GL_CONTEXT_CORE_PROFILE_BIT)
                            ^

I then tried

sudo port -v install webkit2-gtk-devel +quartz -gtk2 -x11 +minibrowser

and

sudo port -v install webkit2-gtk-devel +quartz

which resulted in the same error.

Attachments (3)

gstpluginsbad-fail.log (349.5 KB) - added by kencu (Ken) 7 years ago.
gstreamer1-plugins-bad-tracemode.log (404.4 KB) - added by kencu (Ken) 7 years ago.
gstglapi-switch-includes.diff (1.2 KB) - added by kencu (Ken) 7 years ago.

Download all attachments as: .zip

Change History (19)

Changed 7 years ago by kencu (Ken)

Attachment: gstpluginsbad-fail.log added

comment:1 Changed 7 years ago by majoc-at-astro (majoc-at-astro)

Cc: majoc-at-astro added

comment:2 Changed 7 years ago by kencu (Ken)

Hi, all - can we add Marius to this ticket? He updated this port a week ago.

Also - there are several missing GL defines -- I see the one I put in the title is not the one I put in the body of the ticket.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Cc: Schamschula added

comment:4 Changed 7 years ago by Schamschula (Marius Schamschula)

Hmm.

I installed gstreamer1-gst-plugins-bad @1.12.2 on my Sierra machine w/o any such problems before updating git.

However, when I first build an update, I always build using trace mode (-t switch). This may have masked the issue, by disabling the code in question.

comment:5 Changed 7 years ago by kencu (Ken)

Certainly. Must be something going on on certain machines. I tried trace mode - same error for me. Log uploaded.

Changed 7 years ago by kencu (Ken)

comment:6 Changed 7 years ago by SpikeLightfoot

Cc: SpikeLightfoot added

comment:7 Changed 7 years ago by kencu (Ken)

One more data point. On a MacPro running Sierra, I have gstreamer1-gst-plugins-bad installed.

$ port -v installed gstreamer1-gst-plugins-bad
The following ports are currently installed:
  gstreamer1-gst-plugins-bad @1.12.2_0 (active) platform='darwin 16' archs='x86_64' date='2017-08-16T14:14:54-0700'

However, when I try to rebuild it just now on this same machine, it fails with the above errors.

As gstreamer1-gst-plugins-bad does not appear to be available as a prebuilt package on <https://packages.macports.org>, it would seem I must have built it on Aug 16, but yet I can't build it now...perhaps some macOS update has intervened here to confound things.

comment:8 Changed 7 years ago by Schamschula (Marius Schamschula)

Just as I suspected (I was planning on rebuilding it on my machine to test this): An update of a dependency likely broke gstreamer1-gst-plugins-bad.

Given that the issues are with GL, I would guess an update to mesa 17.1.6 (5 days ago) might be to blame.

comment:9 Changed 7 years ago by yan12125 (Chih-Hsuan Yen)

Got the same issue here either building with or without -t. Adding --disable-gles2 to configure.args fixed the issue for me.

In gst-libs/gst/gl/gstglapi.h, GLES3/gl3.h is included before OpenGL/gl3.h. Both of them use #ifndef __gl3_h_ to prevent double inclusion, and missing symbols are provided by the latter. According to port provides, GLES3/gl3.h is exactly provided by mesa.

comment:10 Changed 7 years ago by yan12125 (Chih-Hsuan Yen)

Cc: yan12125 added

comment:11 Changed 7 years ago by mf2k (Frank Schima)

Cc: jeremyhu added

Cc'ing maintainer of mesa for possible comment.

comment:12 Changed 7 years ago by kencu (Ken)

Looks like mesa started enabling GLES by default a while ago <https://www.phoronix.com/scan.php?page=news_item&px=OpenGL-ES-Mesa-Default> and this latest mesa update pulled that in.

comment:13 Changed 7 years ago by kencu (Ken)

Another thing that works to build gstreamer1-gst-plugins-bad without disabling anything in configure.args is to switch the order of the OpenGL includes in gst-libs/gst/gl/gstglapi.h, to pull in the desktop set first (see patch).

Last edited 7 years ago by kencu (Ken) (previous) (diff)

Changed 7 years ago by kencu (Ken)

comment:14 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

The build should either use OpenGL.framework or Mesa, not both.

comment:15 Changed 7 years ago by nbenm

Hi, I have the same problem. I can't say this is the best way to solve the issue, but after compilation failed I've changed gst-libs/gst/gl/gstglapi.h the way chown in the patch file and restarted it. It compiles correctly now

Thanks

Noury

comment:16 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: set to jeremyhu
Resolution: fixed
Status: newclosed

In a0885d3c460fb2f3aaacfe61eff91a7bba055e47/macports-ports:

gstreamer1-gst-plugins-bad: Configure with --disable-gles2 to workaround gstgl bug

Fixes #54649

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@…>

Note: See TracTickets for help on using tickets.