LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   GTK+-3.24.36 Fail to build (https://www.linuxquestions.org/questions/linux-from-scratch-13/gtk-3-24-36-fail-to-build-4175723767/)

Blademasterz 04-04-2023 11:47 PM

GTK+-3.24.36 Fail to build
 
Following this instruction i got this error while compiling gtk3:
Code:

[118/1565] Generating gdk/Gdk-3.0.gir with a custom command (wrapped by meson to set env)
FAILED: gdk/Gdk-3.0.gir
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/sources/BLFS/gtk+-3.24.36/build/meson-uninstalled /usr/bin/g-ir-scanner --quiet --no-libtool --namespace=Gdk --nsversion=3.0 --warn-all --output gdk/Gdk-3.0.gir --c-include=gdk/gdk.h --quiet -DGDK_COMPILATION -I/sources/BLFS/gtk+-3.24.36/gdk -I/sources/BLFS/gtk+-3.24.36/build/gdk -I/sources/BLFS/gtk+-3.24.36/. -I/sources/BLFS/gtk+-3.24.36/build/. -I/sources/BLFS/gtk+-3.24.36/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/build/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/gdk/. -I/sources/BLFS/gtk+-3.24.36/build/gdk/. --filelist=/sources/BLFS/gtk+-3.24.36/build/gdk/libgdk-3.so.0.2404.32.p/Gdk_3.0_gir_filelist --include=cairo-1.0 --include=Gio-2.0 --include=GdkPixbuf-2.0 --include=Pango-1.0 --symbol-prefix=gdk --identifier-prefix=Gdk --pkg-export=gdk-3.0 --cflags-begin -DG_LOG_USE_STRUCTURED=1 -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_56 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_58 '-DGTK_VERSION="3.24.36"' -D_GNU_SOURCE -DG_DISABLE_CAST_CHECKS -I/sources/BLFS/gtk+-3.24.36/. -I/sources/BLFS/gtk+-3.24.36/build/. -I/sources/BLFS/gtk+-3.24.36/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/build/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/gdk/. -I/sources/BLFS/gtk+-3.24.36/build/gdk/. -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/gio-unix-2.0 -I/usr/include/gobject-introspection-1.0 --cflags-end --add-include-path=/usr/share/gir-1.0 -L/sources/BLFS/gtk+-3.24.36/build/gdk --library gdk-3 --extra-library=m --extra-library=gdk_pixbuf-2.0 --extra-library=gobject-2.0 --extra-library=glib-2.0 --extra-library=cairo --extra-library=pango-1.0 --extra-library=harfbuzz --extra-library=fribidi --extra-library=cairo-gobject --extra-library=epoxy --extra-library=fontconfig --extra-library=freetype --extra-library=gio-2.0 --extra-library=pangocairo-1.0 --extra-library=xkbcommon --extra-library=wayland-client --extra-library=wayland-cursor --extra-library=wayland-egl --extra-library=Xrender --extra-library=X11 --extra-library=Xi --extra-library=Xext --extra-library=Xcursor --extra-library=Xdamage --extra-library=Xfixes --extra-library=Xcomposite --extra-library=Xrandr --extra-library=Xinerama --extra-library=girepository-1.0 --sources-top-dirs /sources/BLFS/gtk+-3.24.36/ --sources-top-dirs /sources/BLFS/gtk+-3.24.36/build/
/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/Gdk-3.0: symbol lookup error: /sources/BLFS/gtk+-3.24.36/build/gdk/libgdk-3.so.0: undefined symbol: cairo_xlib_surface_create_for_bitmap
Command '['/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/Gdk-3.0', '--introspect-dump=/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/functions.txt,/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/dump.xml']' returned non-zero exit status 127.
[120/1565] Compiling C object gtk/libgtk-3.so.0.2404.32.p/gtkactionbar.c.o
ninja: build stopped: subcommand failed.

Tried reinstalling the required dependency but still got the same error.

coltson 04-07-2023 07:28 AM

Quote:

Originally Posted by Blademasterz (Post 6422387)
Following this instruction i got this error while compiling gtk3:
Code:

[118/1565] Generating gdk/Gdk-3.0.gir with a custom command (wrapped by meson to set env)
FAILED: gdk/Gdk-3.0.gir
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/sources/BLFS/gtk+-3.24.36/build/meson-uninstalled /usr/bin/g-ir-scanner --quiet --no-libtool --namespace=Gdk --nsversion=3.0 --warn-all --output gdk/Gdk-3.0.gir --c-include=gdk/gdk.h --quiet -DGDK_COMPILATION -I/sources/BLFS/gtk+-3.24.36/gdk -I/sources/BLFS/gtk+-3.24.36/build/gdk -I/sources/BLFS/gtk+-3.24.36/. -I/sources/BLFS/gtk+-3.24.36/build/. -I/sources/BLFS/gtk+-3.24.36/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/build/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/gdk/. -I/sources/BLFS/gtk+-3.24.36/build/gdk/. --filelist=/sources/BLFS/gtk+-3.24.36/build/gdk/libgdk-3.so.0.2404.32.p/Gdk_3.0_gir_filelist --include=cairo-1.0 --include=Gio-2.0 --include=GdkPixbuf-2.0 --include=Pango-1.0 --symbol-prefix=gdk --identifier-prefix=Gdk --pkg-export=gdk-3.0 --cflags-begin -DG_LOG_USE_STRUCTURED=1 -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_56 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_58 '-DGTK_VERSION="3.24.36"' -D_GNU_SOURCE -DG_DISABLE_CAST_CHECKS -I/sources/BLFS/gtk+-3.24.36/. -I/sources/BLFS/gtk+-3.24.36/build/. -I/sources/BLFS/gtk+-3.24.36/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/build/gdk/x11 -I/sources/BLFS/gtk+-3.24.36/gdk/. -I/sources/BLFS/gtk+-3.24.36/build/gdk/. -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/gio-unix-2.0 -I/usr/include/gobject-introspection-1.0 --cflags-end --add-include-path=/usr/share/gir-1.0 -L/sources/BLFS/gtk+-3.24.36/build/gdk --library gdk-3 --extra-library=m --extra-library=gdk_pixbuf-2.0 --extra-library=gobject-2.0 --extra-library=glib-2.0 --extra-library=cairo --extra-library=pango-1.0 --extra-library=harfbuzz --extra-library=fribidi --extra-library=cairo-gobject --extra-library=epoxy --extra-library=fontconfig --extra-library=freetype --extra-library=gio-2.0 --extra-library=pangocairo-1.0 --extra-library=xkbcommon --extra-library=wayland-client --extra-library=wayland-cursor --extra-library=wayland-egl --extra-library=Xrender --extra-library=X11 --extra-library=Xi --extra-library=Xext --extra-library=Xcursor --extra-library=Xdamage --extra-library=Xfixes --extra-library=Xcomposite --extra-library=Xrandr --extra-library=Xinerama --extra-library=girepository-1.0 --sources-top-dirs /sources/BLFS/gtk+-3.24.36/ --sources-top-dirs /sources/BLFS/gtk+-3.24.36/build/
/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/Gdk-3.0: symbol lookup error: /sources/BLFS/gtk+-3.24.36/build/gdk/libgdk-3.so.0: undefined symbol: cairo_xlib_surface_create_for_bitmap
Command '['/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/Gdk-3.0', '--introspect-dump=/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/functions.txt,/sources/BLFS/gtk+-3.24.36/build/tmp-introspectgwf3czqp/dump.xml']' returned non-zero exit status 127.
[120/1565] Compiling C object gtk/libgtk-3.so.0.2404.32.p/gtkactionbar.c.o
ninja: build stopped: subcommand failed.

Tried reinstalling the required dependency but still got the same error.

Quote:

symbol lookup error: /sources/BLFS/gtk+-3.24.36/build/gdk/libgdk-3.so.0: undefined symbol: cairo_xlib_surface_create_for_bitmap
Apparently, Cairo was build without Xlib support, the main library of the X Window System.
I believe that, or you forgot that pass some parameters to configure when building Cairo, or there might be a problem with your XLib library. Another possibility would the Xlib version to not new enough, but this seems extremely unlikely to me.

hazel 04-07-2023 09:13 AM

I just checked the cairo build in the BLFS Book, and xorg libraries are described as "recommended". In LFS that usually means that it is technically possible to build the package without this dependency but it probably won't work in the LFS build environment. As seen here.

@coltson: library version clashes might occur in the development version of BLFS but I can't remember it ever happening in the stable version.

Keith Hedger 04-07-2023 10:29 AM

You used to be able to build gtk with a different backend eg the framebuffer, in which case xorg would be an optional dependency, dont know if you can still do this, but either way you had to specially ask for a different backend, it never worked well anyway.

Blademasterz 04-07-2023 06:35 PM

Quote:

Originally Posted by coltson (Post 6422970)
Apparently, Cairo was build without Xlib support, the main library of the X Window System.
I believe that, or you forgot that pass some parameters to configure when building Cairo, or there might be a problem with your XLib library. Another possibility would the Xlib version to not new enough, but this seems extremely unlikely to me.

Is there some configure option to build cairo with Xlib support?

hazel 04-08-2023 05:09 AM

Quote:

Originally Posted by Blademasterz (Post 6423077)
Is there some configure option to build cairo with Xlib support?

There should be no need. If you have the libraries built and installed, the cairo configuration script (or meson if it uses that) should find them and configure the build accordingly.

coltson 04-16-2023 07:48 AM

Quote:

Originally Posted by Blademasterz (Post 6423077)
Is there some configure option to build cairo with Xlib support?

As Hazel said, theoretically it shouldn't be necessary to pass, as LFS installs the packages in the standard directories.

What's the output of: nm -s libcairo.so.x.x.x | grep cairo_xlib_surface_create_for_bitmap (replace x.x.x by your version of Cairo) ?

Blademasterz 04-23-2023 10:26 PM

Quote:

Originally Posted by coltson (Post 6424931)
As Hazel said, theoretically it shouldn't be necessary to pass, as LFS installs the packages in the standard directories.

What's the output of: nm -s libcairo.so.x.x.x | grep cairo_xlib_surface_create_for_bitmap (replace x.x.x by your version of Cairo) ?

Haha, thanks for pointing that out, looks like I have two version of cairo installed and the culprit was the latest version of it installed without xlib support, I was able to build gtk+-3 after removing it :D


All times are GMT -5. The time now is 05:08 PM.