Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56781 closed defect (fixed)

gstreamer1-gst-plugins-bad @1.14.1_1: error: unknown type name 'CGLError'

Reported by: Blokkendoos (Johan) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: tsuereth, Ionic (Mihai Moldovan), arappe, mopihopi, posita (Matt Bogosian), ryandesign (Ryan Carsten Schmidt), majoc-at-astro (majoc-at-astro), bwalle (Bernhard Walle), hapaguy (Brian Kurt Fujikawa), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), dershow, Superlokkus (Markus Klemm), clintolsen (Clint Olsen), carlofdtam (Carlo Tambuatco)
Port: gstreamer1-gst-plugins-bad

Description

The update fails (on OS X 10.10.5 (Yosemite) and Xcode 7.2.1) with following errors:

:info:build /bin/sh ../../libtool  --tag=CC   --mode=compile /usr/bin/clang -arch x86_64 -DHAVE_CONFIG_H -I. -I../..   -I/opt/local/include -L/opt/local/lib -I../../gst-libs -I../../gst-libs -D_REENTRANT -I/opt/local/include/gstreamer-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include  -DGST_USE_UNSTABLE_API -fno-strict-aliasing  -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs   -g    -fvisibility=hidden -DSHM_PIPE_USE_GLIB -pipe -Os -std=c99 -funroll-loops -fstrict-aliasing -arch x86_64 -MT libgstshm_la-shmalloc.lo -MD -MP -MF .deps/libgstshm_la-shmalloc.Tpo -c -o libgstshm_la-shmalloc.lo `test -f 'shmalloc.c' || echo './'`shmalloc.c
:info:build In file included from iosurfacememory.c:25:
:info:build In file included from ./iosurfacememory.h:28:
:info:build In file included from /opt/local/include/gstreamer-1.0/gst/gl/gl.h:28:
:info:build /opt/local/include/gstreamer-1.0/gst/gl/gstgldebug.h:28:33: warning: redefinition of typedef 'GstGLAsyncDebug' is a C11 feature [-Wtypedef-redefinition]
:info:build typedef struct _GstGLAsyncDebug GstGLAsyncDebug;
:info:build                                 ^
:info:build /opt/local/include/gstreamer-1.0/gst/gl/gstgl_fwd.h:107:33: note: previous definition is here
:info:build typedef struct _GstGLAsyncDebug GstGLAsyncDebug;
:info:build                                 ^
:info:build In file included from iosurfacememory.c:25:
:info:build In file included from ./iosurfacememory.h:29:
:info:build /opt/local/include/gstreamer-1.0/gst/gl/gstglfuncs.h:100:3: warning: redefinition of typedef 'GstGLFuncs' is a C11 feature [-Wtypedef-redefinition]
:info:build } GstGLFuncs;
:info:build   ^
:info:build /opt/local/include/gstreamer-1.0/gst/gl/gstgl_fwd.h:105:28: note: previous definition is here
:info:build typedef struct _GstGLFuncs GstGLFuncs;
:info:build                            ^
:info:build iosurfacememory.c:218:5: error: unknown type name 'CGLError'; did you mean 'GError'?
:info:build     CGLError cglError;
:info:build     ^~~~~~~~
:info:build     GError
:info:build /opt/local/include/glib-2.0/glib/gerror.h:41:24: note: 'GError' declared here
:info:build typedef struct _GError GError;
:info:build                        ^
:info:build iosurfacememory.c:228:16: warning: implicit declaration of function 'CGLTexImageIOSurface2D' is invalid in C99 [-Wimplicit-function-declaration]
:info:build     cglError = CGLTexImageIOSurface2D ((CGLContextObj)
:info:build                ^
:info:build iosurfacememory.c:229:9: error: expected ')'
:info:build         gst_gl_context_get_gl_context (context), tex_target, texifmt,
:info:build         ^
:info:build iosurfacememory.c:228:39: note: to match this '('
:info:build     cglError = CGLTexImageIOSurface2D ((CGLContextObj)
:info:build                                       ^
:info:build iosurfacememory.c:235:71: warning: format specifies type 'int' but the argument has type 'GError' (aka 'struct _GError') [-Wformat]
:info:build     GST_DEBUG ("bound surface %p to texture %u: %d", surface, tex_id, cglError);
:info:build                                                 ~~                    ^~~~~~~~
:info:build /opt/local/include/gstreamer-1.0/gst/gstinfo.h:1064:87: note: expanded from macro 'GST_DEBUG'
:info:build #define GST_DEBUG(...)                  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
:info:build                                                                                                      ^
:info:build /opt/local/include/gstreamer-1.0/gst/gstinfo.h:640:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
:info:build         (GObject *) (object), __VA_ARGS__);                             \
:info:build                               ^
:info:build 4 warnings and 2 errors generated.

Attachments (3)

main.log (1.6 MB) - added by Blokkendoos (Johan) 6 years ago.
gstreamer_upgrade_log_080818.txt (33.7 KB) - added by arappe 6 years ago.
log showing activation/deactivation sequence to get gstreamer1-gst-plugins-bad to compile for 1.14.2_0
gstreamer1-gst-plugins-bad.log (1.3 MB) - added by carlofdtam (Carlo Tambuatco) 6 years ago.
Log file showing command execution failed upgrading from @1.14.1_1 to @1.14.2

Change History (36)

Changed 6 years ago by Blokkendoos (Johan)

Attachment: main.log added

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Port: gstreamer1-gst-plugins-bad added

In the future, please fill in the Port field.

comment:2 Changed 6 years ago by tsuereth

Cc: tsuereth added

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

Cc: Ionic added
Summary: gstreamer1-gst-plugins-bad @1.14.1_1 update failsgstreamer1-gst-plugins-bad @1.14.1_1: error: unknown type name 'CGLError'

comment:4 Changed 6 years ago by arappe

Cc: arappe added

comment:5 Changed 6 years ago by mopihopi

Cc: mopihopi added

comment:6 Changed 6 years ago by mopihopi

After updating gstreamer1-gst-plugins-base, rev-upgrade sees that gstreamer1-gst-plugins-bad is now broken and tries unsuccessfully to rebuild it:

--->  Scanning binaries for linking errors
--->  Found 2 broken files, matching files to ports      
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: gstreamer1-gst-plugins-bad @1.14.1
Continue? [Y/n]: 
--->  Computing dependencies for gstreamer1-gst-plugins-bad
--->  Cleaning gstreamer1-gst-plugins-bad
--->  Scanning binaries for linking errors
--->  Found 2 broken files, matching files to ports      
--->  Found 1 broken port, determining rebuild order
--->  Rebuilding in order
     gstreamer1-gst-plugins-bad @1.14.1 
--->  Computing dependencies for gstreamer1-gst-plugins-bad
--->  Fetching distfiles for gstreamer1-gst-plugins-bad
--->  Verifying checksums for gstreamer1-gst-plugins-bad
--->  Extracting gstreamer1-gst-plugins-bad
--->  Applying patches to gstreamer1-gst-plugins-bad
--->  Configuring gstreamer1-gst-plugins-bad
--->  Building gstreamer1-gst-plugins-bad
Error: Failed to build gstreamer1-gst-plugins-bad: command execution failed
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.
Error: rev-upgrade failed: Error rebuilding gstreamer1-gst-plugins-bad
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

The build log shows the following error:

:info:build In file included from plugin.m:36:
:info:build In file included from ./vtdec.h:28:
:info:build ./videotexturecache.h:24:10: fatal error: 'gst/gl/gl.h' file not found
:info:build #include <gst/gl/gl.h>
:info:build          ^~~~~~~~~~~~~

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

Yep, I'll probably have to do the cocoa/x11 dance there as well, but got sidetracked the past few days with another issue that needed a lot of rebuilds.

comment:8 Changed 6 years ago by posita (Matt Bogosian)

Cc: posita added

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

Cc: ryandesign added

comment:10 Changed 6 years ago by majoc-at-astro (majoc-at-astro)

Cc: majoc-at-astro added

comment:11 Changed 6 years ago by bwalle (Bernhard Walle)

Cc: bwalle added

comment:12 Changed 6 years ago by arappe

May I suggest a work-around.

  1. Error reported by Blokkendoos

Problem:

error: unknown type name 'CGLError'; did you mean 'GError'?

Fix.

  1. Activate non-x11 versions of all gstreamer1 +x11 packages.
  2. Upgrade gstreamer1-gst-plugins-bad
  3. Activate non-x11 versions of all gstreamer1 packages.

I had the above error. The following works for me:

sudo port activate gstreamer1-gst-plugins-base @1.14.1_5+cocoa+ogg
sudo port activate gstreamer1-gst-plugins-good @1.12.4_1+pulseaudio
sudo port upgrade gstreamer1-gst-plugins-good @1.12.4_1+pulseaudio
sudo port upgrade gstreamer1-gst-plugins-bad
sudo port activate gstreamer1-gst-plugins-base @1.14.1_5+ogg+x11
sudo port activate gstreamer1-gst-plugins-good @1.14.1_1+pulseaudio+x11
sudo port rev-upgrade
  1. Error reported by mopihopi

Problem:

fatal error: 'gst/gl/gl.h' file not found

I had a different file missing. Mine was provided by gstreamer1. Fix:

sudo port deactivate gstreamer1
sudo port activate gstreamer1

(the missing file was then found in the right place) So, I am guessing that to fix the missing gst/gl/gl.h... (a guess)

port provides /opt/local/include/gstreamer-1.0/gst/gl/gl.h
/opt/local/include/gstreamer-1.0/gst/gl/gl.h is provided by: gstreamer1-gst-plugins-base

So I would guess

sudo port deactivate gstreamer1-gst-plugins-base
sudo port activate gstreamer1-gst-plugins-base

See how this goes and report progress or problems. I hope this was helpful.

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

I'll remove the cocoa variant and replace its behavior based on +x11/-x11. The current configuration just fails to work correctly and there is no good way to fix it (regarding doing the stuff it's supposed to do).

Currently just too busy, or would have done that two weeks ago. Hope to get to that by next week.

comment:14 in reply to:  12 Changed 6 years ago by mopihopi

Replying to arappe:

sudo port deactivate gstreamer1-gst-plugins-base
sudo port activate gstreamer1-gst-plugins-base

This did not work for me. The file gst/gl/gl.h still does not exist. I believe that gstreamer1-gst-plugins-base provides this only with the cocoa variant. However in my installation it is installed with +ogg+universal. Apparently the wine port wanted gstreamer1-gst-plugins-base to be installed with +universal but +universal disables +cocoa.

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:15 Changed 6 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: hapaguy added

comment:16 Changed 6 years ago by basmac

The above workaround worked for me to fix -bad

sudo port activate gstreamer1-gst-plugins-base @1.14.1_5+cocoa+ogg sudo port activate gstreamer1-gst-plugins-good @1.12.4_1+pulseaudio sudo port upgrade gstreamer1-gst-plugins-good @1.12.4_1+pulseaudio sudo port upgrade gstreamer1-gst-plugins-bad sudo port activate gstreamer1-gst-plugins-base @1.14.1_5+ogg+x11 sudo port activate gstreamer1-gst-plugins-good @1.14.1_1+pulseaudio+x11 sudo port rev-upgrade
Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 6 years ago by arappe

log showing activation/deactivation sequence to get gstreamer1-gst-plugins-bad to compile for 1.14.2_0

comment:17 Changed 6 years ago by arappe

Now that 1.14.2_0 is out, my setup again won't accept sudo port upgrade outdated without complaints. I think that gstreamer1-gst-plugins-bad doesn't know its dependencies quite precisely. In any event, essentially the same work around I posted above worked for me again.

I attached gstreamer_upgrade_log_080818.txt which shows my march to getting all gstreamer1 packages compiled, back to +x11 versions activated, and sudo port upgrade outdated completing its work. (In the process I also handled bug #56938 along the way by activating earlier gcc7 and then activating the newest one right at the end... but that's not so relevant to this thread.

Good luck everyone. I hope these posts are a bit helpful.

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:18 Changed 6 years ago by mouse07410 (Mouse)

I cannot say I like this workaround - but it helped me on three High Sierra machines, saving the day. Thanks, @arappe, for providing it.

comment:19 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:20 Changed 6 years ago by pmetzger (Perry E. Metzger)

Owner: set to dbevans
Status: newassigned

comment:21 Changed 6 years ago by dershow

Cc: dershow added

comment:22 Changed 6 years ago by Superlokkus (Markus Klemm)

Cc: Superlokkus added

comment:23 Changed 6 years ago by clintolsen (Clint Olsen)

Cc: clintolsen added

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

Cc: carlofdtam added

Has duplicate #56992.

Changed 6 years ago by carlofdtam (Carlo Tambuatco)

Log file showing command execution failed upgrading from @1.14.1_1 to @1.14.2

comment:25 Changed 6 years ago by carlofdtam (Carlo Tambuatco)

I get the following error in upgrading from @1.14.1_1 to @1.14.2

Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gstreamer1-gst-plugins-bad/gstreamer1-gst-plugins-bad/work/gst-plugins-bad-1.14.2" && /usr/bin/make -j4 -w all 
CC="/usr/bin/clang -arch x86_64" 

Exit code: 2

Error: Failed to build gstreamer1-gst-plugins-bad: command execution failed
DEBUG: Error code: CHILDSTATUS 29783 2
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$nice $fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gstreamer1-gst-plugins-bad/gstreamer1-gst-plugins-bad/main.log for details.
DEBUG: Failed to locate 'lbzip2' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
    while executing
"error "$eMessage or at its MacPorts configuration time location, did you move it?""
    invoked from within
"try -pass_signal {
            return [macports::binaryInPath $prog]
        } catch {{*} eCode eMessage} {
            error "$eMessage or at its Mac..."
    (procedure "macports::findBinary" line 5)
Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:26 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

There is a pull request that attempts to solve this problem.

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

Resolution: fixed
Status: assignedclosed

In 56e069da28b1d28693e793581ad1a200108deb5c/macports-ports (master):

gnome/gstreamer1-gst-plugins-bad: disable Apple_Media by default, only enable if -x11 has been passed.

Sync up variants between -base and -bad.

Fixes: #56781

comment:28 in reply to:  27 Changed 6 years ago by carlofdtam (Carlo Tambuatco)

Replying to Mihai Moldovan <ionic@…>:

In 56e069da28b1d28693e793581ad1a200108deb5c/macports-ports (master):

gnome/gstreamer1-gst-plugins-bad: disable Apple_Media by default, only enable if -x11 has been passed.

Sync up variants between -base and -bad.

Fixes: #56781

Could you explain to me, as a basic macports user, how to use this fix? What are the steps I need to take to upgrade gstreamer1-gst-plugins-bad @1.14.1_1 to @1.14.2...? I did

sudo port -u upgrade gstreamer1-gst-plugins-bad

after running clean, and I still get the error:

Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gstreamer1-gst-plugins-bad/gstreamer1-gst-plugins-bad/work/gst-plugins-bad-1.14.2" && /usr/bin/make -j4 -w all 
CC="/usr/bin/clang -arch x86_64" 

Exit code: 2

Error: Failed to build gstreamer1-gst-plugins-bad: command execution failed
DEBUG: Error code: CHILDSTATUS 29783 2
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$nice $fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gstreamer1-gst-plugins-bad/gstreamer1-gst-plugins-bad/main.log for details.
DEBUG: Failed to locate 'lbzip2' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
    while executing
"error "$eMessage or at its MacPorts configuration time location, did you move it?""
    invoked from within
"try -pass_signal {
            return [macports::binaryInPath $prog]
        } catch {{*} eCode eMessage} {
            error "$eMessage or at its Mac..."
    (procedure "macports::findBinary" line 5)
Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

The usual stuff.

sudo port selfupdate and then update as you'd normally do.


Your issue is not the problem described in this bug report though, but sounds more alike the one reported in #55560. The latter is also fixed, though, so you've probably hosed your system.

What does port installed lbzip2; ls -ldh /opt/local/bin/lbzip2 output?

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

comment:30 in reply to:  29 Changed 6 years ago by carlofdtam (Carlo Tambuatco)

Replying to Ionic:

The usual stuff.

sudo port selfupdate and then update as you'd normally do.

hr?

Your issue is not the problem described in this bug report though, but sounds more alike the one reported in #55560. The latter is also fixed, though, so you've probably hosed your system.

What does port installed lbzip2; ls -ldh /opt/local/bin/lbzip2 output?

No need. Just ran selfupdate and upgrade a few minutes ago.

(finally) gstreamer1-gst-plugins-bad built, installed and activated.

lbzip2 is not installed on my system. But I guess that's not where the problem lay...

Thanks for the fix.

comment:31 Changed 6 years ago by mopihopi

This is still not working for me. As before, attempting to update gstreamer1-gst-plugins-bad (no variants) encounters the error "fatal error: 'gst/gl/gl.h' file not found". This seems to be because gstreamer1-gst-plugins-base @1.14.2_1+ogg+universal does not provide this include file, but gstreamer1-gst-plugins-bad @1.14.2_1 (no variants) still expects it.

The wine port adds +universal for gstreamer1-gst-plugins-base but not for gstreamer1-gst-plugins-bad.

Would you like me to file a new ticket?

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

Yes, please file a new ticket since that problem has nothing to do with the original report (OpenGL implementation mismatch between the two ports).

comment:33 in reply to:  32 Changed 6 years ago by mopihopi

Ok filed #57020.

Note: See TracTickets for help on using tickets.