Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263679 - x11-base/xorg-server USE="hal nptl sdl tslib xorg" cross compilation fails
Summary: x11-base/xorg-server USE="hal nptl sdl tslib xorg" cross compilation fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 01:37 UTC by Maksim 'max_posedon' Melnikau
Modified: 2009-05-07 15:46 UTC (History)
3 users (show)

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


Attachments
xorg-server-1.5.3-r5 build log (build.log.gz,87.89 KB, text/plain)
2009-03-25 01:39 UTC, Maksim 'max_posedon' Melnikau
Details
fix cross pthread (1.5.3-fix-cross-pthread.patch,1.53 KB, patch)
2009-03-25 11:08 UTC, Maksim 'max_posedon' Melnikau
Details | Diff
xorg-server ebuild patch (xorg-server-1.5.3-r5.ebuild.patch,354 bytes, patch)
2009-03-25 11:18 UTC, Maksim 'max_posedon' Melnikau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim 'max_posedon' Melnikau 2009-03-25 01:37:07 UTC
x11-base/xorg-server-1.5.3-r5 USE="hal nptl sdl tslib xorg" cross compilation fails because of problems with linking with pthread

libtool: link: armv4tl-softfloat-linux-gnueabi-gcc -DHAVE_DIX_CONFIG_H -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/freetype2 -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/pixman-1 -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/hal -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/dbus-1.0 -I/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/dbus-1.0/include -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include -I../../include -I../../include -I../../Xext -I../../composite -I../../damageext -I../../xfixes -I../../Xi -I../../mi -I../../miext/shadow -I../../miext/damage -I../../render -I../../randr -I../../fb -Os -pipe -march=armv4t -mtune=arm920t -rdynamic -Wl,-z -Wl,lazy -o Xvfb InitInput.o InitOutput.o dpmsstubs.o stubs.o miinitext.o  ../../fb/.libs/libfb.a ../../xfixes/.libs/libxfixes.a ../../Xext/.libs/libXext.a ../../dbe/.libs/libdbe.a ../../XTrap/.libs/libxtrap.a ../../record/.libs/librecord.a ../../glx/.libs/libglx.a ../../render/.libs/librender.a ../../randr/.libs/librandr.a ../../damageext/.libs/libdamageext.a ../../miext/damage/.libs/libdamage.a ../../miext/shadow/.libs/libshadow.a ../../Xi/.libs/libXi.a ../../xkb/.libs/libxkb.a ../../xkb/.libs/libxkbstubs.a ../../composite/.libs/libcomposite.a ../../dix/.libs/libxpstubs.a libfbcmap.a ../../dix/.libs/libdix.a ../../config/libconfig.a ../../mi/.libs/libmi.a ../../os/.libs/libos.a -L/usr/armv4tl-softfloat-linux-gnueabi/usr/lib /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libXfont.so /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libfreetype.so -lbz2 /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libXau.so /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libfontenc.so -lz /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libpixman-1.so /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libhal.so -L/usr/armv4tl-softfloat-linux-gnueabi/lib /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libdbus-1.so /usr/armv4tl-softfloat-linux-gnueabi/usr/lib/libXdmcp.so -lcrypto -lm -Wl,-rpath -Wl,/usr/armv4tl-softfloat-linux-gnueabi/usr/lib -Wl,-rpath -Wl,/usr/armv4tl-softfloat-linux-gnueabi/usr/lib                                                                                                                 
../../glx/.libs/libglx.a(glapi.o): In function `_glapi_set_dispatch':                                                       
glapi.c:(.text+0x117ac): undefined reference to `pthread_once'                                                              
collect2: ld returned 1 exit status                                                                                         
make[3]: *** [Xvfb] Error 1                                                                                                 
make[3]: Leaving directory `/mnt/floppy/data/gentoo/tmp/portage/x11-base/xorg-server-1.5.3-r5/work/xorg-server-1.5.3/hw/vfb'
make[2]: *** [all] Error 2                                                                                                  
make[2]: Leaving directory `/mnt/floppy/data/gentoo/tmp/portage/x11-base/xorg-server-1.5.3-r5/work/xorg-server-1.5.3/hw/vfb'
make[1]: *** [all-recursive] Error 1                                                                                        
make[1]: Leaving directory `/mnt/floppy/data/gentoo/tmp/portage/x11-base/xorg-server-1.5.3-r5/work/xorg-server-1.5.3/hw'    
make: *** [all-recursive] Error 1    

Reproducible: Always

Steps to Reproduce:
1. emerge-armv4tl-softfloat-linux-gnueabi xorg-server

Actual Results:  
cross compilation fails

Expected Results:  
cross compilation shouldn't fail

max_posedon armv4tl-softfloat-linux-gnueabi #
emerge-armv4tl-softfloat-linux-gnueabi --info
Portage 2.1.6.8
(!/home/data/gentoo/openmoko-overlay/openmoko-target/profiles/openmoko,
gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-rc7-git1 i686)                        
=================================================================               
System uname:
Linux-2.6.29-rc7-git1-i686-Genuine_Intel-R-_CPU_T2130_@_1.86GHz-with-glibc2.0   
Timestamp of tree: Mon, 16 Mar 2009 21:00:02 +0000                              
app-shells/bash:     3.2_p48-r1                                                 
dev-java/java-config: 1.3.7-r1, 2.1.7                                           
dev-lang/python:     2.5.2-r8                                                   
dev-python/pycrypto: 2.0.1-r7                                                   
dev-util/cmake:      2.6.3                                                      
sys-apps/baselayout: 2.0.0                                                      
sys-apps/openrc:     0.4.3-r1                                                   
sys-apps/sandbox:    1.5                                                        
sys-devel/autoconf:  2.13, 2.63                                                 
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 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="arm ~arm"                                                      
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe -march=armv4t -mtune=arm920t -fomit-frame-pointer
-I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/
-I/usr/armv4tl-softfloat-linux-gnueabi/include/"
CHOST="armv4tl-softfloat-linux-gnueabi"
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/ca-certificates.conf /etc/env.d /etc/env.d/java/
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild
/etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d
/etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c
/etc/udev/rules.d"
CXXFLAGS="-Os -pipe -march=armv4t -mtune=arm920t -fomit-frame-pointer
-I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/
-I/usr/armv4tl-softfloat-linux-gnueabi/include/"
DISTDIR="/home/data/gentoo/distfiles"
FEATURES="distlocks fixpackages nodoc noinfo noman 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="en_US.UTF-8"
LDFLAGS="-L/usr/armv4tl-softfloat-linux-gnueabi/usr/lib
-L/usr/armv4tl-softfloat-linux-gnueabi/lib"
MAKEOPTS="-j3"
PKGDIR="/usr/armv4tl-softfloat-linux-gnueabi/packages/"
PORTAGE_CONFIGROOT="/usr/armv4tl-softfloat-linux-gnueabi/"
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="/home/data/gentoo/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/data/gentoo/openmoko-overlay/openmoko-target"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arm dbus dri gps hal iconv midi minimal multicall ncurses nls
nptl opengl pam python readline sdl sqlite ssl unicode xorg zlib"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspalfloat linear meter mmap_emul mulaw multi null plug
rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="tslib mouse keyboard
evdev void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780
lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev
glamo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Maksim 'max_posedon' Melnikau 2009-03-25 01:39:53 UTC
Created attachment 186161 [details]
xorg-server-1.5.3-r5 build log

gzipped because of too big files size
Comment 2 Maksim 'max_posedon' Melnikau 2009-03-25 01:43:19 UTC
http://gentoo.mindzoo.de/index.cgi/browser/openmoko/trunk/openmoko-target/x11-base/xorg-server/files/1.5.3-fix-cross-pthread.patch

This is not very correct patch (-lpthread shoudn't be added always, just when USE="nptl").
Comment 3 Maksim 'max_posedon' Melnikau 2009-03-25 11:08:19 UTC
Created attachment 186219 [details, diff]
fix cross pthread

correct patch
Comment 4 Maksim 'max_posedon' Melnikau 2009-03-25 11:18:33 UTC
Created attachment 186222 [details, diff]
xorg-server ebuild patch
Comment 5 Maksim 'max_posedon' Melnikau 2009-03-25 14:28:31 UTC
I found that this problem fixed in upstream already by few commits, one of them is here:

http://cgit.freedesktop.org/xorg/xserver/commit/?id=ae38151ddda9984effca5bb7c582540061201dce

(I'll try find all)
Comment 6 Maksim 'max_posedon' Melnikau 2009-03-25 14:59:55 UTC
One more commit to xorg-server that fixes this bug.

http://cgit.freedesktop.org/xorg/xserver/commit/?id=efb723e166e5fa89e90c7b400fb4c7979b1f50c0
Comment 7 Maksim 'max_posedon' Melnikau 2009-03-25 15:21:07 UTC
So, we have a kind of problem now:
1. bug fixed in upstream xorg
2. cherry-picking xorg patches doesn't woks "out of the box"
3. my patch works

So, can I hope that it will goes upstream? (for <1.5.99.1) 
Comment 8 Maksim 'max_posedon' Melnikau 2009-03-25 15:26:12 UTC
(In reply to comment #7)
> So, can I hope that it will goes upstream? (for <1.5.99.1) 
I mean gentoo portage here.
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2009-03-25 16:29:14 UTC
I'll backport it to 1.5.3 once upstream commits it to the main git repo.

Thanks
Comment 10 SpanKY gentoo-dev 2009-03-28 11:25:03 UTC
i think upstream has committed everything ?  it's just a matter of finding them
Comment 11 Raúl Porcel (RETIRED) gentoo-dev 2009-04-27 10:00:22 UTC
I'm waiting for this to get fixed for stabilizing xorg-server-1.5 on arm
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 13:13:10 UTC
I'm a bit confused about this bug here. Could you tell me which upstream patch you want backported?

If it's the one that's attached, please send it upstream (xorg-devel mailing list or through bugzilla) so that upstream can take a closer look at it.

Thanks
Comment 13 Maksim 'max_posedon' Melnikau 2009-05-06 13:25:34 UTC
(In reply to comment #12)
> I'm a bit confused about this bug here. Could you tell me which upstream patch
> you want backported?
> 
> If it's the one that's attached, please send it upstream (xorg-devel mailing
> list or through bugzilla) so that upstream can take a closer look at it.
> 
> Thanks
> 
My comment 5 and comment 6:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=ae38151ddda9984effca5bb7c582540061201dce
http://cgit.freedesktop.org/xorg/xserver/commit/?id=efb723e166e5fa89e90c7b400fb4c7979b1f50c0

My patch is kind of small version of this commits.
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 13:41:34 UTC
Alright, thanks, I'll try to look into it a bit more.

(In reply to comment #13)
> http://cgit.freedesktop.org/xorg/xserver/commit/?id=ae38151ddda9984effca5bb7c582540061201dce
> http://cgit.freedesktop.org/xorg/xserver/commit/?id=efb723e166e5fa89e90c7b400fb4c7979b1f50c0

Donnie, you actually applied this patch to upstream's 1.5 branch but you left out the part that changes KDRIVE_LIBS. Was that intentional?

Thanks
Comment 15 Maksim 'max_posedon' Melnikau 2009-05-06 13:49:43 UTC
(In reply to comment #14)
> Alright, thanks, I'll try to look into it a bit more.
> 
> (In reply to comment #13)
> > > Donnie, you actually applied this patch to upstream's 1.5 branch but you left
> out the part that changes KDRIVE_LIBS. Was that intentional?
> 
> Thanks
> 

Frankly speaking I wrote my patch before I found that patches in upstream,
but I can't apply this patches to 1.5.3.

And sorry, don't get your question, my patch fixes KDRIVE_LIBS too....
Comment 16 Donnie Berkholz (RETIRED) gentoo-dev 2009-05-06 15:27:32 UTC
Remi, please catch me on IRC, I'm having a hard time following this bug to figure out what's going on.
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2009-05-07 15:46:41 UTC
1.5.3-r6 has (among its 78 patches) the 2 patches linked in comment #13.

Please test this revbump as much as possible, because if it works for you, I'll push its stabilization a little sooner than the usual 30 days.

Thanks