After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793183 - [1.10.4] fails to build (error: '_Generic' selector of type 'NMDevice * {aka struct _NMDevice *}' is not compatible with any association)
[1.10.4] fails to build (error: '_Generic' selector of type 'NMDevice * {aka ...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-02-05 11:47 UTC by Dominique Leuenberger
Modified: 2018-02-05 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominique Leuenberger 2018-02-05 11:47:43 UTC
NetworkManager 1.10.4 has been released, and I'm trying to upgrade my system from 1.10.2 (working) to 1.10.4, but the compilation fails with:

In file included from ./shared/nm-default.h:178:0,
                 from src/devices/ovs/nm-device-ovs-interface.c:20:
src/devices/ovs/nm-device-ovs-interface.c: In function 'link_changed':
./shared/nm-utils/nm-macros-internal.h:299:13: error: '_Generic' selector of type 'NMDevice * {aka struct _NMDevice *}' is not compatible with any association
  (_Generic ((obj_expr), \
             ^
./shared/nm-utils/nm-macros-internal.h:352:62: note: in expansion of macro '_NM_CONSTCAST_FULL_2'
 #define _NM_CONSTCAST_FULL_x(type, obj_expr, obj, n, ...)   (_NM_CONSTCAST_FULL_##n (type, obj_expr, obj,                        ##__VA_ARGS__))
Comment 1 Dominique Leuenberger 2018-02-05 11:53:51 UTC
A complete build log is available at

https://build.opensuse.org/build/GNOME:Next/openSUSE_Factory/x86_64/NetworkManager/_log

configure is started with those parameters:

%configure \
    --disable-silent-rules \
    --with-hostname-persist=suse \
    --enable-ld-gc \
    --disable-static \
    --with-crypto=nss \
    --enable-gtk-doc \
    --enable-json-validation \
    --with-tests=yes \
    --with-netconfig=yes \
    --with-config-dns-rc-manager-default=netconfig \
    --enable-more-warnings=no \
    --with-pppd-plugin-dir=$pppddir \
    --with-dhclient=/sbin/dhclient \
    --with-dhcpcd=no \
    --with-udev-dir=%{_udevdir} \
    --with-modem-manager-1 \
    --enable-concheck \
    --enable-wifi=yes \
    --with-nmtui \
    --with-session-tracking=systemd \
    --with-suspend-resume=systemd
Comment 2 Thomas Haller 2018-02-05 13:07:11 UTC
thanks for reporting.

This is fixed upstream by:


master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=782578122c6cb23bdbee0b01eddceee1b967a673

nm-1-10: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=5159c34ea8923bf0c17fd31e183c5803b72b97f3


See also the related fix: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a43bf33888a639671bb7b7c7d37f416f1ef8dd79


A workaround could be to:

- build with --disable-ovs

- build with --enable-more-warnings=error, or set "CFLAGS=-Werror=strict-prototypes" to break detection of _Generic() support.
Comment 3 Dominique Leuenberger 2018-02-05 13:28:14 UTC
Thanks for the quick fix Thomas! I backported the two commits from nm-1-10 branch on to my package, which now built successfully (incl. the test suite)