Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 56248

Summary: xorg-x11 fails to work on G5, however work with patch
Product: Gentoo Linux Reporter: Yuta SATOH (RETIRED) <nigoro>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: VERIFIED FIXED    
Severity: normal CC: brad, ppc64
Priority: Lowest    
Version: unspecified   
Hardware: PPC64   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for xorg-x11 ebuild
patch for xorg-x11 ebuild
patch for xorg-x11 ebuild
patch for xorg-x11 ebuild

Description Yuta SATOH (RETIRED) gentoo-dev 2004-07-06 09:06:47 UTC
In my environment, xorg cannot operate by error. (Comment #1)
However, it can operate on G5 by applying this patch.

But, it is a very dirty code.
I think that it can be used only as stopgap.

Please try it, if you wants to work xorg-x11 on G5 now.

Reference (Thanks)
* http://anti.cute-ninjas.com/wp/index.php?p=11
* bug #54852


Thank you for reading.


---
here is my emerge info

Portage 2.0.50-r8 (default-ppc64-2004.2, gcc-3.4.0, glibc-2.3.4.20040605-r0, 2.6.7-gentoo-r8)
=================================================================
System uname: 2.6.7-gentoo-r8 ppc64 PPC970, altivec supported
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="powerpc64-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config 
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache digest noclean sandbox"
GENTOO_MIRRORS="http://mirror.gentoo.gr.jp/ http://gentoo.gg3.net/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portagejp /usr/local/portage"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="X altivec berkdb cjk cups dvd foomaticdb gdbm gif gpm gtk2 imlib jpeg libwww mitshm nls
 oggvorbis opengl oss pam perl png ppc64 python readline sdl slang ssl tcpd tiff truetype xv"


---
here is my /etc/portage/package.keywords

x11-base/xorg-x11 ~ppc64
x11-base/opengl-update ~ppc64
x11-misc/ttmkfdir ~ppc64
x11-terms/xterm ~ppc64
x11-libs/Xaw3d ~ppc64
sys-apps/utempter ~ppc64
Comment 1 Yuta SATOH (RETIRED) gentoo-dev 2004-07-06 09:07:32 UTC
The contents of an error when xorg-x11 fails to work.


[snip]

Release Date: 18 December 2003
X Protocol Version 11, Revision 0, Release 6.7
Build Operating System: Linux 2.6.6-r0 ppc64 [ELF]

*snip*

(II) Loader running on linux
(II) LoadModule: "bitmap"
(II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.a

   *** If unresolved symbols were reported above, they might not
   *** be the reason for the server aborting.

Fatal server error:
Caught signal 11.  Server aborting

[snip]
Comment 2 Yuta SATOH (RETIRED) gentoo-dev 2004-07-06 09:09:51 UTC
Created attachment 34872 [details, diff]
patch for xorg-x11 ebuild
Comment 3 Yuta SATOH (RETIRED) gentoo-dev 2004-07-09 08:36:00 UTC
Created attachment 35064 [details, diff]
patch for xorg-x11 ebuild

This new patch solves the problem which cannot use DRI module and GLX module.

Additional information
The display drivers which can be used by applying this patch are ati and fbdev.
Comment 4 Yuta SATOH (RETIRED) gentoo-dev 2004-07-13 07:01:43 UTC
Created attachment 35315 [details, diff]
patch for xorg-x11 ebuild

I think that this patch can use a display driver nv newly.
However, since I do not have the board of nVidia, I cannot do a test.

Could anyone test this patch?
Comment 5 Philippe Trottier (RETIRED) gentoo-dev 2004-07-14 01:13:24 UTC
*** Bug 54852 has been marked as a duplicate of this bug. ***
Comment 6 Yuta SATOH (RETIRED) gentoo-dev 2004-07-15 11:37:20 UTC
Created attachment 35493 [details, diff]
patch for xorg-x11 ebuild

I'm very sorry.
The line feed code of the patch in front of one was CR LF.
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 11:59:30 UTC
Grabbing. I want patch changes to go through me.
Comment 8 Tom Gall (RETIRED) gentoo-dev 2004-07-15 12:05:29 UTC
Note to Spyderous

Just grab the last xorg-x11.ebuild patch and use that. 

If you need an explation as to why it's doing what it's doing contact me (tgall@gentoo.org) or get ahold of me on irc.

in a nutshell the xorg folks still use their own elf loader for loading .o's when they really shouldn't be using .o's anymore but rather .so's ... anyway this would reqiure some significant work in their own elf loader for ppc64. I might put the time and effort into that eventually (or if someone else wants to do that) but not right now. Really the "right" fix is for xorg not to use .o's entirely and deprecate their own elf loader.

The ppc64 patch for xorg support is already in portage. Feel free to swizzle that into your patch tarball or whatever voodoo that you do do.
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 13:49:17 UTC
tseng, could you take a glance at this sometime today and let me know what you think? It's basically using the dlloader and manually relinking everything.

Tom, I'm already on the xfree alias -- no need to CC me in addition.
Comment 10 Brandon Hale (RETIRED) gentoo-dev 2004-07-15 14:59:48 UTC
Hi, two things.
First, has anyone taken a shot at adding the build-specific fixes here
to the makefile? This would seem a bit cleaner to me.. the patch could be
applied conditionally, but when the .so is linked properly, the dlloader
should kick in and work properly for *everyone*, not just explicit dlloader-server users.

Second, I'd like to do something a bit different on enabling this, vs USE=ppc64.
I'd like to make a more generic USE=dlloader bit, and take out the current USE=pie
logic that has hardened users so horribly confused.
Counter-thoughts?
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 15:07:08 UTC
I hate conditionally applied patches. They're unsuitable for upstream, and that's the real goal here -- taking maintenance of an ever-growing set of patches off our hands.
Comment 12 Tom Gall (RETIRED) gentoo-dev 2004-07-15 16:03:21 UTC
well at least the "good" news is the larger portion of the ppc64 xorg patch is already upstream in cvs. 

The "bad" news is if someone wants to convince xorg to obsolete their elf loader and just make so's across the board on linux, then they've got work to do upstream. I think it's the "obvious" thing to do, but it's unknown to me how that's viewed upstream. 

adding a USE flag for dlloader doesn't make much sense to me. 

Anyway I will add time is short here for this to make 2004.2 so let's please not get too caught up in technical discourse.
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 16:15:54 UTC
Plan here is:

1) dlloader is also used on hardened, thus discussions about the USE flag. Currently USE=pie builds .so's, we're going to move that to USE=dlloader.

2) Your stuff will get in as-is (or close) for now. Later on, it would be helpful to hack it into a more friendly form. I plan to add 6.7.0-r2 late tonight as well -- we can probably do the hacking in that while it's still ~arch.

If you follow upstream work, in particular the "debrix" project at freedesktop.org, you'll see that work to switch the default to dlloader is already under way.
Comment 14 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 22:54:47 UTC
I've committed this patch. I have a bad feeling about -rpath though, see these differences IRT $ROOT:

+		ld -rpath /usr/X11R6/lib/modules/drivers -shared -o ati_drv.so ati_drv.so.orig radeon_drv.so atimisc_drv.so fbdev_drv.so r128_drv.so vga_drv.so
+		ld -rpath /usr/X11R6/lib/modules/drivers -shared -o nv_drv.so nv_drv.so.orig fbdev_drv.so vga_drv.so

+		ld -rpath ${ROOT}/usr/X11R6/lib/modules/extensions -shared -o libglx.so libglx.so.orig libGLcore.so
+		ld -rpath ${ROOT}/usr/X11R6/lib/modules/extensions -shared -o libdri.so libdri.so.orig libglx.so
Comment 15 Donnie Berkholz (RETIRED) gentoo-dev 2004-07-15 22:56:04 UTC
BTW -- if any ppc64 or X person thinks that is wrong, feel free to commit the change. I'm going out of town this weekend.
Comment 16 Tom Gall (RETIRED) gentoo-dev 2004-07-17 20:19:46 UTC
fix is in portage in -r2

Thanks Yuta!
Comment 17 Tom Gall (RETIRED) gentoo-dev 2004-08-10 20:18:45 UTC
Probably some further work to be done here but I'll log in a different bug ...  I have the mga driver built now..  but have an unresolved symbol I need to track down....

in the meantime, stick a fork in it ... works on g5!