https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: app-emulation/nemu-3.1.0 fails to compile (CLANG-STRICTER-SYSTEM). Discovered on: amd64 (internal ref: clang-stricter_tinderbox) NOTE: (CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types See also: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 https://wiki.gentoo.org/wiki/Modern_C_porting
Created attachment 836003 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: FAILED: CMakeFiles/nemu.dir/src/nm_network.c.o /var/tmp/portage/app-emulation/nemu-3.1.0/work/nemu-3.1.0/src/nm_network.c:142:24: error: use of undeclared identifier 'IFF_UP'
nEMu uses this in cmake: try_compile( NET_IF "${CMAKE_CURRENT_BINARY_DIR}/CMake_Tests" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Tests/net_if.c" COMPILE_DEFINITIONS "-Wall -Wextra -pedantic -Werror") if(NOT NET_IF) add_definitions(-DNM_NET_IF_FIX) endif() This is done to bypass problem: #ifdef NM_NET_IF_FIX /* Temporary work-around for broken glibc vs. linux kernel header definitions * This is already fixed upstream, remove this when distributions have updated. * net/if.h this should be removed someday in future, when kernels <= 4.2 * will not be supported * https://github.com/systemd/systemd/commit/ \ * 08ce521fb2546921f2642bef067d2cc02158b121 * https://github.com/systemd/systemd/commit/ \ * 6f270e6bd8b78aedf9f77534d6d11141ea0bf8ca */ #define _NET_IF_H 1 #include <net/if.h> #ifndef IFNAMSIZ #define IFNAMSIZ 16 extern unsigned int if_nametoindex(const char *__ifname) __THROW; #endif #include <linux/if.h> #else #include <net/if.h> #include <linux/if.h> #endif I'll check is this not actual now. And create the patch if so.
It seems to me that the problem described above somehow affects the problem in this bug.