Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225409 - dev-lang/mono-1.9.1 build error w/ glibc-2.8: 'ARG_MAX' undeclared
Summary: dev-lang/mono-1.9.1 build error w/ glibc-2.8: 'ARG_MAX' undeclared
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.8
  Show dependency tree
 
Reported: 2008-06-08 17:59 UTC by Jose daLuz
Modified: 2009-02-04 13:05 UTC (History)
8 users (show)

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


Attachments
the needed patch to compile mono (works here) (mono_wapi_glop.patch,378 bytes, patch)
2008-06-13 11:51 UTC, Florian Manschwetus
Details | Diff
New ebuild that uses patch (mono-1.9.1-r1.ebuild,3.55 KB, text/plain)
2008-06-14 03:27 UTC, Daniel Santos
Details
folder including updated ebuild, patch and manifest ready for an overlay (dev-lang.tar.gz,7.38 KB, text/plain)
2008-06-15 14:26 UTC, Billy DeVincentis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jose daLuz 2008-06-08 17:59:28 UTC
Rebuilding mono 1.9.1 (as part of system rebuild) after updating glibc from
2.7-r2 to 2.8_p20080602, I get the following error:

/bin/sh ../../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I../../libgc/include -DMONO_BINDIR=\""/usr/bin"\" -I../..	  -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP  -DUSE_COMPILER_TLS  -march=k8 -O2 -pipe -ggdb -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -MT wapi_glob.lo -MD -MP -MF .deps/wapi_glob.Tpo -c -o wapi_glob.lo wapi_glob.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I../../libgc/include -DMONO_BINDIR=\"/usr/bin\" -I../.. -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -DUSE_COMPILER_TLS -march=k8 -O2 -pipe -ggdb -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -MT wapi_glob.lo -MD -MP -MF .deps/wapi_glob.Tpo -c wapi_glob.c  -fPIC -DPIC -o .libs/wapi_glob.o
wapi_glob.c: In function 'globextend':
wapi_glob.c:303: error: 'ARG_MAX' undeclared (first use in this function)
wapi_glob.c:303: error: (Each undeclared identifier is reported only once
wapi_glob.c:303: error: for each function it appears in.)
make[3]: *** [wapi_glob.lo] Error 1
make[3]: Leaving directory `/var/tmp/paludis/dev-lang-mono-1.9.1/work/mono-1.9.1/mono/io-layer'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/paludis/dev-lang-mono-1.9.1/work/mono-1.9.1/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/paludis/dev-lang-mono-1.9.1/work/mono-1.9.1'
make: *** [all] Error 2

Last week I rebuilt toolchain/system/world after updating gcc to 4.3.0 and
linux-headers to 2.6.25-r3. mono built with no problems then, so this would seem to be related to the new glibc.

Portage 2.1.5.4 (default-linux/amd64/2007.0/desktop, gcc-4.3.0, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 6000+
Timestamp of tree: Sun, 08 Jun 2008 01:35:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -ggdb -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -ggdb -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS=""
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
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/overlays/paludis-extras /usr/local/overlays/sunrise /usr/local/overlays/gnome /usr/local/overlays/mainline /usr/local/overlays/desktop-effects /usr/local/overlays/vmware /usr/local/overlays/berkano /usr/local/overlays/myoverlay"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr bash-completion berkdb bluetooth bzip2 cairo cdda cdr cli cracklib crypt css cups dbus dri dts dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg flac fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kdehiddenvisibility kerberos ldap libnotify mad midi mikmod mmx mono mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl pic png pppd python qt3support qt4 quicktime readline reflection ruby samba sdl session spell spl sqlite sse sse2 ssl svg tcpd theora tiff truetype unicode usb userlocales vcd vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="cmipci hdaintel" 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 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="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jose daLuz 2008-06-08 18:06:56 UTC
Possibly related to this upstream bug: https://bugzilla.novell.com/show_bug.cgi?id=389791
Comment 2 Jose daLuz 2008-06-08 18:20:48 UTC
See http://www.nabble.com/FYI:--glibc-2.8-may-break-some-of-your-packages-td16625128.html

"glibc 2.8 no longer defines ARG_MAX constant in linux, so you may see:


foobar.c:N: error: 'ARG_MAX' undeclared (first use in this function)

To fix this problem you can use something like this

#include <unistd.h> /* only if not already there !! */

#if defined(_SC_ARG_MAX)
# if defined(ARG_MAX)
#    undef ARG_MAX
# endif
# define ARG_MAX sysconf (_SC_ARG_MAX)
#endif"
Comment 3 Florian Manschwetus 2008-06-12 11:42:18 UTC
could tell us how to fix this package temporary (just to get it build for now)
Comment 4 Florian Manschwetus 2008-06-13 11:51:31 UTC
Created attachment 156611 [details, diff]
the needed patch to compile mono (works here)

i made a patch derived from the suggestion
Comment 5 Daniel Santos 2008-06-14 03:27:01 UTC
Created attachment 156695 [details]
New ebuild that uses patch

Well let's get it done.  Rename patch file to "mono-1.9.1-wapi_glop.diff" and copy it to the files directory (and of course, run "ebuild mono-1.9.1-r1.ebuild digest"). Let's get this tested and pushed into the mainline.

Has this patch been sent upstream yet?
Comment 6 Daniel Santos 2008-06-14 03:30:41 UTC
eww, yuck! I just realized I installed C# on my machine, I feel so dirty! (just trying to get lotro to work)

Comment 7 BedOS_Gui 2008-06-14 07:22:26 UTC
(In reply to comment #5)
> Created an attachment (id=156695) [edit]
> New ebuild that uses patch
> 
> Well let's get it done.  Rename patch file to "mono-1.9.1-wapi_glop.diff" and
> copy it to the files directory (and of course, run "ebuild mono-1.9.1-r1.ebuild
> digest"). Let's get this tested and pushed into the mainline.
> 
> Has this patch been sent upstream yet?
> 
the new ebuild with the proposed patch works fine on my box, thanks a lot.
Comment 8 Ferenc Erki 2008-06-15 07:37:18 UTC
the attached patch and ebuild works fine for me too!

thanks for them.
Comment 9 Billy DeVincentis 2008-06-15 14:25:12 UTC
Patch is named wrong, must be placed in files folder as mono-1.9.1-wapi_glop.diff
Comment 10 Billy DeVincentis 2008-06-15 14:26:31 UTC
Created attachment 156913 [details]
folder including updated ebuild, patch and manifest ready for an overlay
Comment 11 Chris Bailey 2008-08-04 11:18:04 UTC
This issue is fixed in the current experimental tree (though for some reason there was no version bump, the patch is now simply included in the mono-1.9.1 ebuild). The patch used takes a slightly different approach to the one posted in this bug.
Comment 12 Matt 2008-09-20 12:34:15 UTC
*bump*

>This issue is fixed in the current experimental tree (though for some reason
>there was no version bump, the patch is now simply included in the mono-1.9.1
>ebuild). The patch used takes a slightly different approach to the one posted
>in this bug.

it really should be communicated if such a kind of fix is included in the tree (version bump, ...)

thanks guys, for fixing this & thanks to the gentoo-dev in charge for fixing this :)
Comment 13 Peter Alfredsen (RETIRED) gentoo-dev 2008-11-19 10:00:53 UTC
This is fixed in-tree
Comment 14 jez austin 2009-02-04 12:39:37 UTC
(In reply to comment #13)
> This is fixed in-tree
> 

Could this fix be included in the stable version of mono (1.2.5.1-r1)?
Comment 15 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-04 12:58:41 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > This is fixed in-tree
> > 
> 
> Could this fix be included in the stable version of mono (1.2.5.1-r1)?

No, please use mono-2.x