Mesa failes to build against uClibc due to error: 'MAP_ANON' undeclared Reproducible: Always Steps to Reproduce: 1. use a 2008 uclibc stage3 2. emerge mesa Expected Results: it should compile adding -D_GNU_SOURCE to the CFLAGS fixes the problem
Which version of mesa are you talking about ? Please post the output of your emerge --info as well. Thanks
(In reply to comment #1) > Which version of mesa are you talking about ? Please post the output of your > emerge --info as well. > > Thanks > media-libs/mesa-7.3 Portage 2.2_rc23 (uclibc/x86, gcc-4.2.4, uclibc-9999-r0, 2.6.27-gentoo-r5 i686) ================================================================= System uname: Linux-2.6.27-gentoo-r5-i686-AMD_Opteron-tm-_Processor_250-with-libc0 Timestamp of tree: Wed, 18 Feb 2009 04:00:02 +0000 app-shells/bash: 3.2_p48-r1 dev-lang/python: 2.5.4-r2 dev-python/pycrypto: 2.0.1-r6 dev-util/cmake: 2.6.2-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r1 sys-apps/sandbox: 1.3.7 sys-devel/autoconf: 2.63 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i586-gentoo-linux-uclibc" CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx" CHOST="i586-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/live/env /usr/kde/live/share/config /usr/kde/live/shutdown /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages nodoc noinfo noman 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="POSIX" LDFLAGS="-Wl,-O1" MAKEOPTS="-j5" 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/portage/layman/kde-testing /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X cli cracklib crypt dbus dri gdbm git kdeprefix mdnsresponder-compat midi mmx mysql ncurses opengl openmp pcre python readline redland reflection session spl ssl subversion tcpd uclibc unicode userlocales webkit x86 xcb xorg zlib" 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="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Please open a bug report on FreeDesktop's bugzilla and paste the url here. This is definitely something that needs to be fixed upstream. Thanks
(In reply to comment #3) > Please open a bug report on FreeDesktop's bugzilla and paste the url here. This > is definitely something that needs to be fixed upstream. > > Thanks > http://bugs.freedesktop.org/show_bug.cgi?id=20435
This is _NOT_ an upstream issue. The mesa ebuild is messing up here... When the ebuild configures mesa here is what gets defined: Macros: -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS When i configure mesa manually here is what gets defined: Macros: -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DGLX_DIRECT_RENDERING -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM The ebuild seems to drop: -D_GNU_SOURCES -DPTHREADS -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM The ebuild adds: -DUSE_XCB What is going on here!!!
Much of that is explained by --disable-asm --enable-xcb. I'm not sure why -D_GNU_SOURCE -DPTHREADS would go away, because that's defined by *-gnu* being in the host OS string (from configure.ac): dnl Compiler macros DEFINES="" AC_SUBST([DEFINES]) case "$host_os" in *-gnu*) DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" ;; solaris*) DEFINES="$DEFINES -DPTHREADS -DSVR4" ;; esac
(In reply to comment #6) > Much of that is explained by --disable-asm --enable-xcb. I'm not sure why > -D_GNU_SOURCE -DPTHREADS would go away, because that's defined by *-gnu* being > in the host OS string (from configure.ac): > > dnl Compiler macros > DEFINES="" > AC_SUBST([DEFINES]) > case "$host_os" in > *-gnu*) > DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" > ;; > solaris*) > DEFINES="$DEFINES -DPTHREADS -DSVR4" > ;; > esac > does the ebuild pass --build=<gcc_tuple> to mesa at all... if so... mesa might not be recognizing i586-gentoo-linux-uclibc-4.2.4
Sounds like that check will probably needs to be made uclibc aware. case "$host_os" in *-gnu*|*-uclibc*)
Created attachment 183840 [details, diff] 7.3-uclibc.patch
Created attachment 183842 [details, diff] mesa-7.3.ebuild.patch Stick the uclibc patch in media-libs/mesa/files/, apply this patch to the ebuild, run `ebuild mesa-7.3.ebuild digest`, then emerge =mesa-7.3
(In reply to comment #10) > Created an attachment (id=183842) [edit] > mesa-7.3.ebuild.patch > > Stick the uclibc patch in media-libs/mesa/files/, apply this patch to the > ebuild, run `ebuild mesa-7.3.ebuild digest`, then emerge =mesa-7.3 > Yeah I submitted this upstream yesterday. It solves the compile problem. Just waiting for them to merge it now.
got this fixed upstream, can close this bug now
depending on how long it takes for a new mesa to be released. We might want to push the patch to the tree. Till then can we leave this bug open so that others don't file dupes of this bug till it's fixed either via upstream new versions or a -rXX bump.
(In reply to comment #13) > depending on how long it takes for a new mesa to be released. We might want to > push the patch to the tree. Till then can we leave this bug open so that others > don't file dupes of this bug till it's fixed either via upstream new versions > or a -rXX bump. > well actually what they merged was this: case "$host_os" in *linux*) or something like it
hopefully it was *-linux-* But cool either way, thank you very much for reporting it here and upstream.
(In reply to comment #15) > hopefully it was *-linux-* > But cool either way, thank you very much for reporting it here and upstream. > here is the commit in mesa's git repo that fixed the issue for me.... http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac55db1d7d6cd58e49a033859d1d86a7dcf71d45
I've just put in portage a very badly named mesa 7.3-r1 which contains, among its 60+ patches, the uClibc patch. It's currently under p.mask because it needs a little more testing but I hope to unmask it soon. Thanks for getting this fixed upstream.