Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259601 - media-libs/mesa does not build against sys-libs/uclibc
Summary: media-libs/mesa does not build against sys-libs/uclibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2009-02-19 16:26 UTC by Ryan Hope
Modified: 2009-03-07 13:38 UTC (History)
2 users (show)

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


Attachments
7.3-uclibc.patch (7.3-uclibc.patch,296 bytes, patch)
2009-03-04 05:33 UTC, Donnie Berkholz (RETIRED)
Details | Diff
mesa-7.3.ebuild.patch (mesa-7.3.ebuild.patch,451 bytes, patch)
2009-03-04 05:34 UTC, Donnie Berkholz (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hope 2009-02-19 16:26:12 UTC
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
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2009-02-23 08:14:55 UTC
Which version of mesa are you talking about ? Please post the output of your emerge --info as well.

Thanks
Comment 2 Ryan Hope 2009-02-23 19:33:53 UTC
(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

Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2009-02-27 18:10:42 UTC
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
Comment 4 Ryan Hope 2009-03-03 01:34:26 UTC
(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
Comment 5 Ryan Hope 2009-03-03 18:44:21 UTC
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!!!
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2009-03-03 19:08:53 UTC
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
Comment 7 Ryan Hope 2009-03-03 19:13:41 UTC
(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
Comment 8 solar (RETIRED) gentoo-dev 2009-03-03 20:12:47 UTC
Sounds like that check will probably needs to be made uclibc aware.

case "$host_os" in
*-gnu*|*-uclibc*)
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2009-03-04 05:33:14 UTC
Created attachment 183840 [details, diff]
7.3-uclibc.patch
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2009-03-04 05:34:02 UTC
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
Comment 11 Ryan Hope 2009-03-04 16:11:05 UTC
(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.
Comment 12 Ryan Hope 2009-03-04 21:36:44 UTC
got this fixed upstream, can close this bug now
Comment 13 solar (RETIRED) gentoo-dev 2009-03-05 18:39:48 UTC
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.
Comment 14 Ryan Hope 2009-03-05 21:20:26 UTC
(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
Comment 15 solar (RETIRED) gentoo-dev 2009-03-05 21:35:33 UTC
hopefully it was *-linux-* 
But cool either way, thank you very much for reporting it here and upstream.
Comment 16 Ryan Hope 2009-03-05 23:54:59 UTC
(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
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2009-03-07 13:38:52 UTC
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.