LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-04-2023, 11:47 PM   #1
Blademasterz
LQ Newbie
 
Registered: Dec 2020
Location: Earth
Distribution: Gentoo/LFS/Artix
Posts: 15

Rep: Reputation: 0
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.
 
Old 04-07-2023, 07:28 AM   #2
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Quote:
Originally Posted by Blademasterz View Post
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.
 
Old 04-07-2023, 09:13 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
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.
 
Old 04-07-2023, 10:29 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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.
 
Old 04-07-2023, 06:35 PM   #5
Blademasterz
LQ Newbie
 
Registered: Dec 2020
Location: Earth
Distribution: Gentoo/LFS/Artix
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by coltson View Post
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?
 
Old 04-08-2023, 05:09 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Quote:
Originally Posted by Blademasterz View Post
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.
 
Old 04-16-2023, 07:48 AM   #7
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Quote:
Originally Posted by Blademasterz View Post
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) ?

Last edited by coltson; 04-16-2023 at 07:50 AM.
 
1 members found this post helpful.
Old 04-23-2023, 10:26 PM   #8
Blademasterz
LQ Newbie
 
Registered: Dec 2020
Location: Earth
Distribution: Gentoo/LFS/Artix
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by coltson View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spice-gtk & gtk-vnc SBo build fail. Meson sandbox violation. tiechiman Slackware 2 07-23-2022 10:41 PM
[SOLVED] "<gtk/gtk.h> not found" when trying to compile C GTK program. bcsm Programming 4 07-25-2021 12:28 PM
Call for Testers: Comparison of MATE 1.14 (mix build vs fully GTK+3 build) willysr Slackware 33 05-10-2016 03:40 PM
[SOLVED] if [[ -n "$1" ]]; then FAIL FAIL FAIL rbees Programming 7 03-25-2015 02:39 PM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration