Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Compiling XFree86 4.2.x--sig11
@ 2002-11-20 15:51 Kelledin
  2002-11-20 19:48 ` Ted Goodridge
  2002-11-20 22:00 ` Compiling XFree86 4.2.x--sig11 Will Woods
  0 siblings, 2 replies; 9+ messages in thread
From: Kelledin @ 2002-11-20 15:51 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]

I just tried compiling XFree86 4.2.x on Alpha with fairly bad
luck--more or less a segfault, see below:

--------
(WW) Open APM failed (/dev/apm_bios) (No such file or directory)
(II) Module ABI versions:
        XFree86 ANSI C Emulation: 0.1
        XFree86 Video Driver: 0.5
        XFree86 XInput driver : 0.3
        XFree86 Server Extension : 0.1
        XFree86 Font Renderer : 0.3
(II) Loader running on linux
(II) LoadModule: "bitmap"
(II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.a
(II) Module bitmap: vendor="The XFree86 Project"
        compiled for 4.2.0, module version = 1.0.0
        Module class: XFree86 Font Renderer
        ABI class: XFree86 Font Renderer, version 0.3

Fatal server error:
Caught signal 11.  Server aborting


When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
This can be found in the log file "/var/log/XFree86.0.log".
Please report problems to xfree86@xfree86.org.
--------

The above is stock 4.2.0, with a patch applied from Thorsten
Kranzkowski for gcc-3.x compatibility in the XFree86 module
loader.  I've also tried 4.2.1 with similar results.  Since the
posting relating to this patch is apparently no longer in google
(it was yesterday...), I've attached a text copy of it below.
FYI, I'm using gcc-3.2.

Without the patch, XFree86 compiles on alpha but cannot load any
modules (thanks to the R_ALPHA_GPREL{HIGH,LOW} relocation types
being added somewhere around gcc-3.1).  With the patch, it seems
XFree86 crashes when trying to load the first module...

I have a few ideas on how to get around this, but I figured I'd
run them by some people on the list rather than spend another
3-4 hours building XFree86 for each wild goose-chase I go off
on:

1) A lot of this module loading trouble appears to spring from
XFree86 using a misbegotten module loader that monkeys around
with ELF format directly.  If I compile it to load modules the
proper, portable way (via the dlopen API), will it solve this
problem for good?  How well supported is this?

2) Do I need to manually specify compilation with -fPIC (via the
DefaultGcc2AxpOpts definition?)  It occurs to me that the
XFree86 build isn't smart enough to figure out how to
selectively apply this flag on its own.  Then again, considering
XFree86's jacked module loader, neither am I.

--
Kelledin
"If a server crashes in a server farm and no one pings it, does
it still cost four figures to fix?"

[-- Attachment #2: xfree86.alpha.patch.email --]
[-- Type: text/plain, Size: 3648 bytes --]

FROM: Thorsten Kranzkowski
DATE: 02/09/2002 08:09:18
SUBJECT:  [PATCH] XFree86 4.2 and gcc 3.1

 


Hi!
When building XFree86 4.2 with gcc 3.1 (20020207) i get this runtime error:

<---snip--->
XFree86 Version 4.2.0 / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 18 January 2002
        If the server is older than 6-12 months, or if your card is
        newer than the above date, look for a newer version before
        reporting problems.  (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.18-pre7 alpha [ELF] 
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
         (++) from command line, (!!) notice, (II) informational,
         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Sat Feb  9 00:59:35 2002
(==) Using config file: "/etc/X11/XF86Config"
Elf_RelocateEntry() Unsupported relocation type 18
Elf_RelocateEntry() Unsupported relocation type 17
Elf_RelocateEntry() Unsupported relocation type 18
[ .... lots of these .... ]
Elf_RelocateEntry() Unsupported relocation type 17
Elf_RelocateEntry() Unsupported relocation type 18
Elf_RelocateEntry() Unsupported relocation type 17

Fatal server error:
Caught signal 11.  Server aborting
<---snip--->

After some investigation I made the following patch:


diff -ur xc-orig/programs/Xserver/hw/xfree86/loader/elfloader.c xc/programs/Xserver/hw/xfree86/loader/elfloader.c
--- xc-orig/programs/Xserver/hw/xfree86/loader/elfloader.c      Mon Jan 14 18:16:52 2002
+++ xc/programs/Xserver/hw/xfree86/loader/elfloader.c   Sat Feb  9 01:26:37 2002
@@ -1113,6 +1113,7 @@
 #if defined(__alpha__)
     unsigned int *dest32h;     /* address of the high 32 bit place being modified */
     unsigned long *dest64;
+    unsigned short *dest16;
 #endif
 #if defined(__ia64__)
     unsigned long *dest64;
@@ -1233,6 +1234,34 @@
 #ifdef ELFDEBUG
            ELFDEBUG( "*dest32=%x\n", *dest32 );
 #endif
+           break;
+           }
+       case R_ALPHA_GPRELLOW:
+           {
+           dest64=(unsigned long *)(secp+rel->r_offset);
+           dest16=(unsigned short *)dest64;
+
+           symval += rel->r_addend;
+           symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
+
+           *dest16=symval;
+           break;
+           }
+       case R_ALPHA_GPRELHIGH:
+           {
+           dest64=(unsigned long *)(secp+rel->r_offset);
+           dest16=(unsigned short *)dest64;
+
+           symval += rel->r_addend;
+           symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
+           symval = ((long)symval > 16) + ((symval > 15) & 1);
+           if( (long)symval > 0x7fff ||
+               (long)symval < -(long)0x8000 ) {
+               FatalError("R_ALPHA_GPRELHIGH symval-got is too large for %s:%lx\n",
+                       ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)),symval);
+           }
+
+           *dest16=symval;
            break;
            }
        case R_ALPHA_LITERAL:


Now I can start X and it passed a first cursory test (GeForce2 MX PCI on
a Compaq DS20)

I'd like to have a comment whether this is the right fix before I send this
in to the xfree folks.

Thanks,
Thorsten

-- 
| Thorsten Kranzkowski        Internet: <EMAIL: PROTECTED>                      |
| Mobile: ++49 170 1876134       Snail: Niemannsweg 30, 49201 Dissen, Germany |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, <EMAIL: PROTECTED> [44.130.8.19] |



_______________________________________________
Axp-list mailing list
<EMAIL: PROTECTED>
https://listman.redhat.com/mailman/listinfo/axp-list

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Compiling XFree86 4.2.x--sig11
  2002-11-20 15:51 Compiling XFree86 4.2.x--sig11 Kelledin
@ 2002-11-20 19:48 ` Ted Goodridge
  2002-11-20 21:43   ` Will Woods
  2002-11-20 22:00 ` Compiling XFree86 4.2.x--sig11 Will Woods
  1 sibling, 1 reply; 9+ messages in thread
From: Ted Goodridge @ 2002-11-20 19:48 UTC (permalink / raw)
  To: axp-list

Have you tried using the rawhide rpm?  That compiled fine for me.

Ted

On Wednesday 20 November 2002 09:51 am, Kelledin wrote:
> I just tried compiling XFree86 4.2.x on Alpha with fairly bad
> luck--more or less a segfault, see below:
>
> --------
> (WW) Open APM failed (/dev/apm_bios) (No such file or directory)
> (II) Module ABI versions:
>         XFree86 ANSI C Emulation: 0.1
>         XFree86 Video Driver: 0.5
>         XFree86 XInput driver : 0.3
>         XFree86 Server Extension : 0.1
>         XFree86 Font Renderer : 0.3
> (II) Loader running on linux
> (II) LoadModule: "bitmap"
> (II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.a
> (II) Module bitmap: vendor="The XFree86 Project"
>         compiled for 4.2.0, module version = 1.0.0
>         Module class: XFree86 Font Renderer
>         ABI class: XFree86 Font Renderer, version 0.3
>
> Fatal server error:
> Caught signal 11.  Server aborting
>
>
> When reporting a problem related to a server crash, please send
> the full server output, not just the last messages.
> This can be found in the log file "/var/log/XFree86.0.log".
> Please report problems to xfree86@xfree86.org.
> --------
>
> The above is stock 4.2.0, with a patch applied from Thorsten
> Kranzkowski for gcc-3.x compatibility in the XFree86 module
> loader.  I've also tried 4.2.1 with similar results.  Since the
> posting relating to this patch is apparently no longer in google
> (it was yesterday...), I've attached a text copy of it below.
> FYI, I'm using gcc-3.2.
>
> Without the patch, XFree86 compiles on alpha but cannot load any
> modules (thanks to the R_ALPHA_GPREL{HIGH,LOW} relocation types
> being added somewhere around gcc-3.1).  With the patch, it seems
> XFree86 crashes when trying to load the first module...
>
> I have a few ideas on how to get around this, but I figured I'd
> run them by some people on the list rather than spend another
> 3-4 hours building XFree86 for each wild goose-chase I go off
> on:
>
> 1) A lot of this module loading trouble appears to spring from
> XFree86 using a misbegotten module loader that monkeys around
> with ELF format directly.  If I compile it to load modules the
> proper, portable way (via the dlopen API), will it solve this
> problem for good?  How well supported is this?
>
> 2) Do I need to manually specify compilation with -fPIC (via the
> DefaultGcc2AxpOpts definition?)  It occurs to me that the
> XFree86 build isn't smart enough to figure out how to
> selectively apply this flag on its own.  Then again, considering
> XFree86's jacked module loader, neither am I.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Compiling XFree86 4.2.x--sig11
  2002-11-20 19:48 ` Ted Goodridge
@ 2002-11-20 21:43   ` Will Woods
  2002-11-21  6:43     ` Alan Young
  2002-11-21 16:36     ` Running XFree86 4.2.x--S3 Trio64V+ Kelledin
  0 siblings, 2 replies; 9+ messages in thread
From: Will Woods @ 2002-11-20 21:43 UTC (permalink / raw)
  To: axp-list

On Wednesday 20 November 2002 02:48 pm, Ted Goodridge wrote:
> Have you tried using the rawhide rpm?  That compiled fine for me.

It *compiles* fine, even without the patch. I think he's more concerned about 
getting it to actually *run*, which it doesn't, because XFree's ELF loader 
isn't quite complete in 4.2.[01]. 

You might want to check out gentoo's patches for XFree - I'm running XFree 
4.2.1 on a alpha/gentoo system (entirely compiled with gcc 3.2) with no 
problems. The patch tarball is here:

http://www.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/XFree86-4.2.1-patches-1.1.tar.bz2

095_alpha_4.2.1-alpha-gcc3-gprel-fix.patch fixes the relocation problems, but 
there are many other useful patches in there - you might want to apply 
*_alpha_*.patch and *-pic.patch. The relocation patch I saw here months and 
months ago had a typo in it, which is fixed in the gentoo version.

-will




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Compiling XFree86 4.2.x--sig11
  2002-11-20 15:51 Compiling XFree86 4.2.x--sig11 Kelledin
  2002-11-20 19:48 ` Ted Goodridge
@ 2002-11-20 22:00 ` Will Woods
  1 sibling, 0 replies; 9+ messages in thread
From: Will Woods @ 2002-11-20 22:00 UTC (permalink / raw)
  To: axp-list

Sorry about the doublepost, but here's the typo I was talking about in the 
patch Kelledin reposted:
>+           symval = ((long)symval > 16) + ((symval > 15) & 1);
Those greater-than symbols (>) should be shift-rights (>>), or else this line 
doesn't make much sense. So don't use that patch.

-will




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Compiling XFree86 4.2.x--sig11
  2002-11-20 21:43   ` Will Woods
@ 2002-11-21  6:43     ` Alan Young
  2002-11-22  8:43       ` Mike A. Harris
  2002-11-21 16:36     ` Running XFree86 4.2.x--S3 Trio64V+ Kelledin
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Young @ 2002-11-21  6:43 UTC (permalink / raw)
  To: axp-list; +Cc: will.woods

Thanks for that pointer, Will!  It is timely as I tried to compile the current
X DRI tree this past weekend with GCC 3.2.  I got the same sig 11 errors
trying to run it.  After applying some of the patches (with fuzz), I am able to
bring it up on a LX164 with a spankin' new Radeon 9000 PCI card.
2D is working ok,  but DRI isn't initializing at the moment.  Hey, It's a start. :-)

Alan

On Wed, 20 Nov 2002 16:43:18 -0500 Will Woods <will.woods@hp.com> wrote:

> On Wednesday 20 November 2002 02:48 pm, Ted Goodridge wrote:
> > Have you tried using the rawhide rpm?  That compiled fine for me.
> 
> It *compiles* fine, even without the patch. I think he's more concerned about 
> getting it to actually *run*, which it doesn't, because XFree's ELF loader 
> isn't quite complete in 4.2.[01]. 
> 
> You might want to check out gentoo's patches for XFree - I'm running XFree 
> 4.2.1 on a alpha/gentoo system (entirely compiled with gcc 3.2) with no 
> problems. The patch tarball is here:
> 
> http://www.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/XFree86-4.2.1-patches-1.1.tar.bz2
> 
> 095_alpha_4.2.1-alpha-gcc3-gprel-fix.patch fixes the relocation problems, but 
> there are many other useful patches in there - you might want to apply 
> *_alpha_*.patch and *-pic.patch. The relocation patch I saw here months and 
> months ago had a typo in it, which is fixed in the gentoo version.
> 
> -will




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running XFree86 4.2.x--S3 Trio64V+
  2002-11-20 21:43   ` Will Woods
  2002-11-21  6:43     ` Alan Young
@ 2002-11-21 16:36     ` Kelledin
  1 sibling, 0 replies; 9+ messages in thread
From: Kelledin @ 2002-11-21 16:36 UTC (permalink / raw)
  To: axp-list

On Wednesday 20 November 2002 03:43 pm, Will Woods wrote:
> You might want to check out gentoo's patches for XFree - I'm
> running XFree 4.2.1 on a alpha/gentoo system (entirely
> compiled with gcc 3.2) with no problems. The patch tarball is
> here:
>
> http://www.ibiblio.org/pub/Linux/distributions/gentoo/distfile
>s/XFree86-4.2.1-patches-1.1.tar.bz2
>
> 095_alpha_4.2.1-alpha-gcc3-gprel-fix.patch fixes the
> relocation problems, but there are many other useful patches
> in there - you might want to apply *_alpha_*.patch and
> *-pic.patch. The relocation patch I saw here months and months
> ago had a typo in it, which is fixed in the gentoo version.

W000t, it compiles and loads now. :D

Well sort of. :/  The thing contains an S3 Trio64V+ card that 
seems to be a bit flaky under XF86-4.2.1.  Basically X11 pops 
up, but I get a flicker of screen-wide shearing in the 
framebuffer whenever I engage it in moderately heavy gfx ops 
(like raising focus on one window over another).  Also, I lose 
the screen completely if I try to switch vterms (via Ctrl-Alt-F1 
or the like), or if I Ctrl-Alt-backspace the server.

I'm tempted to say the card just isn't well supported under XF86.  
I've heard of others having maybe a %30 success rate getting 
such cards to work, so it seems likely.

-- 
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Compiling XFree86 4.2.x--sig11
  2002-11-21  6:43     ` Alan Young
@ 2002-11-22  8:43       ` Mike A. Harris
  2002-11-22 14:08         ` Clear Password on PWS-series (433/500/600au) Alphas Thursday AKA dr._john
  2002-11-22 19:05         ` Compiling XFree86 4.2.x--sig11 Alan Young
  0 siblings, 2 replies; 9+ messages in thread
From: Mike A. Harris @ 2002-11-22  8:43 UTC (permalink / raw)
  To: axp-list

On Wed, 20 Nov 2002, Alan Young wrote:

>Date: Wed, 20 Nov 2002 22:43:47 -0800
>From: Alan Young <ayoung@teleport.com>
>To: axp-list@redhat.com
>Cc: will.woods@hp.com
>Content-Type: text/plain; charset=US-ASCII
>List-Id: Linux and Red Hat on Alpha processors <axp-list.redhat.com>
>Subject: Re: Compiling XFree86 4.2.x--sig11
>
>Thanks for that pointer, Will!  It is timely as I tried to compile the current
>X DRI tree this past weekend with GCC 3.2.  I got the same sig 11 errors
>trying to run it.  After applying some of the patches (with fuzz), I am able to
>bring it up on a LX164 with a spankin' new Radeon 9000 PCI card.
>2D is working ok,  but DRI isn't initializing at the moment.  Hey, It's a start. :-)

It isn't initializing because Radeon 9x00 is supported by 2D only 
in CVS, and 3D support wont be around for quite a while most 
likely.

-- 
Mike A. Harris		ftp://people.redhat.com/mharris
OS Systems Engineer
XFree86 maintainer
Red Hat Inc.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Clear Password on PWS-series (433/500/600au) Alphas
  2002-11-22  8:43       ` Mike A. Harris
@ 2002-11-22 14:08         ` Thursday AKA dr._john
  2002-11-22 19:05         ` Compiling XFree86 4.2.x--sig11 Alan Young
  1 sibling, 0 replies; 9+ messages in thread
From: Thursday AKA dr._john @ 2002-11-22 14:08 UTC (permalink / raw)
  To: axp-list

This is for Jools,wgho made the inquiry last week and whose msg I
deleted. I have seen nothing on-list about it since.  

a little late, as my manual had gone missing.

To clear the password on the PWS ("Miata") series machines, simply press
the reset button on the motherboard. It is located at the top of the
board, right of thememory slots, and a bit above and left of the COM 2
port.

Hope this helps.

later

jn

AKA "Thursday"




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Compiling XFree86 4.2.x--sig11
  2002-11-22  8:43       ` Mike A. Harris
  2002-11-22 14:08         ` Clear Password on PWS-series (433/500/600au) Alphas Thursday AKA dr._john
@ 2002-11-22 19:05         ` Alan Young
  1 sibling, 0 replies; 9+ messages in thread
From: Alan Young @ 2002-11-22 19:05 UTC (permalink / raw)
  To: axp-list

I may be mistaken, but from what I gathered from the DRI-devel list
some 3D support was added to the DRI tree a couple of weeks ago.

I'm not sure where the problem lies.  I think I might be having a issue
with the kernel modules.  When I use the new DRI kernel module, X starts
up and issues these messages in the log:

drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmGetBusid returned ''
(II) RADEON(0): [drm] drmSetBusid failed (5, PCI:0:9:0), Permission Denied
(EE) RADEON(0): [dri] DRIScreenInit failed.  Disabling DRI.  

When I use the DRI module that comes with kernel 2.4.19, I get these messages:

drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmGetBusid returned ''
(II) RADEON(0): [drm] created "radeon" driver at busid "PCI:0:9:0"  
(II) RADEON(0): [drm] added 8192 byte SAREA at 0xfffffffc00334000   
(II) RADEON(0): [drm] mapped SAREA 0xfffffffc00334000 to 0x200000000000
(II) RADEON(0): [drm] framebuffer handle = 0x10000000
(II) RADEON(0): [drm] added 1 reserved context for kernel
(EE) RADEON(0): [dri] RADEONDRIScreenInit failed because of a version mismatch.
[dri] radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer is needed.
[dri] Disabling DRI.
(EE) RADEON(0): [drm] failed to remove DRM signal handler  
(II) RADEON(0): [drm] removed 1 reserved context for kernel
(II) RADEON(0): [drm] unmapping 8192 bytes of SAREA 0xfffffffc003340 at 0x20000000000

I did a search on the "permission denied" message and found a few hits, but no solid
answers.

Alan

On Fri, 22 Nov 2002 03:43:50 -0500 (EST) "Mike A. Harris" <mharris@redhat.com> wrote:
> 
> It isn't initializing because Radeon 9x00 is supported by 2D only 
> in CVS, and 3D support wont be around for quite a while most 
> likely.
> 
> -- 
> Mike A. Harris		ftp://people.redhat.com/mharris
> OS Systems Engineer
> XFree86 maintainer
> Red Hat Inc.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-11-22 19:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20 15:51 Compiling XFree86 4.2.x--sig11 Kelledin
2002-11-20 19:48 ` Ted Goodridge
2002-11-20 21:43   ` Will Woods
2002-11-21  6:43     ` Alan Young
2002-11-22  8:43       ` Mike A. Harris
2002-11-22 14:08         ` Clear Password on PWS-series (433/500/600au) Alphas Thursday AKA dr._john
2002-11-22 19:05         ` Compiling XFree86 4.2.x--sig11 Alan Young
2002-11-21 16:36     ` Running XFree86 4.2.x--S3 Trio64V+ Kelledin
2002-11-20 22:00 ` Compiling XFree86 4.2.x--sig11 Will Woods

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox