Rafostar / clapper

Level up your video experience with a modern and user-friendly media player.
https://rafostar.github.io/clapper/
GNU General Public License v3.0
774 stars 36 forks source link

[Compiler error on Linux using the current git clone URL] undefined reference to `gdk_x11_display_get_egl_display' #137

Open rubyFeedback opened 3 years ago

rubyFeedback commented 3 years ago

Here is the error, copy/pasted from KDE konsole terminal:

The Meson build system
Version: 0.59.0
Source dir: /Depot/jjj/clapper
Build dir: /Depot/jjj/clapper/BUILD_DIRECTORY
Build type: native build
Project name: com.github.rafostar.Clapper
Project version: 0.3.0
C compiler for the host machine: ccache cc (gcc 11.2.0 "cc (GCC) 11.2.0")
C linker for the host machine: cc ld.bfd 2.37
C++ compiler for the host machine: ccache c++ (gcc 11.2.0 "c++ (GCC) 11.2.0")
C++ linker for the host machine: c++ ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/usr/bin/python3)
/home/Programs/Python/Current/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 25330 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/Programs/Python/Current/lib/python3.9/site-packages/meson-0.59.0-py3.9.egg/mesonbuild/compilers/mixins/gnu.py:193: ResourceWarning: unclosed file <_io.BufferedReader name=6>
  return gnulike_default_include_dirs(tuple(self.exelist), self.language).copy()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES 
/home/Programs/Python/Current/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 25335 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/Programs/Python/Current/lib/python3.9/site-packages/meson-0.59.0-py3.9.egg/mesonbuild/compilers/mixins/gnu.py:193: ResourceWarning: unclosed file <_io.BufferedReader name=6>
  return gnulike_default_include_dirs(tuple(self.exelist), self.language).copy()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
Compiler for C supports arguments -fvisibility=hidden: YES 
Compiler for C supports arguments -fno-strict-aliasing: YES 
Compiler for C++ supports arguments -fno-strict-aliasing: YES 
Message: Disabling GLib cast checks
Message: Disabling GLib asserts
Message: Disabling GLib checks
Has header "dlfcn.h" : YES 
Has header "fcntl.h" : YES 
Has header "inttypes.h" : YES 
Has header "memory.h" : YES 
Has header "netinet/in.h" : YES 
Has header "netinet/ip.h" : YES 
Has header "netinet/tcp.h" : YES 
Has header "pthread.h" : YES 
Has header "stdint.h" : YES 
Has header "stdlib.h" : YES 
Has header "strings.h" : YES 
Has header "string.h" : YES 
Has header "sys/param.h" : YES 
Has header "sys/socket.h" : YES 
Has header "sys/stat.h" : YES 
Has header "sys/time.h" : YES 
Has header "sys/types.h" : YES 
Has header "sys/utsname.h" : YES 
Has header "unistd.h" : YES 
Checking for function "dcgettext" : YES 
Checking for function "getpagesize" : YES 
Checking for function "gmtime_r" : YES 
Checking for function "memfd_create" : YES 
Checking for function "mmap" : YES 
Checking for function "pipe2" : YES 
Checking for function "getrusage" : YES 
Checking for size of "char" : 1
Checking for size of "int" : 4
Checking for size of "long" : 8
Checking for size of "short" : 2
Checking for size of "void*" : 8
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -Wdeclaration-after-statement: YES 
Compiler for C supports arguments -Wold-style-definition: YES 
Compiler for C++ supports arguments -Wformat-nonliteral: YES 
Compiler for C supports arguments -Wmissing-declarations: YES 
Compiler for C++ supports arguments -Wmissing-declarations: YES 
Compiler for C supports arguments -Wredundant-decls: YES 
Compiler for C++ supports arguments -Wredundant-decls: YES 
Compiler for C supports arguments -Wwrite-strings: YES 
Compiler for C++ supports arguments -Wwrite-strings: YES 
Compiler for C supports arguments -Wformat: YES 
Compiler for C++ supports arguments -Wformat: YES 
Compiler for C supports arguments -Wformat-security: YES 
Compiler for C++ supports arguments -Wformat-security: YES 
Compiler for C supports arguments -Winit-self: YES 
Compiler for C++ supports arguments -Winit-self: YES 
Compiler for C supports arguments -Wmissing-include-dirs: YES 
Compiler for C++ supports arguments -Wmissing-include-dirs: YES 
Compiler for C supports arguments -Waddress: YES 
Compiler for C++ supports arguments -Waddress: YES 
Compiler for C supports arguments -Wno-multichar: YES 
Compiler for C++ supports arguments -Wno-multichar: YES 
Compiler for C supports arguments -Wvla: YES 
Compiler for C++ supports arguments -Wvla: YES 
Compiler for C supports arguments -Wpointer-arith: YES 
Compiler for C++ supports arguments -Wpointer-arith: YES 
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency gstreamer-1.0 found: YES 1.18.4
Run-time dependency gstreamer-base-1.0 found: YES 1.18.4
Run-time dependency gstreamer-pbutils-1.0 found: YES 1.18.3
Run-time dependency gstreamer-audio-1.0 found: YES 1.18.3
Run-time dependency gstreamer-tag-1.0 found: YES 1.18.3
Run-time dependency gstreamer-video-1.0 found: YES 1.18.3
Run-time dependency gstreamer-gl-1.0 found: YES 1.18.3
Message: GStreamer OpenGL window systems: wayland x11
Message: GStreamer OpenGL platforms: egl glx
Message: GStreamer OpenGL apis: gles2 gl
Run-time dependency gstreamer-gl-prototypes-1.0 found: YES 1.18.3
Run-time dependency gstreamer-gl-x11-1.0 found: YES 1.18.3
Run-time dependency gstreamer-gl-wayland-1.0 found: YES 1.18.3
Run-time dependency gstreamer-gl-egl-1.0 found: YES 1.18.3
Library m found: YES
Run-time dependency glib-2.0 found: YES 2.68.4
Run-time dependency gmodule-2.0 found: YES 2.68.4
Run-time dependency gio-2.0 found: YES 2.68.4
Message: GStreamer debug system is disabled
Compiler for C supports arguments -Wno-unused: YES 
Compiler for C++ supports arguments -Wno-unused: YES 
Program g-ir-scanner found: YES (/usr/bin/g-ir-scanner)
Run-time dependency gtk4 found: YES 4.4.0
Run-time dependency gtk4-x11 found: YES 4.4.0
Run-time dependency gtk4-wayland found: YES 4.4.0
Program gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency gobject-introspection-1.0 found: YES 1.68.0
Dependency gobject-introspection-1.0 found: YES 1.68.0 (cached)
Program g-ir-scanner found: YES (/usr/bin/g-ir-scanner)
Dependency gobject-introspection-1.0 found: YES 1.68.0 (cached)
Program g-ir-compiler found: YES (/usr/bin/g-ir-compiler)
Configuring config.h using configuration
Program gjs found: YES (/usr/bin/gjs)
Configuring com.github.rafostar.Clapper using configuration
Program gjs found: YES (/usr/bin/gjs)
Configuring com.github.rafostar.Clapper.Remote using configuration
Program gjs found: YES (/usr/bin/gjs)
Configuring com.github.rafostar.Clapper.Daemon using configuration
Program build-aux/meson/postinstall.py found: YES (/Depot/jjj/clapper/build-aux/meson/postinstall.py)
Build targets in project: 8

Found ninja-1.10.1 at /usr/bin/ninja
[18/19] Generating GstClapper-1.0.gir with a custom command
FAILED: lib/gst/clapper/GstClapper-1.0.gir 
/usr/bin/g-ir-scanner --no-libtool --namespace=GstClapper --nsversion=1.0 --warn-all --output lib/gst/clapper/GstClapper-1.0.gir '--add-init-section=extern void gst_init(gint*,gchar**);g_setenv("GST_REGISTRY_1.0", "/Depot/jjj/clapper/BUILD_DIRECTORY/lib/gir_empty_registry.reg", TRUE);g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);gst_init(NULL,NULL);' --quiet -DGST_USE_UNSTABLE_API -I/Depot/jjj/clapper/lib/gst/clapper -I/Depot/jjj/clapper/BUILD_DIRECTORY/lib/gst/clapper -I/Depot/jjj/clapper/BUILD_DIRECTORY/lib/. -I/Depot/jjj/clapper/lib/. -I/Depot/jjj/clapper/BUILD_DIRECTORY/lib/gst -I/Depot/jjj/clapper/lib/gst --filelist=/Depot/jjj/clapper/BUILD_DIRECTORY/lib/gst/clapper/libgstclapper-1.0.so.0.3.0.p/GstClapper_1.0_gir_filelist --include=Gst-1.0 --include=GstPbutils-1.0 --include=GstBase-1.0 --include=GstVideo-1.0 --include=GstAudio-1.0 --include=GstTag-1.0 --symbol-prefix=gst --identifier-prefix=Gst --pkg-export=gstreamer-clapper-1.0 --cflags-begin -fvisibility=hidden -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wmissing-prototypes -Wdeclaration-after-statement -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wvla -Wpointer-arith -Wno-unused -I/Depot/jjj/clapper/BUILD_DIRECTORY/lib/. -I/Depot/jjj/clapper/lib/. -I/Depot/jjj/clapper/BUILD_DIRECTORY/lib/gst -I/Depot/jjj/clapper/lib/gst -I/usr/include/gtk-4.0 -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/home/Programs/Fribidi/1.0.9/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/home/Programs/Graphite2/1.3.14/include -I/usr/include/graphene-1.0 -I/usr/lib/graphene-1.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gstreamer-1.0 -I/home/Programs/Libunwind/1.5.0/include -I/home/Programs/Elfutils/0.185/include -I/usr/local/include -I/home/Programs/Gstpluginsbase/1.18.3/include/gstreamer-1.0 -I/home/Programs/Gstpluginsbase/1.18.3/lib64/gstreamer-1.0/include -I/usr/include/gobject-introspection-1.0 --cflags-end --add-include-path=/usr/share/gir-1.0 --add-include-path=/home/Programs/Gstpluginsbase/1.18.3/share/gir-1.0 -L./lib/gst/clapper --library gstclapper-1.0 --extra-library=gtk-4 --extra-library=pangocairo-1.0 --extra-library=pango-1.0 --extra-library=harfbuzz --extra-library=gdk_pixbuf-2.0 --extra-library=cairo-gobject --extra-library=cairo --extra-library=graphene-1.0 --extra-library=gio-2.0 --extra-library=gobject-2.0 --extra-library=glib-2.0 --extra-library=gstbase-1.0 --extra-library=gstreamer-1.0 -L/home/Programs/Gstpluginsbase/1.18.3/lib64 --extra-library=gstvideo-1.0 --extra-library=gstaudio-1.0 --extra-library=gsttag-1.0 --extra-library=gstpbutils-1.0 --extra-library=m --extra-library=gstgl-1.0 --extra-library=GL --extra-library=GLESv2 --extra-library=X11-xcb --extra-library=X11 --extra-library=xcb --extra-library=wayland-egl --extra-library=wayland-client --extra-library=EGL --extra-library=girepository-1.0 --sources-top-dirs /Depot/jjj/clapper/subprojects/ --sources-top-dirs /Depot/jjj/clapper/BUILD_DIRECTORY/subprojects/
/usr/bin/ld: ./lib/gst/clapper/libgstclapper-1.0.so: undefined reference to `gdk_x11_display_get_egl_display'
collect2: error: ld returned 1 exit status
linking of temporary binary failed: Command '['gcc', '-pthread', '-o', '/Depot/jjj/clapper/BUILD_DIRECTORY/tmp-introspect_5tjgx1j/GstClapper-1.0', '-O2', '-fPIC', '-fno-strict-overflow', '-Wno-error', '/Depot/jjj/clapper/BUILD_DIRECTORY/tmp-introspect_5tjgx1j/GstClapper-1.0.o', '-L.', '-Wl,-rpath,.', '-Wl,--no-as-needed', '-L./lib/gst/clapper', '-L/home/Programs/Gstpluginsbase/1.18.3/lib64', '-Wl,-rpath,/home/Programs/Gstpluginsbase/1.18.3/lib64', '-lgstclapper-1.0', '-lgtk-4', '-lpangocairo-1.0', '-lpango-1.0', '-lharfbuzz', '-lgdk_pixbuf-2.0', '-lcairo-gobject', '-lcairo', '-lgraphene-1.0', '-lgio-2.0', '-lgobject-2.0', '-lglib-2.0', '-lgstbase-1.0', '-lgstreamer-1.0', '-lgstvideo-1.0', '-lgstaudio-1.0', '-lgsttag-1.0', '-lgstpbutils-1.0', '-lm', '-lgstgl-1.0', '-lGL', '-lGLESv2', '-lX11-xcb', '-lX11', '-lxcb', '-lwayland-egl', '-lwayland-client', '-lEGL', '-lgirepository-1.0', '-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-lgmodule-2.0', '-pthread', '-lglib-2.0']' returned non-zero exit status 1.
ninja: build stopped: subcommand failed.

The error is:

undefined reference to `gdk_x11_display_get_egl_display'

Not sure how or why. I compile everything from source. gtk, xorg ...

Egl is probably that egl/meson/libepoxy thingy but I compiled that from source too. Perhaps some older version is picked up.

IF possible perhaps there could be a check prior to compiling by meson if that functionality is available and found?

I can fix things on linux but the more information I get from build tools and why things fail the better. meson is in many ways so much better than the GNU autoconfigure tools and it's still somewhat young-ish - hopefully it is easier to add checks than with the m4 macro situation in GNU configure. At any rate I just report this in case someone else may also have run into this issue. I'll have to clean up my host system first, then I will give it a try again at some later time so please feel free to disregard this issue - it's more information than a request to fix this. I'll give clapper a try at a later time, absolutely no problem. It really is only information really. Thank you for reading this, clapper looked really clean on the screenshots (I found it via someone recommending it via reddit by the way).

Rafostar commented 3 years ago

undefined reference to `gdk_x11_display_get_egl_display'

This function is in GTK4 and AFAIK should always be available when build with x11 support since gtk 4.3.1, can be seen in GTK4 source files here

There are already both checks (if GTK was build with x11 and GTK version check) in clapper sources done before it and your GTK version is 4.4.0, so I am not sure why your compiler cannot see it.

Rafostar commented 3 years ago

from KDE konsole terminal

But considering that this project targets and uses some GNOME related features (like gjs), you might be better of using Flatpak version on non-GNOME systems.

Edit: Well, as long as you have gjs and libadwaita installed, it should work when manually compiled.