compilation fails on Fedora 35 with: error: Class Adw.Leaflet does not contain a property called can-navigate-back
Hi,
compiling extension-manager on Fedora 35 fails with this error messages:
`+ cd extension-manager-0.2.3
- CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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'
- export CFLAGS
- CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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'
- export CXXFLAGS
- FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -I/usr/lib64/gfortran/modules'
- export FFLAGS
- FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -I/usr/lib64/gfortran/modules'
- export FCFLAGS
- LDFLAGS='-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 '
- export LDFLAGS
- LT_SYS_LIBRARY_PATH=/usr/lib64:
- export LT_SYS_LIBRARY_PATH
- CC=gcc
- export CC
- CXX=g++
- export CXX
- /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . redhat-linux-build The Meson build system Version: 0.59.4 Source dir: /home/martin/rpmbuild/BUILD/extension-manager-0.2.3 Build dir: /home/martin/rpmbuild/BUILD/extension-manager-0.2.3/redhat-linux-build Build type: native build Project name: extension-manager Project version: 0.2.3 C compiler for the host machine: gcc (gcc 11.2.1 "gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)") C linker for the host machine: gcc ld.bfd 2.37-10 Host machine cpu family: x86_64 Host machine cpu: x86_64 Configuring exm-config.h using configuration Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate) Program appstream-util found: YES (/usr/bin/appstream-util) Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas) Found pkg-config: /usr/bin/pkg-config (1.8.0) Run-time dependency gtk4 found: YES 4.4.2 Run-time dependency libadwaita-1 found: YES 1.0.0.alpha.4 Run-time dependency json-glib-1.0 found: YES 1.6.6 Run-time dependency libsoup-3.0 found: YES 3.0.4 Program blueprint-compiler found: YES (/usr/bin/blueprint-compiler) Found pkg-config: /usr/bin/pkg-config (1.8.0) Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources) Program build-aux/meson/postinstall.py found: YES (/home/martin/rpmbuild/BUILD/extension-manager-0.2.3/build-aux/meson/postinstall.py) Build targets in project: 9
Found ninja-1.10.2 at /usr/bin/ninja
- /usr/bin/meson compile -C redhat-linux-build -j 2 --verbose ninja: Entering directory `redhat-linux-build' [1/26] /usr/bin/meson --internal msgfmthelper ../data/com.mattjakeman.ExtensionManager.desktop.in data/com.mattjakeman.ExtensionManager.desktop desktop ../data/../po [2/26] /usr/bin/meson --internal msgfmthelper ../data/com.mattjakeman.ExtensionManager.appdata.xml.in data/com.mattjakeman.ExtensionManager.appdata.xml xml ../data/../po [3/26] /usr/bin/blueprint-compiler batch-compile src/. ../src ../src/gtk/help-overlay.blp ../src/exm-window.blp ../src/exm-installed-page.blp ../src/exm-browse-page.blp ../src/exm-extension-row.blp ../src/exm-search-row.blp ../src/exm-detail-view.blp ../src/exm-screenshot.blp FAILED: src /usr/bin/blueprint-compiler batch-compile src/. ../src ../src/gtk/help-overlay.blp ../src/exm-window.blp ../src/exm-installed-page.blp ../src/exm-browse-page.blp ../src/exm-extension-row.blp ../src/exm-search-row.blp ../src/exm-detail-view.blp ../src/exm-screenshot.blp error: Class Adw.Leaflet does not contain a property called can-navigate-back at ../src/exm-window.blp line 9 column 4: 9 | can-navigate-back: true; | ^ hint: Did you check your spelling? hint: Are your dependencies up to date?
ninja: build stopped: subcommand failed. `
looks like libadwaita-1.1 is necessary
$ rpm -qa |grep libadwaita libadwaita-doc-1.0.0-0.6.alpha.4.fc35.noarch libadwaita-1.1~rc-1.fc35.x86_64 libadwaita-devel-1.1~rc-1.fc35.x86_64 libadwaita-demo-1.1~rc-1.fc35.noarch
Odd... We definitely don't need libadwaita 1.1
Taking a look at the flathub manifest, we're using a git snapshot of v1.0.1 for that build.
Can you try removing that can-navigate-back property in exm-window.blp and build again? That was changed between pre-1.0 and the proper release of libadwaita so perhaps that's the culprit.
removed the deps in this 2 files:
sed -i -e 's|can-navigate-back: true;||' src/exm-window.blp
sed -i -e '/libadwaita-1/d' src/meson.build
but the compilation fails with this error message:
Found ninja-1.10.2 at /usr/bin/ninja
+ /usr/bin/meson compile -C redhat-linux-build -j 2 --verbose
ninja: Entering directory `redhat-linux-build'
[1/26] /usr/bin/meson --internal msgfmthelper ../data/com.mattjakeman.ExtensionManager.desktop.in data/com.mattjakeman.ExtensionManager.desktop desktop ../data/../po
[2/26] /usr/bin/meson --internal msgfmthelper ../data/com.mattjakeman.ExtensionManager.appdata.xml.in data/com.mattjakeman.ExtensionManager.appdata.xml xml ../data/../po
[3/26] /usr/bin/blueprint-compiler batch-compile src/. ../src ../src/gtk/help-overlay.blp ../src/exm-window.blp ../src/exm-installed-page.blp ../src/exm-browse-page.blp ../src/exm-extension-row.blp ../src/exm-search-row.blp ../src/exm-detail-view.blp ../src/exm-screenshot.blp
FAILED: src
/usr/bin/blueprint-compiler batch-compile src/. ../src ../src/gtk/help-overlay.blp ../src/exm-window.blp ../src/exm-installed-page.blp ../src/exm-browse-page.blp ../src/exm-extension-row.blp ../src/exm-search-row.blp ../src/exm-detail-view.blp ../src/exm-screenshot.blp
error: Namespace Adw-1 could not be found
at ../src/exm-window.blp line 2 column 7:
2 |using Adw 1;
| ^
error: Namespace Adw was not imported
at ../src/exm-window.blp line 4 column 22:
4 |template ExmWindow : Adw.ApplicationWindow {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 8 column 3:
8 | Adw.Leaflet leaflet {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 15 column 5:
15 | Adw.HeaderBar header_bar {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 19 column 5:
19 | Adw.ViewSwitcherTitle title {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 36 column 5:
36 | Adw.ViewStack view_stack {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 40 column 7:
40 | Adw.ViewStackPage {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 48 column 6:
48 | Adw.ViewStackPage {
| ^
hint: Did you mean `Gtk`?
error: Namespace Adw was not imported
at ../src/exm-window.blp line 57 column 5:
57 | Adw.ViewSwitcherBar {
| ^
hint: Did you mean `Gtk`?
9 errors
ninja: build stopped: subcommand failed.
Is this still an issue as of Extension Manager 0.3.1?
I just tried downloading it as a flathub on F35 and it may be because my spin but it definitely didn't work correctly and gve me failed CLI outputs and incompatible GUI options.
This shouldn't be a problem now that we're targeting libadwaita 1.2