Build errors: unknown type name ‘SOUP_AVAILABLE_IN_2_4’; did you mean ‘SOUP_AVAILABLE_IN_3_4’? and rmssdp.c:55:13: error: assignment to ‘const GUri *’ {aka ‘const struct _GUri *’} from incompatible pointer type [...].

Ahoj,

I want to build this (latest git checkout) on Artix GNU/Linux (rolling release).

  • GCC version: 15.1.1.
  • libsoup version: 2.74.3.
  • libsoup3 version: 3.6.5.

Build fails for me with different kind of errors:

  • libsoup-2.4/libsoup/soup-misc.h:14:1: error: unknown type name ‘SOUP_AVAILABLE_IN_2_4’; did you mean ‘SOUP_AVAILABLE_IN_3_4’? etc.:

    [35/82] ccache cc -Irm/librm.so.2.2.4.p -Irm -I../librm/rm -I. -I../librm -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libsoup-3.0 -I/usr/include/libxml2 -I/usr/include/json-glib-1.0 -I/usr/include/opus -I/usr/include/gupnp-1.2 -I/usr/include/gssdp-1.2 -I/usr/include/uuid -I/usr/include/libsoup-2.4 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -w -fPIC -pthread -DRM_COMPILATION '-DG_LOG_DOMAIN="rm"' -MD -MQ rm/librm.so.2.2.4.p/rmssdp.c.o -MF rm/librm.so.2.2.4.p/rmssdp.c.o.d -o rm/librm.so.2.2.4.p/rmssdp.c.o -c ../librm/rm/rmssdp.c
    FAILED: rm/librm.so.2.2.4.p/rmssdp.c.o 
    ccache cc -Irm/librm.so.2.2.4.p -Irm -I../librm/rm -I. -I../librm -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libsoup-3.0 -I/usr/include/libxml2 -I/usr/include/json-glib-1.0 -I/usr/include/opus -I/usr/include/gupnp-1.2 -I/usr/include/gssdp-1.2 -I/usr/include/uuid -I/usr/include/libsoup-2.4 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -w -fPIC -pthread -DRM_COMPILATION '-DG_LOG_DOMAIN="rm"' -MD -MQ rm/librm.so.2.2.4.p/rmssdp.c.o -MF rm/librm.so.2.2.4.p/rmssdp.c.o.d -o rm/librm.so.2.2.4.p/rmssdp.c.o -c ../librm/rm/rmssdp.c
    In file included from /usr/include/libsoup-2.4/libsoup/soup-uri.h:12,
                    from /usr/include/gupnp-1.2/libgupnp/gupnp-device-info.h:14,
                    from /usr/include/gupnp-1.2/libgupnp/gupnp-device-proxy.h:12,
                    from /usr/include/gupnp-1.2/libgupnp/gupnp-control-point.h:16,
                    from /usr/include/gupnp-1.2/libgupnp/gupnp-context-manager.h:16,
                    from /usr/include/gupnp-1.2/libgupnp/gupnp.h:11,
                    from ../librm/rm/rmssdp.c:32:
    /usr/include/libsoup-2.4/libsoup/soup-misc.h:14:1: error: unknown type name ‘SOUP_AVAILABLE_IN_2_4’; did you mean ‘SOUP_AVAILABLE_IN_3_4’?
      14 | SOUP_AVAILABLE_IN_2_4
          | ^~~~~~~~~~~~~~~~~~~~~
          | SOUP_AVAILABLE_IN_3_4
    /usr/include/libsoup-2.4/libsoup/soup-misc.h:15:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
      15 | GSource           *soup_add_io_watch         (GMainContext *async_context,
          |                   ^
    /usr/include/libsoup-2.4/libsoup/soup-misc.h:20:1: error: unknown type name ‘SOUP_AVAILABLE_IN_2_4’; did you mean ‘SOUP_AVAILABLE_IN_3_4’?
      20 | SOUP_AVAILABLE_IN_2_4
          | ^~~~~~~~~~~~~~~~~~~~~
          | SOUP_AVAILABLE_IN_3_4
    [...]
    usr/include/libsoup-2.4/libsoup/soup-uri.h:133:1: error: unknown type name ‘SOUP_AVAILABLE_IN_2_28’; did you mean ‘SOUP_AVAILABLE_IN_3_2’?
    133 | SOUP_AVAILABLE_IN_2_28
        | ^~~~~~~~~~~~~~~~~~~~~~
        | SOUP_AVAILABLE_IN_3_2
    /usr/include/libsoup-2.4/libsoup/soup-uri.h:134:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘soup_uri_host_equal’
      134 | gboolean    soup_uri_host_equal            (gconstpointer v1,
          |             ^~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/gupnp-1.2/libgupnp/gupnp-device-info.h:17:
    /usr/include/gupnp-1.2/libgupnp/gupnp-service-info.h:60:7: error: unknown type name ‘SoupURI’
      60 | const SoupURI *
          |       ^~~~~~~
    /usr/include/gupnp-1.2/libgupnp/gupnp-device-info.h:59:7: error: unknown type name ‘SoupURI’
      59 | const SoupURI *
          |       ^~~~~~~
  • GCC-warning "incompatible-pointer-types" treated as error:

    ../librm/rm/rmssdp.c: In function ‘rm_device_proxy_available_cb’:
    ../librm/rm/rmssdp.c:55:13: error: assignment to ‘const GUri *’ {aka ‘const struct _GUri *’} from incompatible pointer type ‘const int *’ [-Wincompatible-pointer-types]
      55 |         uri = gupnp_device_info_get_url_base(info);
          |             ^
    ninja: build stopped: subcommand failed.

The second one I could workaround by adding -Wno-error=incompatible-pointer-types to $CFLAGS/ $CXXFLAGS environment variable.

The first one I don't know about. Maybe it needs to more specifically use the correct libsoup version, when 2.x and 3.x are both installed?

Regards!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information