linuxmint / muffin

The window management library for the Cinnamon desktop (libmuffin) and its sample WM binary (muffin)
GNU General Public License v2.0
196 stars 93 forks source link

Build issues: Failed to find symbol 'clutter_point_get_type' #538

Open AngryPenguinPL opened 4 years ago

AngryPenguinPL commented 4 years ago

Issue We decided to upgrade the Cinnamon stack from version 4.0 to 4.2. Unfortunately, during the building of Muffin 4.2.2 I encountered a problem.

First error was:

cogl-texture-2d.c:432:43: error: use of undeclared identifier 'EGL_WAYLAND_BUFFER_WL'
BUILDSTDERR:                                           EGL_WAYLAND_BUFFER_WL

Full log here: http://file-store.openmandriva.org/api/v1/file_stores/3cbe03ef545465089c95852ad298c473fe6e4535.log?show=true

If I'm not mistaken, the problem arose after updating libglvnd to 1.2.0.

@berolinux has prepared a patch to fix this issue. Here: https://github.com/OpenMandrivaAssociation/muffin/blob/xa/muffin-4.0.6-compile.patch

But after this patch, we see another issues:

Invalid GType function: 'clutter_point_get_type'
DEBUG util.py:585:  BUILDSTDERR: Failed to find symbol 'clutter_point_get_type'
DEBUG util.py:585:  BUILDSTDERR: clutter-muffin.h:46: Warning: Clutter: symbol='SyncMethod': Unknown namespace for identifier 'SyncMethod'
DEBUG util.py:585:  BUILDSTDERR: Command '['/builddir/build/BUILD/muffin-4.2.2/clutter/clutter/tmp-introspect9n0ciwzu/Clutter-0', '--introspect-dump=/builddir/build/BUILD/muffin-4.2.2/clutter/clutter/tmp-introspect9n0ciwzu/functions.txt,/builddir/build/BUILD/muffin-4.2.2/clutter/clutter/tmp-introspect9n0ciwzu/dump.xml']' returned non-zero exit status 1.
DEBUG util.py:585:  BUILDSTDERR: make[4]: *** [/usr/share/gobject-introspection-1.0/Makefile.introspection:156: Clutter-0.gir] Error 1

Full build log here: http://file-store.openmandriva.org/api/v1/file_stores/d799c61d9617a3f94865aeb7c98f85b8027ae6b3.log?show=true

So my question is, does anyone have an idea how to fix it?

leigh123linux commented 4 years ago
DEBUG util.py:585:  BUILDSTDERR: cogl-texture-2d.c:394:11: warning: implicit declaration of function '_cogl_egl_query_wayland_buffer' is invalid in C99 [-Wimplicit-function-declaration]
DEBUG util.py:585:  BUILDSTDERR:       if (_cogl_egl_query_wayland_buffer (ctx,
DEBUG util.py:585:  BUILDSTDERR:           ^
DEBUG util.py:585:  BUILDSTDERR: cogl-texture-2d.c:432:43: error: use of undeclared identifier 'EGL_WAYLAND_BUFFER_WL'
DEBUG util.py:585:  BUILDSTDERR:                                           EGL_WAYLAND_BUFFER_WL,
DEBUG util.py:585:  BUILDSTDERR:                                           ^
DEBUG util.py:585:  BUILDSTDERR: 3 warnings and 1 error generated.

Try using these build options

%build
%configure --disable-static \
           --enable-startup-notification=yes \
           --disable-silent-rules \
           --enable-gtk-doc \
           --disable-clutter-doc \
           --disable-wayland-egl-platform \
           --disable-wayland-egl-server \
           --disable-kms-egl-platform \
           --disable-wayland \
           --disable-native-backend

Your current spec file has wayland enabled, this is a known build failure.

leigh123linux commented 4 years ago

The gi error is known, see

https://github.com/linuxmint/muffin/issues/535

AngryPenguinPL commented 4 years ago

Thanks. I added your PR to master branch, Unfortunately, this problem still persists:

Invalid GType function: 'clutter_point_get_type'
DEBUG util.py:585:  BUILDSTDERR: Failed to find symbol 'clutter_point_get_type'
DEBUG util.py:585:  BUILDSTDERR: clutter-muffin.h:46: Warning: Clutter: symbol='SyncMethod': Unknown namespace for identifier 'SyncMethod'

Trying on muffin 4.0.6 and 4.2.2. Patch from Fedora, suggested in #535 does not help.

AngryPenguinPL commented 4 years ago

Looks like this issue is Clang related. As workaround I changed to GCC and muffin build was successful...

leigh123linux commented 4 years ago

It compiles ok here in F31 using clang.

https://leigh123linux.fedorapeople.org/pub/info/muffin_clang_compile.txt

AngryPenguinPL commented 4 years ago

4.4.0 and still not compile with clang, only gcc works.

It compiles ok here in F31 using clang.

Maybe because OpenMandriva Cooker use newer Clang version or we have some optimizations enabled that interfere with muffins. Not sure...