Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 195861
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Markus Meier <maekke@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
iputils-no_open_max.patch Patch for removed OPEN_MAX constant in linux kernel patch David 'Bombe' Roden 2007-10-16 00:58 0000 587 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 195861 depends on: Show dependency tree
Bug 195861 blocks:
Votes: 10    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-10-14 16:17 0000
i686-pc-linux-gnu-gcc -O2 -march=pentium-m -fomit-frame-pointer -pipe
-Wstrict-prototypes -Wall -D_GNU_SOURCE   rdisc.c  -lresolv -o rdisc
rdisc.c: In function ‘do_fork’:
rdisc.c:251: error: ‘OPEN_MAX’ undeclared (first use in this function)
rdisc.c:251: error: (Each undeclared identifier is reported only once
rdisc.c:251: error: for each function it appears in.)
make: *** [rdisc] Error 1
make: *** Waiting for unfinished jobs....

with linux-headers-2.6.23:
# grep -r OPEN_MAX /usr/include/linux/
#

with linux-headers-2.6.22-r2
# grep -r OPEN_MAX /usr/include/linux/
/usr/include/linux/limits.h:#define OPEN_MAX         256        /* # open files
a process may have */


Portage 2.1.3.13 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0,
2.6.23 i686)
=================================================================
System uname: 2.6.23 i686 Intel(R) Pentium(R) M processor 1600MHz
Timestamp of tree: Sun, 14 Oct 2007 11:00:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
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/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/terminfo
/etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner"
FEATURES="collision-protect cvs digest distlocks fixpackages metadata-transfer
parallel-fetch sandbox sfperms sign strict unmerge-orphans userfetch userpriv
usersandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/ http://gentoo.inode.at/"
LANG="en_GB.utf8"
LC_ALL="en_GB.utf8"
LINGUAS="en de en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://192.168.2.1/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 avahi berkdb bidi bitmap-fonts bzip2 cairo
cdr cli cracklib crypt cups curl dbus divx divx4linux dri dts dvd dvdr dvdread
eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif gnome
gnutls gpm graphviz gs gstreamer gtk hal iconv ieee1394 ipod ipv6 isdnlog java
jpeg kde kdeenablefinal kerberos lcms live mad midi mikmod mmx mono mozilla mp3
mpeg mudflap ncurses nls nptl nptlonly nsplugin ntfs ogg oggvorbis openexr
opengl openmp oss pam pcre pdf perl png pppd python qt qt3 qt3support qt4
quicktime readline real reflection ruby samba screen sdl session spell spl sse
sse2 ssl stream svg tcpd tetex theora threads tiff truetype truetype-fonts
type1-fonts udev unicode usb vcd vorbis win32codecs wxwindows x86 xcomposite
xine xinerama xml2 xorg xprint xv xvid zlib" 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" ELIBC="glibc"
INPUT_DEVICES="evdev synaptics mouse keyboard" KERNEL="linux" LINGUAS="en de
en_GB" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

------- Comment #1 From Nick Devito 2007-10-14 18:29:25 0000 -------
I believe this is caused by linux-headers-2.6.23 removing the OPEN_MAX
definition from /usr/include/linux/limits.h. I found a random post on a random
mailing list that suggested replacing the limits.h stuff with this:

  #include <unistd.h>
  #define OPEN_MAX (sysconf(_SC_OPEN_MAX))

I tried it on iputils (rdisc.c) and it seemed to fix the problem, however I'm
not sure how it would act on earlier linux-headers revisions.

~ Nick

------- Comment #2 From SpanKY 2007-10-15 05:46:31 0000 -------
one issue per bug

it's better to simply rewrite code that relies on constants ... the POSIX
standard explicitly allows omitting the OPEN_MAX define

as a workaround, dropping in:
#define OPEN_MAX (sysconf(_SC_OPEN_MAX))

should work fine when OPEN_MAX is used dynamically and not as an actual hard
constant (like an array size)

------- Comment #3 From SpanKY 2007-10-15 05:50:46 0000 -------
fixed in cvs

------- Comment #4 From David 'Bombe' Roden 2007-10-16 00:58:58 0000 -------
Created an attachment (id=133584) [details]
Patch for removed OPEN_MAX constant in linux kernel

This is a better fix for the problem (taken from
http://www.redhat.com/archives/fedora-extras-commits/2007-August/msg01642.html).

------- Comment #5 From Jose daLuz 2007-10-16 01:33:26 0000 -------
*** Bug 196001 has been marked as a duplicate of this bug. ***

------- Comment #6 From Jakub Moc (RETIRED) 2007-10-16 14:42:23 0000 -------
*** Bug 196049 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug