From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id C65353F66E for ; Wed, 20 Nov 2002 10:56:13 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id gAKFuDR24408 for axp-list@listman.redhat.com; Wed, 20 Nov 2002 10:56:13 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gAKFuDD24402 for ; Wed, 20 Nov 2002 10:56:13 -0500 Received: from skarpsey.dyndns.org (12-237-135-160.client.attbi.com [12.237.135.160]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gAKFWLP12728 for ; Wed, 20 Nov 2002 10:32:21 -0500 Received: from valhalla (Valhalla.attbi.com [192.168.0.2]) by skarpsey.dyndns.org (8.12.6/8.12.5) with ESMTP id gAKFp5lm002579 for ; Wed, 20 Nov 2002 09:51:06 -0600 From: Kelledin Subject: Compiling XFree86 4.2.x--sig11 Date: Wed, 20 Nov 2002 09:51:05 -0600 User-Agent: KMail/1.4.3 To: axp-list@redhat.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_5DTVOCCI1VT8TVYEFM4L" Message-Id: <200211200951.05757.kelledin+AXP@skarpsey.dyndns.org> X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: --------------Boundary-00=_5DTVOCCI1VT8TVYEFM4L Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=3D"The XFree86 Project" compiled for 4.2.0, module version =3D 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?" --------------Boundary-00=_5DTVOCCI1VT8TVYEFM4L Content-Type: text/plain; charset="us-ascii"; name="xfree86.alpha.patch.email" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xfree86.alpha.patch.email" 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: | | Mobile: ++49 170 1876134 Snail: Niemannsweg 30, 49201 Dissen, Germany | | Ampr: dl8bcu@db0lj.#rpl.deu.eu, [44.130.8.19] | _______________________________________________ Axp-list mailing list https://listman.redhat.com/mailman/listinfo/axp-list --------------Boundary-00=_5DTVOCCI1VT8TVYEFM4L--