AyatanaIndicators / ayatana-indicator-sound

Ayatana Indicator Sound Applet
GNU General Public License v3.0
2 stars 7 forks source link

Fails to build #103

Closed MorbidShell closed 4 months ago

MorbidShell commented 5 months ago

I was told to report the issue here from the Arch AUR. The package fails to build with the following errors:

/home/ravenghast/.cache/paru/clone/ayatana-indicator-sound/src/ayatana-indicator-sound-24.4.0/src/main.c: In function ‘on_bus_acquired’:
/home/ravenghast/.cache/paru/clone/ayatana-indicator-sound/src/ayatana-indicator-sound-24.4.0/src/main.c:68:13: error: assignment to ‘IndicatorSoundOptions *’ {aka ‘struct _IndicatorSoundOptions *’} from incompatible pointer type ‘IndicatorSoundOptionsGSettings *’ {aka ‘struct _IndicatorSoundOptionsGSettings *’} [-Wincompatible-pointer-types]
   68 |     options = indicator_sound_options_gsettings_new();
      |             ^
/home/ravenghast/.cache/paru/clone/ayatana-indicator-sound/src/ayatana-indicator-sound-24.4.0/src/main.c:71:13: error: assignment to ‘VolumeWarning *’ {aka ‘struct _VolumeWarning *’} from incompatible pointer type ‘VolumeWarningPulse *’ {aka ‘struct _VolumeWarningPulse *’} [-Wincompatible-pointer-types]
   71 |     warning = volume_warning_pulse_new(options, pgloop);
      |             ^
/home/ravenghast/.cache/paru/clone/ayatana-indicator-sound/src/ayatana-indicator-sound-24.4.0/src/main.c:73:56: error: passing argument 2 of ‘indicator_sound_service_new’ from incompatible pointer type [-Wincompatible-pointer-types]
   73 |     service = indicator_sound_service_new (playerlist, volume, accounts, options, warning, accounts_service_access);
      |                                                        ^~~~~~
      |                                                        |
      |                                                        VolumeControlPulse * {aka struct _VolumeControlPulse *}
In file included from /home/ravenghast/.cache/paru/clone/ayatana-indicator-sound/src/ayatana-indicator-sound-24.4.0/src/main.c:24:
/home/ravenghast/.cache/paru/clone/ayatana-indicator-sound/src/ayatana-indicator-sound-24.4.0/build/src/indicator-sound-service.h:880:68: note: expected ‘VolumeControl *’ {aka ‘struct _VolumeControl *’} but argument is of type ‘VolumeControlPulse *’ {aka ‘struct _VolumeControlPulse *’}
  880 |                                                     VolumeControl* volume,
      |                                                     ~~~~~~~~~~~~~~~^~~~~~
make[2]: *** [src/CMakeFiles/indicator-sound-service-bin.dir/build.make:76: src/CMakeFiles/indicator-sound-service-bin.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:481: src/CMakeFiles/indicator-sound-service-bin.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'ayatana-indicator-sound-24.4.0-1': 

While this output is from paru, I've tried building it manually from source as well, with the exact same error output.

tari01 commented 5 months ago

Just to make sure we test the build the same way, please try it like this:

git clone https://github.com/AyatanaIndicators/ayatana-indicator-sound.git
cd ayatana-indicator-sound
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_LIBEXECDIR='lib' -DENABLE_WERROR=ON
make

Still failing?

MorbidShell commented 4 months ago

Yep, with the following:

[ 35%] Linking C static library libindicator-sound-service-lib.a
[ 35%] Built target indicator-sound-service-lib
[ 35%] Building C object src/CMakeFiles/indicator-sound-service-bin.dir/main.c.o
/home/ravenghast/Hentet/ayatana-indicator-sound/src/main.c: In function ‘on_bus_acquired’:
/home/ravenghast/Hentet/ayatana-indicator-sound/src/main.c:68:13: error: assignment to ‘IndicatorSoundOptions *’ {aka ‘struct _IndicatorSoundOptions *’} from incompatible pointer type ‘IndicatorSoundOptionsGSettings *’ {aka ‘struct _IndicatorSoundOptionsGSettings *’} [-Wincompatible-pointer-types]
   68 |     options = indicator_sound_options_gsettings_new();
      |             ^
/home/ravenghast/Hentet/ayatana-indicator-sound/src/main.c:71:13: error: assignment to ‘VolumeWarning *’ {aka ‘struct _VolumeWarning *’} from incompatible pointer type ‘VolumeWarningPulse *’ {aka ‘struct _VolumeWarningPulse *’} [-Wincompatible-pointer-types]
   71 |     warning = volume_warning_pulse_new(options, pgloop);
      |             ^
/home/ravenghast/Hentet/ayatana-indicator-sound/src/main.c:73:56: error: passing argument 2 of ‘indicator_sound_service_new’ from incompatible pointer type [-Wincompatible-pointer-types]
   73 |     service = indicator_sound_service_new (playerlist, volume, accounts, options, warning, accounts_service_access);
      |                                                        ^~~~~~
      |                                                        |
      |                                                        VolumeControlPulse * {aka struct _VolumeControlPulse *}
In file included from /home/ravenghast/Hentet/ayatana-indicator-sound/src/main.c:24:
/home/ravenghast/Hentet/ayatana-indicator-sound/build/src/indicator-sound-service.h:880:68: note: expected ‘VolumeControl *’ {aka ‘struct _VolumeControl *’} but argument is of type ‘VolumeControlPulse *’ {aka ‘struct _VolumeControlPulse *’}
  880 |                                                     VolumeControl* volume,
      |                                                     ~~~~~~~~~~~~~~~^~~~~~
make[2]: *** [src/CMakeFiles/indicator-sound-service-bin.dir/build.make:76: src/CMakeFiles/indicator-sound-service-bin.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:481: src/CMakeFiles/indicator-sound-service-bin.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
tari01 commented 4 months ago

Hmm... I still can't replicate this. Could you please give me your versions of the packages below and also if each comes from the official repositories or the AUR?

accountsservice
dconf
glib2
glibc
libayatana-common
libgee
libnotify
libpulse
cmake-extras
gobject-introspection
intltool
libxml2
systemd
vala

I would also like to see your output of cmake .. -DCMAKE_INSTALL_LIBEXECDIR='lib' -DENABLE_WERROR=ON

MorbidShell commented 4 months ago

Package versions:

accountsservice  23.13.9-2                 
dconf 0.40.0-2               
glib2 2.80.2-2                
glibc 2.39+r52+gf8e4623421-1     
gobject-introspection  1.80.1-3            
intltool    0.51.0-6                   
libgee 0.20.6-1                
libnotify  0.8.3-1                   
libpulse  17.0-3                    
libxml2   2.12.6-2 
systemd 255 (255.6-1-arch)                         
vala 0.56.17-1                
cmake-extras (AUR) 1.7-1
libayatana-common (AUR) 0.9.10-1

Output from cmake .. -DCMAKE_INSTALL_LIBEXECDIR='lib' -DENABLE_WERROR=ON:

cmake .. -DCMAKE_INSTALL_LIBEXECDIR='lib' -DENABLE_WERROR=ON
-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.1")
-- Found Vala: /usr/bin/valac (found suitable version "0.56.17", minimum required is "0.20")
-- Checking for modules 'libpulse-mainloop-glib>=0.9.19;glib-2.0>=2.32;gio-unix-2.0>=2.25.13'
--   Found libpulse-mainloop-glib, version 17.0
--   Found glib-2.0, version 2.80.2
--   Found gio-unix-2.0, version 2.80.2
-- Checking for modules 'gee-0.8;gio-2.0>=2.25.13;gio-unix-2.0;gthread-2.0;libxml-2.0;libnotify;accountsservice;libayatana-common'
--   Found gee-0.8, version 0.20.6
--   Found gio-2.0, version 2.80.2
--   Found gio-unix-2.0, version 2.80.2
--   Found gthread-2.0, version 2.80.2
--   Found libxml-2.0, version 2.12.6
--   Found libnotify, version 0.8.3
--   Found accountsservice, version 23.13.0
--   Found libayatana-common, version 0.9.10
-- Checking for module 'gobject-introspection-1.0'
--   Found gobject-introspection-1.0, version 1.80.1
-- Found Gettext: /usr/bin/msgmerge (found version "0.22.5")
-- GSettings schemas will be installed into /usr/share/glib-2.0/schemas/
-- Checking for module 'systemd'
--   Found systemd, version 255
-- /usr/lib/systemd/user is the systemd user unit file install dir
-- Found Intltool: /usr/bin/intltool-update (found version "0.51.0")
-- Install prefix: /usr
-- Unit tests: OFF
-- Build with -Werror: ON
-- Build with Lomiri features: OFF
-- Configuring done (0.8s)
-- Generating done (0.1s)
-- Build files have been written to: /home/ravenghast/.git/ayatana-indicator-sound/build
tari01 commented 4 months ago

Thanks for reporting this. A new fixed release is coming soon.