Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 270283 - net-misc/dahdi-tools-2.1.0.2 build fails with newer linux-headers due to ifreq rename
Summary: net-misc/dahdi-tools-2.1.0.2 build fails with newer linux-headers due to ifre...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-18 12:30 UTC by Csaba Tóth
Modified: 2009-10-28 11:25 UTC (History)
6 users (show)

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


Attachments
this applies to dahdi-tools-2.2.0_rc2 (but maybe to the others too) (hdlc.patch,430 bytes, patch)
2009-05-18 21:26 UTC, Csaba Tóth
Details | Diff
Updated HDLC fix patch for dahdi-tools-2.2.0 (hdlc.patch,386 bytes, patch)
2009-08-07 00:34 UTC, Csaba Tóth
Details | Diff
dahdi-tools patch #2 (dahdi-tools-2.2.0-modprobe-conf.patch,639 bytes, patch)
2009-08-07 00:35 UTC, Csaba Tóth
Details | Diff
dahdi-tools-2.2.0 ebuild file (dahdi-tools-2.2.0.ebuild,855 bytes, text/plain)
2009-08-07 00:38 UTC, Csaba Tóth
Details
Dahdi 2.2.0 patch (dahdi-2.2.0-install.patch,393 bytes, patch)
2009-08-07 00:38 UTC, Csaba Tóth
Details | Diff
dahdi-2.2 ebuild (dahdi-2.2.0.2.ebuild,3.87 KB, text/plain)
2009-08-07 00:40 UTC, Csaba Tóth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Tóth 2009-05-18 12:30:26 UTC
When i tried to rebuild my system net-misc/dahdi-tools failed with error:

make[1]: Entering directory `/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2'
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.lo -MF .zonedata.lo.d -MP -c -o zonedata.lo zonedata.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.lo -MF .tonezone.lo.d -MP -c -o tonezone.lo tonezone.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.o -MF .zonedata.o.d -MP -c -o zonedata.o zonedata.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.o -MF .tonezone.o.d -MP -c -o tonezone.o tonezone.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT fxotune.o -MF .fxotune.o.d -MP -c -o fxotune.o fxotune.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT sethdlc.o -MF .sethdlc.o.d -MP -c -o sethdlc.o sethdlc.c
sethdlc.c: In function ‘set_iface’:
sethdlc.c:205: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:208: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:209: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:244: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:245: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:246: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:247: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:249: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c: In function ‘set_proto_fr’:
sethdlc.c:323: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:324: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c: In function ‘set_proto_hdlc’:
sethdlc.c:361: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:362: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c: In function ‘set_proto_cisco’:
sethdlc.c:395: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:396: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c: In function ‘set_proto’:
sethdlc.c:407: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:410: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:420: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:421: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:427: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:430: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c: In function ‘set_pvc’:
sethdlc.c:452: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:457: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:458: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:460: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:470: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:471: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c: In function ‘show_port’:
sethdlc.c:507: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:511: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:512: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:523: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:526: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:529: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:543: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:544: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:556: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:557: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:568: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
sethdlc.c:629: error: ‘union <anonymous>’ has no member named ‘ifru_settings’
make[1]: *** [sethdlc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/work/dahdi-tools-2.1.0.2'
make: *** [all] Error 2
 *
 * ERROR: net-misc/dahdi-tools-2.1.0.2 failed.
 * Call stack:
 *               ebuild.sh, line   48:  Called src_compile
 *             environment, line 2206:  Called _eapi0_src_compile
 *               ebuild.sh, line  591:  Called _eapi2_src_compile
 *               ebuild.sh, line  625:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/net-misc:dahdi-tools-2.1.0.2:20090518-122110.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/dahdi-tools-2.1.0.2/temp/environment'.
 * This ebuild is from an overlay named 'namtrac': '/mnt/data/Catalyst/portage.overlay/'
 *

After i googled to this error i found this bug: https://issues.asterisk.org/view.php?id=13439
They suggested to replace the "include/linux/if.h" file witht he most recent one (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=include/linux/if.h;hb=HEAD), and after it the program compiled well. And after a lot googling i realized this error happens just with gentoo headers.


Reproducible: Always




my emerge --info:

Portage 2.2_rc28 (default/linux/amd64/2008.0, gcc-4.4.0, glibc-2.10.1-r0, 2.6.29-gentoo-r4-03 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r4-03-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.0
Timestamp of tree: Mon, 18 May 2009 08:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.7
dev-lang/python:     2.6.2
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.51.0.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/ /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="hu_HU.utf8"
LC_ALL="hu_HU.utf8"
LDFLAGS="-Wl,-O1 -Wl,-z,now -Wl,--sort-common -s"
LINGUAS="hu en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/lxde /usr/local/portage/layman/nx /usr/local/portage/layman/voip /usr/local/portage/layman/sunrise /usr/local/portage/layman/vmware /usr/portage /usr/local/portage/tsabi /mnt/data/Catalyst/portage.overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 apache2 audiofile avahi bash-completion berkdb bluetooth bonjour branding bzip2 caps cddb cli consolekit cracklib crypt cups dbus device-mapper dmx dri exif expat fam flac fortran gdbm gif glib gmp gnutls gsm gstreamer hal hddtemp iconv idn ieee1394 imagemagick ipv6 isdnlog java java6 javamail jpeg jpeg2k kde kerberos ldap libffi libnotify libsamplerate lirc lm_sensors log4j logrotate lzo mad midi mmap mmx mmxext mng mp3 mudflap multilib ncurses network-cron networkmanager new-login nls nptl nptlonly nsplugin ogg opengl openmp pam pcre perl phonon pic png policykit portaudio postgres pppd pulseaudio python qt4 rdesktop readline reflection samba sasl sdl session slang sndfile snmp speex spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora threads tiff truetype unicode urandom usb vnc vorbis wifi xattr xcomposite xinetd xml xorg xprint xscreensaver xv zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="peruser" ELIBC="glibc" INPUT_DEVICES="keyboard mouse vmmouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu en" USERLAND="GNU" VIDEO_CARDS="vesa fbdev none vmware intel virtualbox"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Csaba Tóth 2009-05-18 15:26:58 UTC
I believe the problem will be with the include/linux/if.h file in the linux-headers package, and the new subject is very deceptive.. mainly because i use the latest headers.. so i changed back the subject from the modified ("net-misc/dahdi-tools-2.1.0.2 may require newer sys-kernel/linux-headers (include/linux/if.h)"), and put toolchain herd to CC
Comment 2 SpanKY gentoo-dev 2009-05-18 21:03:30 UTC
just add this to sethdl.c after the include statements:
#define ifreq __kernel_ifreq
Comment 3 Csaba Tóth 2009-05-18 21:26:26 UTC
Created attachment 191722 [details, diff]
this applies to dahdi-tools-2.2.0_rc2 (but maybe to the others too)

Sended this patch for upstream as well.
Comment 4 SpanKY gentoo-dev 2009-05-19 00:27:29 UTC
heh, dont send that upstream.  that's needed for a Gentoo-specific change in the linux-headers package.

also, unless this was committed to the tree, i dont think this should be closed.
Comment 5 Csaba Tóth 2009-05-19 00:53:36 UTC
Ah sorry, you have right.. i fixed this in my overlay, forget that this needed in the official tree as well.

I sended to them because they can include it if they want. Anyway, there will be a clue in their issue track system, so if anybody look for this there they will find the know-how..
Comment 6 anest 2009-06-24 06:58:14 UTC
this patch not works for me. any one solution else?
still waiting for fix about half of year already and its very painful.
Comment 7 Csaba Tóth 2009-06-24 07:21:59 UTC
why don't works? please explain better..
Comment 8 Norbert Marx 2009-07-03 01:41:49 UTC
same problem with dahdi-tools-2.2.0 and hdlc.patch:

x86_64-pc-linux-gnu-gcc -mtune=k8 -O2 -pipe -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -O0 -MD -MT dahdi_speed.o -MF .dahdi_speed.o.d -MP -c -o dahdi_speed.o dahdi_speed.c                                  
sethdlc.c: In function 'error':                                                                                                                                                                                
sethdlc.c:62: error: invalid use of undefined type 'struct __kernel_ifreq'                                                                                                                                     
sethdlc.c: In function 'set_iface':                                                                                                                                                                            
sethdlc.c:207: error: invalid use of undefined type 'struct __kernel_ifreq'                                                                                                                                    
sethdlc.c:210: error: invalid use of undefined type 'struct __kernel_ifreq'                                                                                                                                    
Comment 9 Charlie Page 2009-07-07 18:57:54 UTC
This bug was opened and closed in upstream because Gentoo is where it needs to be fixed they state, the comments are interesting: https://issues.asterisk.org/view.php?id=13439

It seems that Gentoo is using a completely different version of if.h then the rest of the world (but is changing the version numbers to match?).  Any reason this is happening, and if not, can it be changed?
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2009-07-19 10:58:24 UTC
(In reply to comment #8)
> same problem with dahdi-tools-2.2.0 and hdlc.patch:
[...]
> sethdlc.c:62: error: invalid use of undefined type 'struct __kernel_ifreq'      
> sethdlc.c: In function 'set_iface':                                             
> sethdlc.c:207: error: invalid use of undefined type 'struct __kernel_ifreq'     
> sethdlc.c:210: error: invalid use of undefined type 'struct __kernel_ifreq'     

Note that this is actually a different error. Upgrade to >=linux-headers-2.6.29.
Comment 11 Kilburn Abrahams 2009-07-26 12:00:00 UTC
I am getting something similar with dahdi-tools-2.2.0.2. I tried using the latest kernelheaders 2.6.30-r1. Same problem

make -C linux all
make[1]: Entering directory `/usr/src/dahdi-linux-complete/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/usr/src/dahdi-linux-complete/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/usr/src/dahdi-linux-complete/linux/drivers/dahdi/firmware'
make -C /lib/modules/2.6.27-gentoo-r8/build SUBDIRS=/usr/src/dahdi-linux-complete/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory `/usr/src/linux-2.6.27-gentoo-r8'

  Building modules, stage 2.
  MODPOST 30 modules
make[2]: Leaving directory `/usr/src/linux-2.6.27-gentoo-r8'
make[1]: Leaving directory `/usr/src/dahdi-linux-complete/linux'
(cd tools && [ -f config.status ] || ./configure --with-dahdi=../linux)
make -C tools all
make[1]: Entering directory `/usr/src/dahdi-linux-complete/tools'
make[2]: Entering directory `/usr/src/dahdi-linux-complete/tools'
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -MD -MT zonedata.lo -MF .zonedata.lo.d -MP -c -o zonedata.lo zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -MD -MT tonezone.lo -MF .tonezone.lo.d -MP -c -o tonezone.lo tonezone.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -shared -Wl,-soname,libtonezone.so.2.0 -o libtonezone.so zonedata.lo tonezone.lo version.o -lm
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -MD -MT zonedata.o -MF .zonedata.o.d -MP -c -o zonedata.o zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -MD -MT tonezone.o -MF .tonezone.o.d -MP -c -o tonezone.o tonezone.c
ar rcs libtonezone.a zonedata.o tonezone.o version.o
ranlib libtonezone.a
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -MD -MT fxotune.o -MF .fxotune.o.d -MP -c -o fxotune.o fxotune.c
gcc  fxotune.o version.o -lm -o fxotune
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE  -I../linux/include -MD -MT sethdlc.o -MF .sethdlc.o.d -MP -c -o sethdlc.o sethdlc.c
sethdlc.c: In function 'set_iface':
sethdlc.c:205: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:208: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:209: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:244: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:245: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:246: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:247: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:249: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_fr':
sethdlc.c:323: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:324: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_hdlc':
sethdlc.c:361: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:362: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_cisco':
sethdlc.c:395: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:396: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto':
sethdlc.c:407: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:410: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:420: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:421: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:427: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:430: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_pvc':
sethdlc.c:452: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:457: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:458: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:460: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:470: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:471: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'show_port':
sethdlc.c:507: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:511: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:512: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:523: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:526: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:529: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:543: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:544: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:556: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:557: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:568: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:629: error: 'union <anonymous>' has no member named 'ifru_settings'
make[2]: *** [sethdlc.o] Error 1
make[2]: Leaving directory `/usr/src/dahdi-linux-complete/tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/dahdi-linux-complete/tools'
make: *** [all] Error 2
Comment 12 Nathan 2009-08-06 22:19:29 UTC
I'm also having this same problem with dahdi-tools-2.2.0 (release, not rc)

This is a freshly installed and updated Gentoo amd64 box last week:

phoneserver4 dahdi-tools-2.2.0 # uname -a
Linux phoneserver4 2.6.29-gentoo-r5 #2 SMP Thu Jul 30 16:54:59 MDT 2009 x86_64 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz GenuineIntel GNU/Linux

I noticed since last week linux-2.6.30-gentoo-r4 has been stabilized.  I will test with that kernel and see if I hit the same problem.

Here's what I'm hitting with 2.6.29-gentoo-r5:

phoneserver4 dahdi-tools-2.2.0 # ./configure 
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for GNU make... make
checking for grep... (cached) /bin/grep
checking for sh... /bin/sh
checking for ln... /bin/ln
checking for wget... /usr/bin/wget
checking for -Wdeclaration-after-statement support... yes
checking for DAHDI_CODE in dahdi/user.h... yes
checking for newtBell in -lnewt... yes
checking newt.h usability... yes
checking newt.h presence... yes
checking for newt.h... yes
checking for usb_init in -lusb... yes
checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking for GENERIC_HDLC_VERSION version 4 in linux/hdlc.h... no
checking for GENERIC_HDLC_VERSION version 4 in linux/hdlc/ioctl.h... yes
configure: creating ./config.status
config.status: creating build_tools/menuselect-deps
config.status: creating makeopts
configure: *** dahdi-tools build successfully configured ***
phoneserver4 dahdi-tools-2.2.0 # make
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect.o menuselect.c
gcc -g -c -D_GNU_SOURCE -Wall   -c -o strcompat.o strcompat.c
gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect_stub.o menuselect_stub.c
make[2]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect/mxml'
if test -f config.status; then \
		./config.status --recheck; \
		./config.status; \
	else \
		./configure; \
	fi
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for cp... /bin/cp
checking for ln... /bin/ln
checking for mkdir... /bin/mkdir
checking for nroff... /usr/bin/nroff
checking for rm... /bin/rm
checking for strdup... yes
checking for vsnprintf... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mxml.list
config.status: creating mxml.pc
config.status: creating config.h
touch config.h
gcc -O -Wall -O -Wall    -c mxml-attr.c
gcc -O -Wall -O -Wall    -c mxml-entity.c
gcc -O -Wall -O -Wall    -c mxml-file.c
gcc -O -Wall -O -Wall    -c mxml-index.c
gcc -O -Wall -O -Wall    -c mxml-node.c
gcc -O -Wall -O -Wall    -c mxml-search.c
gcc -O -Wall -O -Wall    -c mxml-set.c
gcc -O -Wall -O -Wall    -c mxml-private.c
gcc -O -Wall -O -Wall    -c mxml-string.c
/bin/rm -f libmxml.a
/usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o
a - mxml-attr.o
a - mxml-entity.o
a - mxml-file.o
a - mxml-index.o
a - mxml-node.o
a - mxml-search.o
a - mxml-set.o
a - mxml-private.o
a - mxml-string.o
ranlib libmxml.a
make[2]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect/mxml'
gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a 
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
menuselect/menuselect --check-deps menuselect.makeopts  
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0'
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[2]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[2]: `makeopts' is up to date.
make[2]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.lo -MF .zonedata.lo.d -MP -c -o zonedata.lo zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.lo -MF .tonezone.lo.d -MP -c -o tonezone.lo tonezone.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT version.o -MF .version.o.d -MP -c -o version.o version.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -shared -Wl,-soname,libtonezone.so.2.0 -o libtonezone.so zonedata.lo tonezone.lo version.o -lm
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.o -MF .zonedata.o.d -MP -c -o zonedata.o zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.o -MF .tonezone.o.d -MP -c -o tonezone.o tonezone.c
ar rcs libtonezone.a zonedata.o tonezone.o version.o
ranlib libtonezone.a
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT fxotune.o -MF .fxotune.o.d -MP -c -o fxotune.o fxotune.c
gcc  fxotune.o version.o -lm -o fxotune
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT sethdlc.o -MF .sethdlc.o.d -MP -c -o sethdlc.o sethdlc.c
sethdlc.c: In function 'set_iface':
sethdlc.c:205: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:208: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:209: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:244: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:245: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:246: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:247: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:249: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_fr':
sethdlc.c:323: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:324: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_hdlc':
sethdlc.c:361: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:362: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_cisco':
sethdlc.c:395: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:396: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto':
sethdlc.c:407: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:410: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:420: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:421: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:427: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:430: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_pvc':
sethdlc.c:452: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:457: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:458: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:460: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:470: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:471: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'show_port':
sethdlc.c:507: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:511: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:512: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:523: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:526: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:529: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:543: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:544: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:556: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:557: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:568: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:629: error: 'union <anonymous>' has no member named 'ifru_settings'
make[1]: *** [sethdlc.o] Error 1
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0'
make: *** [all] Error 2
Comment 13 Nathan 2009-08-06 23:21:37 UTC
I appears that I get the exact same error with 2.6.30-gentoo-r4:

phoneserver4 dahdi-tools-2.2.0 # uname -a
Linux phoneserver4 2.6.30-gentoo-r4 #1 SMP Thu Aug 6 16:27:40 MDT 2009 x86_64 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz GenuineIntel GNU/Linux

phoneserver4 dahdi-tools-2.2.0 # ./configure 
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for GNU make... make
checking for grep... (cached) /bin/grep
checking for sh... /bin/sh
checking for ln... /bin/ln
checking for wget... /usr/bin/wget
checking for -Wdeclaration-after-statement support... yes
checking for DAHDI_CODE in dahdi/user.h... yes
checking for newtBell in -lnewt... yes
checking newt.h usability... yes
checking newt.h presence... yes
checking for newt.h... yes
checking for usb_init in -lusb... yes
checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking for GENERIC_HDLC_VERSION version 4 in linux/hdlc.h... no
checking for GENERIC_HDLC_VERSION version 4 in linux/hdlc/ioctl.h... yes
configure: creating ./config.status
config.status: creating build_tools/menuselect-deps
config.status: creating makeopts
configure: *** dahdi-tools build successfully configured ***
phoneserver4 dahdi-tools-2.2.0 # make
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect.o menuselect.c
gcc -g -c -D_GNU_SOURCE -Wall   -c -o strcompat.o strcompat.c
gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect_stub.o menuselect_stub.c
make[2]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect/mxml'
if test -f config.status; then \
		./config.status --recheck; \
		./config.status; \
	else \
		./configure; \
	fi
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for cp... /bin/cp
checking for ln... /bin/ln
checking for mkdir... /bin/mkdir
checking for nroff... /usr/bin/nroff
checking for rm... /bin/rm
checking for strdup... yes
checking for vsnprintf... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mxml.list
config.status: creating mxml.pc
config.status: creating config.h
touch config.h
gcc -O -Wall -O -Wall -O -Wall     -c mxml-attr.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-entity.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-file.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-index.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-node.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-search.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-set.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-private.c
gcc -O -Wall -O -Wall -O -Wall     -c mxml-string.c
/bin/rm -f libmxml.a
/usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o
a - mxml-attr.o
a - mxml-entity.o
a - mxml-file.o
a - mxml-index.o
a - mxml-node.o
a - mxml-search.o
a - mxml-set.o
a - mxml-private.o
a - mxml-string.o
ranlib libmxml.a
make[2]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect/mxml'
gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a 
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
menuselect/menuselect --check-deps menuselect.makeopts  
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0'
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[2]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[2]: `makeopts' is up to date.
make[2]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.lo -MF .zonedata.lo.d -MP -c -o zonedata.lo zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.lo -MF .tonezone.lo.d -MP -c -o tonezone.lo tonezone.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT version.o -MF .version.o.d -MP -c -o version.o version.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -shared -Wl,-soname,libtonezone.so.2.0 -o libtonezone.so zonedata.lo tonezone.lo version.o -lm
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.o -MF .zonedata.o.d -MP -c -o zonedata.o zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.o -MF .tonezone.o.d -MP -c -o tonezone.o tonezone.c
ar rcs libtonezone.a zonedata.o tonezone.o version.o
ranlib libtonezone.a
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT fxotune.o -MF .fxotune.o.d -MP -c -o fxotune.o fxotune.c
gcc  fxotune.o version.o -lm -o fxotune
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT sethdlc.o -MF .sethdlc.o.d -MP -c -o sethdlc.o sethdlc.c
sethdlc.c: In function 'set_iface':
sethdlc.c:205: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:208: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:209: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:244: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:245: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:246: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:247: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:249: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_fr':
sethdlc.c:323: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:324: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_hdlc':
sethdlc.c:361: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:362: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto_cisco':
sethdlc.c:395: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:396: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_proto':
sethdlc.c:407: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:410: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:420: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:421: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:427: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:430: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'set_pvc':
sethdlc.c:452: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:457: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:458: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:460: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:470: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:471: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c: In function 'show_port':
sethdlc.c:507: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:511: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:512: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:523: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:526: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:529: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:543: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:544: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:556: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:557: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:568: error: 'union <anonymous>' has no member named 'ifru_settings'
sethdlc.c:629: error: 'union <anonymous>' has no member named 'ifru_settings'
make[1]: *** [sethdlc.o] Error 1
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0'
make: *** [all] Error 2
Comment 14 Csaba Tóth 2009-08-07 00:34:35 UTC
Created attachment 200449 [details, diff]
Updated HDLC fix patch for dahdi-tools-2.2.0
Comment 15 Csaba Tóth 2009-08-07 00:35:21 UTC
Created attachment 200450 [details, diff]
dahdi-tools patch #2
Comment 16 Csaba Tóth 2009-08-07 00:38:10 UTC
Created attachment 200452 [details]
dahdi-tools-2.2.0 ebuild file

added gentoo use flag for apply selectively the HDLC fix. This is because i use CentOS linux-headers under my gentoo voip server system and there i dont need that patch..
Comment 17 Csaba Tóth 2009-08-07 00:38:54 UTC
Created attachment 200453 [details, diff]
Dahdi 2.2.0 patch

this is used by dahdi-2.2* ebuild
Comment 18 Csaba Tóth 2009-08-07 00:40:10 UTC
Created attachment 200454 [details]
dahdi-2.2 ebuild

This is the corresponds dahdi version to use with dahdi-tools-2.2*. Every patch attached what i use there.
Comment 19 Csaba Tóth 2009-08-07 00:41:59 UTC
Hope these will fix everyone's problems. I tested them with 2.6.29 and with 2.6.30 headers as well as CentOS 2.6.18-128.* headers.
Comment 20 Nathan 2009-08-07 23:19:55 UTC
(In reply to comment #19)
> Hope these will fix everyone's problems. I tested them with 2.6.29 and with
> 2.6.30 headers as well as CentOS 2.6.18-128.* headers.
> 

It would really be nice if we could make the fix on the Gentoo kernel side of things (if.h) so that we can continue to install asterisk stuff from source.  As stated in the digium bug linked from comment #9, upstream won't "fix" anything because it's Gentoo that's modified the if.h to be different from the rest of Linux-land.

Nevertheless:  Csaba, I tried applying the patches from comment #14 and comment #15 and the build still failed for me under 2.6.30 (see below).  I also tried the non-patched dahdi on 2.6.28 -- no luck.

phoneserver4 dahdi-tools-2.2.0 # uname -a
Linux phoneserver4 2.6.30-gentoo-r4 #1 SMP Thu Aug 6 16:27:40 MDT 2009 x86_64 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz GenuineIntel GNU/Linux


phoneserver4 dahdi-tools-2.2.0 # ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for GNU make... make
checking for grep... (cached) /bin/grep
checking for sh... /bin/sh
checking for ln... /bin/ln
checking for wget... /usr/bin/wget
checking for -Wdeclaration-after-statement support... yes
checking for DAHDI_CODE in dahdi/user.h... yes
checking for newtBell in -lnewt... yes
checking newt.h usability... yes
checking newt.h presence... yes
checking for newt.h... yes
checking for usb_init in -lusb... yes
checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking for GENERIC_HDLC_VERSION version 4 in linux/hdlc.h... no
checking for GENERIC_HDLC_VERSION version 4 in linux/hdlc/ioctl.h... yes
configure: creating ./config.status
config.status: creating build_tools/menuselect-deps
config.status: creating makeopts
configure: *** dahdi-tools build successfully configured ***

phoneserver4 dahdi-tools-2.2.0 # make
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect.o menuselect.c
gcc -g -c -D_GNU_SOURCE -Wall   -c -o strcompat.o strcompat.c
gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect_stub.o menuselect_stub.c
make[2]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect/mxml'
if test -f config.status; then \
		./config.status --recheck; \
		./config.status; \
	else \
		./configure; \
	fi
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for cp... /bin/cp
checking for ln... /bin/ln
checking for mkdir... /bin/mkdir
checking for nroff... /usr/bin/nroff
checking for rm... /bin/rm
checking for strdup... yes
checking for vsnprintf... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mxml.list
config.status: creating mxml.pc
config.status: creating config.h
touch config.h
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-attr.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-entity.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-file.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-index.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-node.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-search.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-set.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-private.c
gcc -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall -O -Wall         -c mxml-string.c
/bin/rm -f libmxml.a
/usr/bin/ar crvs libmxml.a mxml-attr.o mxml-entity.o mxml-file.o mxml-index.o mxml-node.o mxml-search.o mxml-set.o mxml-private.o mxml-string.o
a - mxml-attr.o
a - mxml-entity.o
a - mxml-file.o
a - mxml-index.o
a - mxml-node.o
a - mxml-search.o
a - mxml-set.o
a - mxml-private.o
a - mxml-string.o
ranlib libmxml.a
make[2]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect/mxml'
gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a 
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
menuselect/menuselect --check-deps menuselect.makeopts  
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[1]: Entering directory `/usr/local/src/dahdi-tools-2.2.0'
CC="" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[2]: Entering directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
make[2]: `makeopts' is up to date.
make[2]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0/menuselect'
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.lo -MF .zonedata.lo.d -MP -c -o zonedata.lo zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.lo -MF .tonezone.lo.d -MP -c -o tonezone.lo tonezone.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT version.o -MF .version.o.d -MP -c -o version.o version.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -shared -Wl,-soname,libtonezone.so.2.0 -o libtonezone.so zonedata.lo tonezone.lo version.o -lm
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT zonedata.o -MF .zonedata.o.d -MP -c -o zonedata.o zonedata.c
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT tonezone.o -MF .tonezone.o.d -MP -c -o tonezone.o tonezone.c
ar rcs libtonezone.a zonedata.o tonezone.o version.o
ranlib libtonezone.a
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT fxotune.o -MF .fxotune.o.d -MP -c -o fxotune.o fxotune.c
gcc  fxotune.o version.o -lm -o fxotune
gcc -g -O2 -I. -O2 -g -fPIC -Wall -DBUILDING_TONEZONE   -MD -MT sethdlc.o -MF .sethdlc.o.d -MP -c -o sethdlc.o sethdlc.c
sethdlc.c: In function 'error':
sethdlc.c:62: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'set_iface':
sethdlc.c:207: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:210: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:211: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:246: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:247: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:248: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:249: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:251: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'set_proto_fr':
sethdlc.c:325: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:326: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'set_proto_hdlc':
sethdlc.c:363: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:364: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'set_proto_cisco':
sethdlc.c:397: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:398: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'set_proto':
sethdlc.c:409: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:412: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:422: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:423: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:429: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:432: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'set_pvc':
sethdlc.c:454: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:459: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:460: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:462: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:472: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:473: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'show_port':
sethdlc.c:509: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:511: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:513: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:514: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:525: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:528: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:531: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:545: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:546: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:558: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:559: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:570: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:631: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c: In function 'main':
sethdlc.c:690: error: invalid use of undefined type 'struct __kernel_ifreq'
sethdlc.c:690: error: invalid use of undefined type 'struct __kernel_ifreq'
make[1]: *** [sethdlc.o] Error 1
make[1]: Leaving directory `/usr/local/src/dahdi-tools-2.2.0'
make: *** [all] Error 2
Comment 21 Csaba Tóth 2009-08-08 06:26:44 UTC
(In reply to comment #20)
> It would really be nice if we could make the fix on the Gentoo kernel side of
> things (if.h) so that we can continue to install asterisk stuff from source. 
> As stated in the digium bug linked from comment #9, upstream won't "fix"
> anything because it's Gentoo that's modified the if.h to be different from the
> rest of Linux-land.

As i am sure there are reason why gentoo folks did like that. I am unhappy also, but i think we should live with that.

> Nevertheless:  Csaba, I tried applying the patches from comment #14 and comment
> #15 and the build still failed for me under 2.6.30 (see below).  I also tried
> the non-patched dahdi on 2.6.28 -- no luck.

Ok, but it doesn't matter what kernel you are running, it matters what virtual/os-headers you are installed. Please copy-paste a emerge --info.

Comment 22 Mark Loeser (RETIRED) gentoo-dev 2009-08-09 19:49:18 UTC
Mike:

Is 0008-HACK-linux-pull-in-C-library-headers.patch still really needed?  What things break when that hack isn't applied, since I didn't see any examples referenced?
Comment 23 Nathan 2009-08-10 20:31:53 UTC
(In reply to comment #21)
> > Nevertheless:  Csaba, I tried applying the patches from comment #14 and comment
> > #15 and the build still failed for me under 2.6.30 (see below).  I also tried
> > the non-patched dahdi on 2.6.28 -- no luck.
> 
> Ok, but it doesn't matter what kernel you are running, it matters what
> virtual/os-headers you are installed. Please copy-paste a emerge --info.

Oh, I didn't realize that.  It appears that my virtual/os-headers is 2.6.27-r2 -- which version of the kernel I have never installed or used (I've emerged and tried 2.6.28-gentoo-r5, 2.6.29-gentoo-r5, and 2.6.30-gentoo-r4).

Here's the full emerge --info:

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Xeon-R-_CPU_E5410_@_2.33GHz-with-gentoo-1.12.11.1
Timestamp of tree: Thu, 06 Aug 2009 17:15:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3, 2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bzip2 caps cli cracklib crypt dri emacs encode fastcgi ffmpeg flac flash fortran gd gdbm gpm iconv ipv6 isdnlog mad mailwrapper mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg openal openmp pam pcre pdf postgres pppd pri python readline reflection session slang sndfile sox speex spl sse sse2 ssl sysfs tcpd tiff truetype unicode xorg zaptel zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
 

Comment 24 Nathan 2009-08-10 20:41:23 UTC
(In reply to comment #22)
> Mike:
> 
> Is 0008-HACK-linux-pull-in-C-library-headers.patch still really needed?  What
> things break when that hack isn't applied, since I didn't see any examples
> referenced?

Mark, is Mike on the cc list?  Perhaps he's under toolchain@gentoo.org?  I just want to make sure that your question will get answered, as I'm assuming that's a patch on the kernel headers that's making the incompatible change to if.h -- or something similar to that.  I can't find that patchfile on my system anywhere, so that's why I'm still in assumption-land.

If you can point me in the right direction, I'd be happy to do some legwork for you.  I need to get this resolved so I can put this phone server into production...

By the way, how the heck do you change what virtual/os-headers you have installed?

# emerge -s os-headers
Searching...   
[ Results for search key : os-headers ]
[ Applications found : 0 ]


phoneserver4 ~ # find /usr/portage -name *os-headers*
(no results)
Comment 25 Mark Loeser (RETIRED) gentoo-dev 2009-08-10 21:04:15 UTC
(In reply to comment #24)

> Mark, is Mike on the cc list?  Perhaps he's under toolchain@gentoo.org?  I just

Yes, he's on toolchain.

> want to make sure that your question will get answered, as I'm assuming that's
> a patch on the kernel headers that's making the incompatible change to if.h --
> or something similar to that.  I can't find that patchfile on my system
> anywhere, so that's why I'm still in assumption-land.

Yup, its a patch against our linux-headers.

> By the way, how the heck do you change what virtual/os-headers you have
> installed?

os-headers is an old-style virtual, so its not a package you can search for like that.  Also, I believe linux-headers is the only thing in the tree that provides that virtual anyway.
Comment 26 Csaba Tóth 2009-08-10 21:19:09 UTC
(In reply to comment #23)
> > Ok, but it doesn't matter what kernel you are running, it matters what
> > virtual/os-headers you are installed. Please copy-paste a emerge --info.
> 
> Oh, I didn't realize that.  It appears that my virtual/os-headers is 2.6.27-r2
> -- which version of the kernel I have never installed or used (I've emerged and
> tried 2.6.28-gentoo-r5, 2.6.29-gentoo-r5, and 2.6.30-gentoo-r4).
> 

Ok, so, you should always use the same kernel version of the headers and the kernel. So if you plan to use the 2.6.30.* version of the kernel, than use a 2.6.30.* version of headers. _Never_ forget, after up/downgrading the headers always recompile the glibc!

Littel explain: the API is stored in the header files. You want to compile a kernel driver from source, it compiles for a specific API, but your running kernel can have a changed API, not the same as you compiled for. This is why you need to use the same kernel version of the headers and the kernel. If you run just normal programs, than this doesnt matter too much (it does, but not as much as like now - when you use third party drivers).

So please update headers, recompile glibc, than you can try to compile dahdi. And to be sure the patch applied, please use the supplied ebuild.
If it works than i advise to you to recompile the whole system with emerge -e @installed before you put the system to production.
Comment 27 Nathan 2009-08-10 21:54:59 UTC
(In reply to comment #26)
Ok, so, you should always use the same kernel version of the headers and the
> kernel. So if you plan to use the 2.6.30.* version of the kernel, than use a
> 2.6.30.* version of headers. _Never_ forget, after up/downgrading the headers
> always recompile the glibc!

Holy cow, are you serious???  I've been administering and developing on Gentoo servers since 2003 (I've currently got about 3 dozen), and THIS is how I find that fact out???  Why the heck doesn't gentoo-sources-X depend on linux-headers-X?  Why the crap didn't I run into this before?  Why isn't this built into the kernel upgrading process somehow?  This isn't even MENTIONED in the Gentoo Linux Kernel Upgrade Guide[1]!  No one mentions this ANYWHERE!

/rant

Anyway, now that I know, I know.  You'd think that after reading all the docs over and over, all the forum browsing, hanging out in IRC, being around Gentoo for 6 years that I would have at least heard a whisper about this before now.

I'm a bit frustrated about this.  I think I would rather switch over to vanilla-sources for this particular box for asterisk's sake.  I'm not going to depend on anything ebuild-related as far as asterisk is concerned.  Gentoo has _never_ stabilized a version of asterisk while it's still been supported while I've been watching (1.4 is not even in the tree, for heaven's sake) so I'm not going to start pulling in the portage tree now -- I'm going to stick strictly to asterisk source for sanity's sake.  By the way, I've built literally dozens of versions of asterisk from source on Gentoo over the years, and never ever hit a Gentoo-specific problem with Asterisk until now.

Here's another interesting bit of wackiness while we're on the subject.  Linux headers is marked "unstable" on 2.6.30 on all architectures, even though the 2.6.30 kernel itself is marked stable on several architectures.  In fact, 2.6.27 is the last version of the headers that is marked stable on amd64, even though kernel versions .28, .29, and .30 are marked as stable on amd64.

emerge -pev vanilla-sources
[snip]
[ebuild   R   ] sys-kernel/linux-headers-2.6.27-r2  3,509 kB
[snip]
[ebuild  N    ] sys-kernel/vanilla-sources-2.6.30.3  USE="-build -symlink" 50 kB
[snip]

I'm going to assume I need to get the matching linux-headers no matter which kernel flavor I choose.  And that I have to do it manually.  And re-emerge at least glibc manually.  And that the Gentoo kernel maintainers are freaking nuts (apologies in advance to any of you who are listening and who are, in fact, not nuts - I know how weird situations can pop up and be hard to change after the fact, but that doesn't make those situations much more fun to live through).

[1] http://www.gentoo.org/doc/en/kernel-upgrade.xml
Comment 28 Nathan 2009-08-10 22:02:20 UTC
...and now I'm wondering if switching to vanilla-sources will affect anything, since it's been pointed out that the problem lies in linux-headers (sigh).

Any chance there's something akin to vanilla-headers?
Comment 29 Nathan 2009-08-12 19:44:26 UTC
FYI, I downgraded to linux-headers-2.6.23-r3 (which is the first older version of the headers in portage before 2.6.27) and dahdi-tools installed fine from asterisk sources (no patches).

I'm going to try installing gentoo-sources-2.6.25-r9 (which is as close as you can get to 2.6.23 in portage) and going forward with my phone server install.

I'd be happy to test out any linux-headers changes that make it so that you can use newer headers/kernels than that with plain asterisk sources.  Just let me know!
Comment 30 Nathan 2009-08-12 20:02:40 UTC
...make that gentoo-sources-2.6.26-r4 as .25 is marked unstable on amd64.
Comment 31 Alexander Jackson 2009-08-19 15:54:45 UTC
Since there are currently no linux-headers for kernel 2.6.30-gentoo-r4 in the repository i came up with this solution which enabled me to successfully build sethdlc:

cd /usr/src/linux
make headers_install
mv   /usr/include/linux/ /usr/include/linux.old/
ln -s   /usr/src/linux/include/linux/ /usr/include/linux


Will updateing the headers like this break or improve my gentoo-system in the long run? Would I still have to run "emerge glibc" and "emerge -e world" since obviously the existing headers are/where from an older kernel?

Actually im not sure what sethdlc is being used for. But it felt wrong not being able to compile it... Maybe someone can enlighten me?



emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-glibc2.0
Timestamp of tree: Sun, 16 Aug 2009 17:15:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mtune=generic -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/fax /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -mtune=generic -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/voip"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl bash-completion berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog logrotate mgetty mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection screen session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 32 Csaba Tóth 2009-08-19 16:54:58 UTC
(In reply to comment #31)
> Since there are currently no linux-headers for kernel 2.6.30-gentoo-r4 in the
> repository [...]

I dont understand why you say there is no header for kernel v2.6.30. There is..

> 
> cd /usr/src/linux
> make headers_install
> mv   /usr/include/linux/ /usr/include/linux.old/
> ln -s   /usr/src/linux/include/linux/ /usr/include/linux
> 
> 
> Will updateing the headers like this break or improve my gentoo-system in the
> long run? Would I still have to run "emerge glibc" and "emerge -e world" since
> obviously the existing headers are/where from an older kernel?

break

glibc should always recompile just after you changed anything in the headers.
Comment 33 Alexander Jackson 2009-08-23 14:15:58 UTC
> I dont understand why you say there is no header for kernel v2.6.30. There is..

Well, i thought i'd need sys-kernel/linux-headers-2.6.30-r4 not sys-kernel/linux-headers-2.6.30-r1 but thinking of it this shouldn't make a difference.

> break
> 
> glibc should always recompile just after you changed anything in the headers.
> 

O.K. so after compiling glibc with my solution will this still lead to complications on the system. I'm asking because the virtual/os-headers have not changed from 2.6.27-r2 to 2.6.30-r4 after switching the headers and i am not sure if this might be a problem with other or new emerge's.
Comment 34 Kal 2009-09-25 14:54:22 UTC
(In reply to comment #14)
> Created an attachment (id=200449) [edit]
> Updated HDLC fix patch for dahdi-tools-2.2.0
> 

Using  2.6.30-gentoo-r6 and linux-headers-2.6.30-r1 the above patch worked successfully when compiling dahdi from source (dahdi-linux-complete-2.2.0.2+2.2.0)
Comment 35 Charlie Page 2009-10-21 05:48:16 UTC
This still is an issue with amd64: sys-kernel/gentoo-sources-2.6.30-r8, sys-kernel/linux-headers-2.6.30-r1, gcc 4.3.4.
If I understand this correctly, it'd be really nice to fix if.h.  Why does Gentoo use a different version that the rest of the world?
Comment 36 Tony Vroon (RETIRED) gentoo-dev 2009-10-28 11:25:14 UTC
+*dahdi-tools-2.2.0 (28 Oct 2009)
+
+  28 Oct 2009; <chainsaw@gentoo.org> +dahdi-tools-2.2.0.ebuild,
+  +files/dahdi-tools-2.2.0-ifreq.patch,
+  +files/dahdi-tools-2.2.0-modprobe-suffix.patch, +files/dahdi.init2:
+  Version bump. Change libusb dependency as requested by Mounir "volkmar"
+  Lamouri in bug #270160. Header & modprobe.d fixups by Csaba Tóth in bug
+  #270283. Run fxotune from the init script, from Jaco Kroon in bug #273390.