Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.6.0 fails to build when meson build type is plain: unknown type name 'DebugFlags' #169

Closed
bobby285271 opened this issue Jun 1, 2023 · 3 comments

Comments

@bobby285271
Copy link
Contributor

bobby285271 commented Jun 1, 2023

Hi,

We explicitly pass --buildtype=plain on all NixOS meson builds by default and the 2.6.0 build failed for me:

../libxapp/xapp-debug.c:31:8: error: unknown type name 'DebugFlags'
   31 | static DebugFlags flags = 0;
      |        ^~~~~~~~~~

Here is the full log:

building '/nix/store/6pksfaky39n3qwicmb4avfb0izb93dmf-xapp-2.6.0.drv'...
unpacking sources
unpacking source archive /nix/store/6igcvcx3siwgxizrd31l4lmbvffy38z3-source
source root is source
patching sources
patching script interpreter paths in libxapp/g-codegen.py meson-scripts/g-codegen.py schemas/meson_install_schemas.py
find: 'libxapp/g-codegen.py': No such file or directory
find: 'meson-scripts/g-codegen.py': No such file or directory
schemas/meson_install_schemas.py: interpreter directive changed from "#!/usr/bin/python3" to "/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/bin/python3"
configuring
meson flags: --buildtype=plain         --libdir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/lib --libexecdir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/libexec         --bindir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/bin --sbindir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/sbin         --includedir=/nix/store/3r9k4mn0jf527pk7r0nazdczm7yfac63-xapp-2.6.0-dev/include         --mandir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/share/man --infodir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/share/info         --localedir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/share/locale         -Dauto_features=enabled         -Dwrap_mode=nodownload         --prefix=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0 -Dpy-overrides-dir=/nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/lib/python3.10/site-packages/gi/overrides 
The Meson build system
Version: 1.1.0
Source dir: /build/source
Build dir: /build/source/build
Build type: native build
Project name: xapp
Project version: 2.6.0
C compiler for the host machine: gcc (gcc 12.2.0 "gcc (GCC) 12.2.0")
C linker for the host machine: gcc ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /nix/store/09jbh8y3jbq0gs47793rzn6i7yaabxmp-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
Run-time dependency dbus-1 found: YES 1.14.6
Configuring config.h using configuration
Run-time dependency gio-2.0 found: YES 2.76.2
Run-time dependency gio-unix-2.0 found: YES 2.76.2
Run-time dependency glib-2.0 found: YES 2.76.2
Run-time dependency gtk+-3.0 found: YES 3.24.37
Run-time dependency gmodule-2.0 found: YES 2.76.2
Run-time dependency gdk-pixbuf-2.0 found: YES 2.42.10
Run-time dependency cairo found: YES 1.16.0
Run-time dependency x11 found: YES 1.8.4
Program gdbus-codegen found: YES (/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/bin/gdbus-codegen)
Found pkg-config: /nix/store/09jbh8y3jbq0gs47793rzn6i7yaabxmp-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
Run-time dependency libgnomekbdui found: YES 3.28.1
Program gdbus-codegen found: YES (/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/bin/gdbus-codegen)
Program glib-mkenums found: YES (/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/bin/glib-mkenums)
Program glib-mkenums found: YES (/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/bin/glib-mkenums)
Run-time dependency gobject-introspection-1.0 found: YES 1.76.1
Dependency gobject-introspection-1.0 found: YES 1.76.1 (cached)
Program g-ir-scanner found: YES (/nix/store/nbrjdg3mxsrgxil6nf0lnk5sxdjd0m1p-gobject-introspection-1.76.1-dev/bin/g-ir-scanner)
Dependency gobject-introspection-1.0 found: YES 1.76.1 (cached)
Program g-ir-compiler found: YES (/nix/store/nbrjdg3mxsrgxil6nf0lnk5sxdjd0m1p-gobject-introspection-1.76.1-dev/bin/g-ir-compiler)
Program vapigen found: YES (/nix/store/45d7bf4y9d99rj7xmjn8b1xsl1pksfls-vala-0.56.7/bin/vapigen)
Program msgfmt found: YES (/nix/store/pm2xahw7akyr54z9n9pp5w4fkpf56466-gettext-0.21/bin/msgfmt)
Program msginit found: YES (/nix/store/pm2xahw7akyr54z9n9pp5w4fkpf56466-gettext-0.21/bin/msginit)
Program msgmerge found: YES (/nix/store/pm2xahw7akyr54z9n9pp5w4fkpf56466-gettext-0.21/bin/msgmerge)
Program xgettext found: YES (/nix/store/pm2xahw7akyr54z9n9pp5w4fkpf56466-gettext-0.21/bin/xgettext)
Run-time dependency pygobject-3.0 found: YES 3.44.1
Message: PyGObject overrides dir: /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/lib/python3.10/site-packages/gi/overrides
Configuring applet_constants.py using configuration
Configuring org.mate.panel.applet.MateXAppStatusAppletFactory.service using configuration
Configuring org.x.MateXAppStatusApplet.mate-panel-applet.in using configuration
Program gdbus-codegen found: YES (/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/bin/gdbus-codegen)
Program gdbus-codegen found: YES (/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/bin/gdbus-codegen)
Configuring org.x.StatusNotifierWatcher.service using configuration
Configuring xapp-sn-watcher.desktop using configuration
Run-time dependency dbusmenu-gtk3-0.4 found: YES 16.04.0
Run-time dependency cairo-gobject found: YES 1.16.0
Build targets in project: 81

xapp 2.6.0

  User defined options
    auto_features   : enabled
    bindir          : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/bin
    buildtype       : plain
    includedir      : /nix/store/3r9k4mn0jf527pk7r0nazdczm7yfac63-xapp-2.6.0-dev/include
    infodir         : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/share/info
    libdir          : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/lib
    libexecdir      : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/libexec
    localedir       : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/share/locale
    mandir          : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/share/man
    prefix          : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0
    sbindir         : /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/sbin
    wrap_mode       : nodownload
    py-overrides-dir: /nix/store/z0m0kf8vawjvfpzlb0ijw5gv4lz21ik1-xapp-2.6.0/lib/python3.10/site-packages/gi/overrides

Found ninja-1.11.1 at /nix/store/rcakkm09fivblba082qb6jch02926qhq-ninja-1.11.1/bin/ninja
meson: enabled parallel building
meson: enabled parallel installing
building
build flags: -j8
[1/107] Generating po/af/LC_MESSAGES/xapp-af.mo with a custom command
[2/107] Generating po/am/LC_MESSAGES/xapp-am.mo with a custom command
[3/107] Generating po/ar/LC_MESSAGES/xapp-ar.mo with a custom command
[4/107] Generating po/az/LC_MESSAGES/xapp-az.mo with a custom command
[5/107] Generating po/ber/LC_MESSAGES/xapp-ber.mo with a custom command
[6/107] Generating po/be/LC_MESSAGES/xapp-be.mo with a custom command
[7/107] Generating po/bg/LC_MESSAGES/xapp-bg.mo with a custom command
[8/107] Generating po/bn/LC_MESSAGES/xapp-bn.mo with a custom command
[9/107] Generating po/ca/LC_MESSAGES/xapp-ca.mo with a custom command
[10/107] Generating po/ca@valencia/LC_MESSAGES/xapp-ca@valencia.mo with a custom command
[11/107] Generating po/cs/LC_MESSAGES/xapp-cs.mo with a custom command
[12/107] Generating po/cy/LC_MESSAGES/xapp-cy.mo with a custom command
[13/107] Generating po/da/LC_MESSAGES/xapp-da.mo with a custom command
[14/107] Generating po/de/LC_MESSAGES/xapp-de.mo with a custom command
[15/107] Generating po/en_GB/LC_MESSAGES/xapp-en_GB.mo with a custom command
[16/107] Generating po/el/LC_MESSAGES/xapp-el.mo with a custom command
[17/107] Generating libxapp/xapp-statusicon-interface.c with a custom command
[18/107] Generating po/eo/LC_MESSAGES/xapp-eo.mo with a custom command
[19/107] Generating po/et/LC_MESSAGES/xapp-et.mo with a custom command
[20/107] Generating po/es/LC_MESSAGES/xapp-es.mo with a custom command
[21/107] Generating po/eu/LC_MESSAGES/xapp-eu.mo with a custom command
[22/107] Generating po/fi/LC_MESSAGES/xapp-fi.mo with a custom command
[23/107] Generating po/fr/LC_MESSAGES/xapp-fr.mo with a custom command
[24/107] Generating po/fr_CA/LC_MESSAGES/xapp-fr_CA.mo with a custom command
[25/107] Generating po/he/LC_MESSAGES/xapp-he.mo with a custom command
[26/107] Generating po/hi/LC_MESSAGES/xapp-hi.mo with a custom command
[27/107] Generating po/hr/LC_MESSAGES/xapp-hr.mo with a custom command
[28/107] Generating libxapp/xapp-switcheroo-interface.c with a custom command
[29/107] Generating po/hu/LC_MESSAGES/xapp-hu.mo with a custom command
[30/107] Generating libxapp/xapp-switcheroo-interface.h with a custom command
[31/107] Generating po/ia/LC_MESSAGES/xapp-ia.mo with a custom command
[32/107] Generating po/ie/LC_MESSAGES/xapp-ie.mo with a custom command
[33/107] Generating libxapp/xapp-statusicon-interface.h with a custom command
[34/107] Generating po/id/LC_MESSAGES/xapp-id.mo with a custom command
[35/107] Generating po/is/LC_MESSAGES/xapp-is.mo with a custom command
[36/107] Generating po/it/LC_MESSAGES/xapp-it.mo with a custom command
[37/107] Generating po/ja/LC_MESSAGES/xapp-ja.mo with a custom command
[38/107] Generating po/ka/LC_MESSAGES/xapp-ka.mo with a custom command
[39/107] Generating po/kab/LC_MESSAGES/xapp-kab.mo with a custom command
[40/107] Generating po/kk/LC_MESSAGES/xapp-kk.mo with a custom command
[41/107] Generating po/ko/LC_MESSAGES/xapp-ko.mo with a custom command
[42/107] Generating po/ku/LC_MESSAGES/xapp-ku.mo with a custom command
[43/107] Generating po/la/LC_MESSAGES/xapp-la.mo with a custom command
[44/107] Generating po/lt/LC_MESSAGES/xapp-lt.mo with a custom command
[45/107] Generating po/mai/LC_MESSAGES/xapp-mai.mo with a custom command
[46/107] Generating po/ms/LC_MESSAGES/xapp-ms.mo with a custom command
[47/107] Generating po/nl/LC_MESSAGES/xapp-nl.mo with a custom command
[48/107] Generating po/oc/LC_MESSAGES/xapp-oc.mo with a custom command
[49/107] Generating po/pl/LC_MESSAGES/xapp-pl.mo with a custom command
[50/107] Generating po/pt/LC_MESSAGES/xapp-pt.mo with a custom command
[51/107] Generating po/pt_BR/LC_MESSAGES/xapp-pt_BR.mo with a custom command
[52/107] Generating po/ro/LC_MESSAGES/xapp-ro.mo with a custom command
[53/107] Generating po/sk/LC_MESSAGES/xapp-sk.mo with a custom command
[54/107] Generating po/ru/LC_MESSAGES/xapp-ru.mo with a custom command
[55/107] Generating po/sv/LC_MESSAGES/xapp-sv.mo with a custom command
[56/107] Generating po/tr/LC_MESSAGES/xapp-tr.mo with a custom command
[57/107] Generating po/sl/LC_MESSAGES/xapp-sl.mo with a custom command
[58/107] Generating po/sr/LC_MESSAGES/xapp-sr.mo with a custom command
[59/107] Generating po/sr@latin/LC_MESSAGES/xapp-sr@latin.mo with a custom command
[60/107] Generating po/uk/LC_MESSAGES/xapp-uk.mo with a custom command
[61/107] Generating po/uz/LC_MESSAGES/xapp-uz.mo with a custom command
[62/107] Generating po/zgh/LC_MESSAGES/xapp-zgh.mo with a custom command
[63/107] Generating po/zh_CN/LC_MESSAGES/xapp-zh_CN.mo with a custom command
[64/107] Generating po/zh_HK/LC_MESSAGES/xapp-zh_HK.mo with a custom command
[65/107] Generating po/zh_TW/LC_MESSAGES/xapp-zh_TW.mo with a custom command
[66/107] Generating libxapp/xapp-enums.c with a custom command (wrapped by meson because command contains newlines, to capture output)
[67/107] Generating libxapp/xapp-enums.h with a custom command (wrapped by meson because command contains newlines, to capture output)
[68/107] Generating xapp-sn-watcher/sn-watcher-interface.h with a custom command
[69/107] Generating status-applets/mate/org.x.MateXAppStatusApplet.mate-panel-applet with a custom command
[70/107] Generating xapp-sn-watcher/sn-watcher-interface.c with a custom command
[71/107] Generating xapp-sn-watcher/sn-item-interface.c with a custom command
[72/107] Generating xapp-sn-watcher/sn-item-interface.h with a custom command
[73/107] Compiling C object libxapp/libxapp.so.2.6.0.p/meson-generated_.._xapp-enums.c.o
[74/107] Compiling C object libxapp/libxapp.so.2.6.0.p/meson-generated_.._xapp-switcheroo-interface.c.o
[75/107] Compiling C object libxapp/libxapp-gtk3-module.so.p/xapp-gtk3-module.c.o
[76/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-dark-mode-manager.c.o
../libxapp/xapp-dark-mode-manager.c:61:1: warning: 'color_scheme_name' defined but not used [-Wunused-function]
   61 | color_scheme_name (ColorScheme scheme)
      | ^~~~~~~~~~~~~~~~~
[77/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-glade-catalog.c.o
[78/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-gtk-window.c.o
[79/107] Compiling C object libxapp/libxapp.so.2.6.0.p/meson-generated_.._xapp-statusicon-interface.c.o
[80/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-favorites.c.o
[81/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-gpu-offload-helper.c.o
[82/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-icon-chooser-button.c.o
[83/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-preferences-window.c.o
[84/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-monitor-blanker.c.o
[85/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-stack-sidebar.c.o
[86/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-status-icon-monitor.c.o
[87/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-util.c.o
[88/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-icon-chooser-dialog.c.o
[89/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-visibility-group.c.o
[90/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-style-manager.c.o
[91/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-status-icon.c.o
../libxapp/xapp-status-icon.c:180:1: warning: 'direction_to_str' defined but not used [-Wunused-function]
  180 | direction_to_str (XAppScrollDirection direction)
      | ^~~~~~~~~~~~~~~~
../libxapp/xapp-status-icon.c:164:1: warning: 'state_to_str' defined but not used [-Wunused-function]
  164 | state_to_str (XAppStatusIconState state)
      | ^~~~~~~~~~~~
../libxapp/xapp-status-icon.c:148:1: warning: 'button_to_str' defined but not used [-Wunused-function]
  148 | button_to_str (guint button)
      | ^~~~~~~~~~~~~
../libxapp/xapp-status-icon.c:131:1: warning: 'panel_position_to_str' defined but not used [-Wunused-function]
  131 | panel_position_to_str (GtkPositionType type)
      | ^~~~~~~~~~~~~~~~~~~~~
[92/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-kbd-layout-controller.c.o
[93/107] Compiling C object libxapp/libxapp.so.2.6.0.p/xapp-debug.c.o
FAILED: libxapp/libxapp.so.2.6.0.p/xapp-debug.c.o 
gcc -Ilibxapp/libxapp.so.2.6.0.p -Ilibxapp -I../libxapp -I. -I.. -I/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/include -I/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/include/glib-2.0 -I/nix/store/n0bf4ddl69nk0lm6awh834syxqh0d3ss-glib-2.76.2/lib/glib-2.0/include -I/nix/store/zhl6wmjjsiclfyy69k37xpc1prswhjmw-glib-2.76.2-dev/include/gio-unix-2.0 -I/nix/store/aw4z09cvlpzz24znic2nq1lmfi467l3z-gtk+3-3.24.37-dev/include/gtk-3.0 -I/nix/store/v2absyp4xx76m6kvx17zn5jdbxlj2a97-at-spi2-core-2.48.0-dev/include/atk-1.0 -I/nix/store/48lsy5szyc0mq39sk7qlk7bapknghqwg-cairo-1.16.0-dev/include/cairo -I/nix/store/dzc1g33bjz113n6yvx1rbj234dc70nah-freetype-2.13.0-dev/include/freetype2 -I/nix/store/dzc1g33bjz113n6yvx1rbj234dc70nah-freetype-2.13.0-dev/include -I/nix/store/w9cwjmrnqjfh809n7bj0w2pc3xhkxbfi-gdk-pixbuf-2.42.10-dev/include/gdk-pixbuf-2.0 -I/nix/store/7axyaz2kf7g14h8mynzhjdki9jb7v50p-pango-1.50.14-dev/include/pango-1.0 -I/nix/store/1y5y02i5w5mv697vq147y18kzhrqdgmz-harfbuzz-7.2.0-dev/include/harfbuzz -I/nix/store/x5bim40wygc2847f3fz2c7g93p9c9fc2-xorgproto-2021.5/include -I/nix/store/1xsnjfdqb7ha3jmy05nd437v3wmj887s-libX11-1.8.4-dev/include -I/nix/store/6jskic2q3367zj4ifr1c17h0gi6blpws-libgnomekbd-3.28.1-dev/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wunused -Wimplicit-function-declaration -Wno-deprecated-declarations -Wno-deprecated -Wno-declaration-after-statement -fPIC -pthread -Wno-declaration-after-statement '-DG_LOG_DOMAIN="XApp"' -MD -MQ libxapp/libxapp.so.2.6.0.p/xapp-debug.c.o -MF libxapp/libxapp.so.2.6.0.p/xapp-debug.c.o.d -o libxapp/libxapp.so.2.6.0.p/xapp-debug.c.o -c ../libxapp/xapp-debug.c
../libxapp/xapp-debug.c:31:8: error: unknown type name 'DebugFlags'
   31 | static DebugFlags flags = 0;
      |        ^~~~~~~~~~
../libxapp/xapp-debug.c:35:18: error: 'XAPP_DEBUG_WINDOW' undeclared here (not in a function)
   35 |   { "GtkWindow", XAPP_DEBUG_WINDOW },
      |                  ^~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:36:18: error: 'XAPP_DEBUG_FAVORITES' undeclared here (not in a function)
   36 |   { "Favorites", XAPP_DEBUG_FAVORITES },
      |                  ^~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:37:20: error: 'XAPP_DEBUG_FAVORITE_VFS' undeclared here (not in a function)
   37 |   { "FavoriteVfs", XAPP_DEBUG_FAVORITE_VFS },
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:38:19: error: 'XAPP_DEBUG_STATUS_ICON' undeclared here (not in a function)
   38 |   { "StatusIcon", XAPP_DEBUG_STATUS_ICON },
      |                   ^~~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:39:18: error: 'XAPP_DEBUG_SN_WATCHER' undeclared here (not in a function)
   39 |   { "SnWatcher", XAPP_DEBUG_SN_WATCHER },
      |                  ^~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:40:18: error: 'XAPP_DEBUG_MODULE' undeclared here (not in a function)
   40 |   { "GtkModule", XAPP_DEBUG_MODULE},
      |                  ^~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:41:24: error: 'XAPP_DEBUG_VISIBILITY_GROUP' undeclared here (not in a function)
   41 |   { "VisibilityGroup", XAPP_DEBUG_VISIBILITY_GROUP},
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:42:19: error: 'XAPP_DEBUG_GPU_OFFLOAD' undeclared here (not in a function)
   42 |   { "GpuOffload", XAPP_DEBUG_GPU_OFFLOAD},
      |                   ^~~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:43:24: error: 'XAPP_DEBUG_DARK_MODE_MANAGER' undeclared here (not in a function)
   43 |   { "DarkModeManager", XAPP_DEBUG_DARK_MODE_MANAGER},
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:48:23: error: unknown type name 'DebugFlags'
   48 | debug_flag_to_string (DebugFlags flag)
      |                       ^~~~~~~~~~
../libxapp/xapp-debug.c: In function 'xapp_debug_set_flags_from_env':
../libxapp/xapp-debug.c:85:5: warning: implicit declaration of function 'xapp_debug_set_flags'; did you mean 'xapp_debug_set_flags_from_env'? [-Wimplicit-function-declaration]
   85 |     xapp_debug_set_flags (g_parse_debug_string (flags_string, keys, nkeys));
      |     ^~~~~~~~~~~~~~~~~~~~
      |     xapp_debug_set_flags_from_env
../libxapp/xapp-debug.c: At top level:
../libxapp/xapp-debug.c:91:23: error: unknown type name 'DebugFlags'
   91 | xapp_debug_set_flags (DebugFlags new_flags)
      |                       ^~~~~~~~~~
../libxapp/xapp-debug.c:98:25: error: unknown type name 'DebugFlags'
   98 | xapp_debug_flag_is_set (DebugFlags flag)
      |                         ^~~~~~~~~~
../libxapp/xapp-debug.c:104:13: error: unknown type name 'DebugFlags'
  104 | xapp_debug (DebugFlags flag,
      |             ^~~~~~~~~~
../libxapp/xapp-debug.c:115:20: error: unknown type name 'DebugFlags'
  115 | xapp_debug_valist (DebugFlags flag,
      |                    ^~~~~~~~~~
../libxapp/xapp-debug.c:75:1: warning: 'xapp_debug_set_flags_from_env' defined but not used [-Wunused-function]
   75 | xapp_debug_set_flags_from_env (void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libxapp/xapp-debug.c:31:19: warning: 'flags' defined but not used [-Wunused-variable]
   31 | static DebugFlags flags = 0;
      |                   ^~~~~
[94/107] Compiling C object libxapp/libxapp.so.2.6.0.p/favorite-vfs-file-enumerator.c.o
[95/107] Compiling C object libxapp/libxapp.so.2.6.0.p/favorite-vfs-file.c.o
[96/107] Compiling C object libxapp/libxapp.so.2.6.0.p/favorite-vfs-file-monitor.c.o
[97/107] Compiling C object xapp-sn-watcher/xapp-sn-watcher.p/meson-generated_.._sn-watcher-interface.c.o
[98/107] Compiling C object xapp-sn-watcher/xapp-sn-watcher.p/xapp-sn-watcher.c.o
[99/107] Compiling C object xapp-sn-watcher/xapp-sn-watcher.p/sn-item.c.o
[100/107] Compiling C object xapp-sn-watcher/xapp-sn-watcher.p/meson-generated_.._sn-item-interface.c.o
ninja: build stopped: subcommand failed.
error: builder for '/nix/store/6pksfaky39n3qwicmb4avfb0izb93dmf-xapp-2.6.0.drv' failed with exit code 1;

With a brief look this is likely the case when ENABLE_DEBUG is not enabled,

cdata.set('ENABLE_DEBUG', get_option('buildtype') in ['debug', 'debugoptimized'])

I gave --buildtype=debugoptimized a try and the build succeed, looking at this I wonder if we are encouraged to package in this way:

default_options : [ 'buildtype=debugoptimized' ],

@z1atk0
Copy link

z1atk0 commented Jun 3, 2023

Same here, configured with meson setup -D buildtype=release. The following patch fixes this problem (github won't let me add this as an attachment - "We don't support that file type" 🤷‍♂️).

diff -pru xapp-2.6.0-orig/libxapp/xapp-debug.c xapp-2.6.0/libxapp/xapp-debug.c
--- xapp-2.6.0-orig/libxapp/xapp-debug.c	2023-06-01 11:17:06.000000000 +0200
+++ xapp-2.6.0/libxapp/xapp-debug.c	2023-06-02 21:06:04.203763532 +0200
@@ -22,6 +22,8 @@
  * Copied from nemo
  */
 
+#ifdef ENABLE_DEBUG
+
 #include <stdarg.h>
 
 #include <glib.h>
@@ -127,3 +129,4 @@ xapp_debug_valist (DebugFlags flag,
   }
 }
 
+#endif

@mtwebster
Copy link
Member

I gave --buildtype=debugoptimized a try and the build succeed, looking at this I wonder if we are encouraged to package in this way:

As the guy fielding bug reports, I'd recommend it - I think that was the point of 'debugoptimized' also. There's a little bit of detail under rule 4 here.

@mtwebster
Copy link
Member

Fixed by 2015b64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants