Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233848 - error: storage size of 'ifr' isn't known
Summary: error: storage size of 'ifr' isn't known
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2008-08-03 21:18 UTC by Brad Fuller
Modified: 2008-08-20 06:54 UTC (History)
1 user (show)

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

remote.c - the file that generates the compile error (remote.c,22.09 KB, text/plain)
2008-08-06 17:33 UTC, Brad Fuller
media-sound:csound-5.08:20080808-021205.log.gz [partial build log] (20080808-021205.log.gz,7.40 KB, text/plain)
2008-08-08 02:28 UTC, Jeroen Roovers (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Fuller 2008-08-03 21:18:25 UTC
The error:
error: storage size of 'ifr' isn't known

is received when compiling OOps/remote.c which is a csound5 file (

ifr is defined as:

    struct ifreq ifr;

This has been traced to the header file linux/if.h which has the following at the beginning of the file:

#ifndef _LINUX_IF_H
# include <net/if.h>
# define _LINUX_IF_H

#ifndef _LINUX_IF_H
#define _LINUX_IF_H

This can be fixed if it is changed to:

#ifndef _LINUX_IF_H
# include <net/if.h>
/* # define _LINUX_IF_H */

#ifndef _LINUX_IF_H
#define _LINUX_IF_H

Reproducible: Always

Steps to Reproduce:
1. Compile OOps/remote.c

Actual Results:  
error: storage size of 'ifr' isn't known

Expected Results:  
Expected that linux.h would be the same as other distros
Comment 1 Brad Fuller 2008-08-03 21:21:46 UTC
Sorry, Expected Results should be:  
Expected that linux/if.h would be the same as other distros
Comment 2 Gilles Dartiguelongue gentoo-dev 2008-08-03 21:59:21 UTC
please provide emerge --info as instructed by bugzilla.
Comment 3 Brad Fuller 2008-08-04 01:08:22 UTC
#emerge --info

Portage (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6 x86_64)
System uname: 2.6.25-gentoo-r6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Timestamp of tree: Tue, 29 Jul 2008 01:30:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
CFLAGS="-O2 -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
FEATURES="distlocks metadata-transfer sfperms strict unmerge-orphans userfetch"
LINGUAS="en en_US"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow 3dnowext X a52 aac acl additions alsa amarok amd64 audiofile automount avi berkdb bitmap-fonts cddb cli cpudetection cracklib crypt cups dbus directfb divx divx4linux dri dssi dts dvb dvd dvdr dvdread encode fbcon ffmpeg fftw flac fortran fping freetype gdbm gif gimp gmedia gpm gsl gtk gtk2 hal iconv id3tag ipv6 isdnlog jack jack-tmpfs jackmidi java jpeg kernel-linux ladspa libsamplerate live lm_sensors mad midi mmx mmx2 mmxext mp2 mp3 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp oss pam pcre pdf perl png portaudio portmidi pppd python qt3 qt3support qt4 quicktime readline realmedia reflection session skins sndfile soundtouch spell spl sse sse2 sse3 ssl startup-notification stroke subtitles svg tcpd theora tiff truetype truetype-fonts twolame type1 type1-fonts udev unicode upnp usb v4l2 vamp vorbis vst wmf wmp wxwindows x264 xcomposite xine xorg xosd xscreensaver xulrunner xv xvid xvmc zlib" ALSA_CARDS="ice1712" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev"
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2008-08-04 14:01:54 UTC
Which ebuild do you actually refer to?
Comment 5 Wormo (RETIRED) gentoo-dev 2008-08-05 06:03:31 UTC
It looks like Brad is complaining about a failure compiling external source. The --info tells us linux-headers are version 2.6.23-r3 but the problem is more likely to be in the external source file, so he should attach the file with the compile error.

Brad: note I said "attach"... some people overlook the attachment link and paste a whole file into a comment ;)
Comment 6 Wormo (RETIRED) gentoo-dev 2008-08-05 06:09:10 UTC
Brad: also a download link for the exact package you're trying to compile could be helpful
Comment 7 Brad Fuller 2008-08-06 17:33:18 UTC
Created attachment 162376 [details]
remote.c - the file that generates the compile error
Comment 8 Brad Fuller 2008-08-06 17:40:37 UTC
> Wormo said:
> Brad: also a download link for the exact package you're 
> trying to compile could be helpful

any of the Csound5.08 found at this link. I used the Linux x86_64d:
Comment 9 Brad Fuller 2008-08-06 17:46:31 UTC
So sorry, I incorrectly stated the source code area link.
the actual SOURCE CODE to use is under the Source Code section:


direct link:
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-07 17:54:52 UTC
@Brad: please stop CC'ing yourself - as reporter you are certain to get all mail and CC'ing the reporter merely duplicates information.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-08 02:28:46 UTC
Created attachment 162480 [details]
media-sound:csound-5.08:20080808-021205.log.gz [partial build log]

[1] seems to documents how to use linux/if.h or net/if.h but not both, but also explains why having both will not work. Getting rid of the linux headers while leaving the libc headers included means it compiles:

--- OOps/remote.c.orig  2008-08-08 04:03:58.000000000 +0200
+++ OOps/remote.c       2008-08-08 04:07:04.000000000 +0200
@@ -27,10 +27,6 @@
 #ifndef WIN32
 #include <sys/ioctl.h>
-#ifdef LINUX
-#include <linux/if.h>
-#include <arpa/inet.h>
 #include <net/if.h>
 #endif /* HAVE_SOCKETS */

Comment 12 SpanKY gentoo-dev 2008-08-20 06:54:15 UTC
userspace applications should be using the C library definitions ... i dont see any requirement in that code as to why it should be banging on anything inside of linux/