GNOME Bugzilla – Bug 793183
[1.10.4] fails to build (error: '_Generic' selector of type 'NMDevice * {aka struct _NMDevice *}' is not compatible with any association)
Last modified: 2018-02-05 13:28:14 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__))
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
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.
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)