Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882581 - app-emulation/nemu-3.1.0 fails to compile (CLANG-STRICTER-SYSTEM): nm_network.c:142:24: error: use of undeclared identifier IFF_UP
Summary: app-emulation/nemu-3.1.0 fails to compile (CLANG-STRICTER-SYSTEM): nm_network...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pavel Balaev
Depends on:
Blocks: c99-porting
  Show dependency tree
Reported: 2022-11-23 07:49 UTC by Agostino Sarubbo
Modified: 2024-04-03 09:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

build.log (build.log,219.84 KB, text/plain)
2022-11-23 07:49 UTC, Agostino Sarubbo

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-11-23 07:49:54 UTC

Issue: app-emulation/nemu-3.1.0 fails to compile (CLANG-STRICTER-SYSTEM).
Discovered on: amd64 (internal ref: clang-stricter_tinderbox)

(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:
Comment 1 Agostino Sarubbo gentoo-dev 2022-11-23 07:49:56 UTC
Created attachment 836003 [details]

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-11-23 07:49:57 UTC
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'
Comment 3 Pavel Balaev 2022-12-11 21:04:40 UTC
nEMu uses this in cmake:

    COMPILE_DEFINITIONS "-Wall -Wextra -pedantic -Werror")

  if(NOT NET_IF)

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                                                        
 * \                                 
 *   08ce521fb2546921f2642bef067d2cc02158b121                                   
 * \                                 
 *   6f270e6bd8b78aedf9f77534d6d11141ea0bf8ca                                   
#define _NET_IF_H 1                                                             
#include <net/if.h>                                                             
#ifndef IFNAMSIZ                                                                
#define IFNAMSIZ 16                                                             
extern unsigned int if_nametoindex(const char *__ifname) __THROW;               
#include <linux/if.h>                                                           
#include <net/if.h>                                                             
#include <linux/if.h>                                                           

I'll check is this not actual now. And create the patch if so.
Comment 4 Pavel Balaev 2022-12-11 21:06:54 UTC
It seems to me that the problem described above somehow affects the problem in this bug.