Closed antonio-rojas closed 11 months ago
Does adding this line help?
diff --git a/cut-n-paste/totem-screensaver/totem-scrsaver.c b/cut-n-paste/totem-screensaver/totem-scrsaver.c
index 92ea6bb..a508c76 100644
--- a/cut-n-paste/totem-screensaver/totem-scrsaver.c
+++ b/cut-n-paste/totem-screensaver/totem-scrsaver.c
@@ -32,6 +32,7 @@
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#include <X11/keysym.h>
+#include <X11/Xlib.h>
#ifdef HAVE_XTEST
#include <X11/extensions/XTest.h>
Does adding this line help?
No
This is the meson change that breaks it:
https://github.com/mesonbuild/meson/commit/a78af236862008f284d84ab9327a38886e086d8c
From our meson maintainer: "They're using link_whole all over the place, which doesn't carry dependencies properly". Downstream report: https://bugs.archlinux.org/task/79203
It has missing link requirements. It builds if I add -lX11 -lICE -lSM
%build
LDFLAGS+=' -lX11 -lICE -lSM'
%meson \
-Ddeprecated_warnings=false \
-Ddjvu=true \
-Ddvi=true \
-Dt1lib=true \
-Dpixbuf=true \
-Dcomics=true \
-Dintrospection=true \
-Dhelp_files=true
%meson_build
meson-1.2.0
[361/361] gcc -o shell/xreader shell/xreader.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--whole-archive -Wl,--start-group shell/libshell.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '-Wl,-rpath,$ORIGIN/../libview:$ORIGIN/../libdocument' -Wl,-rpath-link,/home/leigh/rpmbuild/BUILD/xreader-3.8.1/redhat-linux-build/libview -Wl,-rpath-link,/home/leigh/rpmbuild/BUILD/xreader-3.8.1/redhat-linux-build/libdocument libview/libxreaderview.so.3.0.0 libdocument/libxreaderdocument.so.3.0.0 /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libgtk-3.so /usr/lib64/libgdk-3.so /usr/lib64/libz.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libharfbuzz.so /usr/lib64/libatk-1.0.so /usr/lib64/libcairo-gobject.so /usr/lib64/libcairo.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libsecret-1.so -lm /usr/lib64/libxapp.so -Wl,--end-group
Old meson (includes paths for /usr/lib64/libX11.so /usr/lib64/libICE.so /usr/lib64/libSM.so)
[359/361] gcc -o shell/xreader shell/xreader.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--whole-archive -Wl,--start-group shell/libshell.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '-Wl,-rpath,$ORIGIN/../libview:$ORIGIN/../libdocument' -Wl,-rpath-link,/builddir/build/BUILD/xreader-3.8.1/redhat-linux-build/libview -Wl,-rpath-link,/builddir/build/BUILD/xreader-3.8.1/redhat-linux-build/libdocument libview/libxreaderview.so.3.0.0 libdocument/libxreaderdocument.so.3.0.0 libmisc/libmisc.a cut-n-paste/totem-screensaver/libtotemscrsaver.a cut-n-paste/smclient/libsmclient.a cut-n-paste/zoom-control/liblibephyzoom.a /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libgtk-3.so /usr/lib64/libgdk-3.so /usr/lib64/libz.so /usr/lib64/libatk-1.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libharfbuzz.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libcairo-gobject.so /usr/lib64/libpango-1.0.so /usr/lib64/libcairo.so /usr/lib64/libsecret-1.so -lm /usr/lib64/libxapp.so /usr/lib64/libX11.so /usr/lib64/libICE.so /usr/lib64/libSM.so -Wl,--end-group
https://pkgbuild.com/~heftig/xreader.diff replaces a lot of uses of link_whole
with declared dependencies, which fixes this FTBFS and is IMO a better approach to structuring the build because deps can also carry information about needed include directories and flags.
That patch breaks xreader (at runtime) in Mint 21, I'll have a look when I get some time.
[01:52:16 PM] mtwebster@mintbox3:~/bin> xreader
**
ERROR:../shell/ev-window.c:7699:ev_window_init: assertion failed (error == NULL): The resource at “/org/x/reader/shell/ui/xreader.xml” does not exist (g-resource-error-quark, 0)
Bail out! ERROR:../shell/ev-window.c:7699:ev_window_init: assertion failed (error == NULL): The resource at “/org/x/reader/shell/ui/xreader.xml” does not exist (g-resource-error-quark, 0)
Aborted (core dumped)
I've updated the patch to use link_whole
for the one dependency (on libshell) where this seems to matter, since GResource digs through the symbol table at runtime and we need to ensure the unused-at-link-time gresources are not skipped.
Issue Build fails with meson 1.2
Steps to reproduce
Expected behaviour Builds
Other information