From owner-freebsd-x11@FreeBSD.ORG Mon Jun 16 17:50:03 2008 Return-Path: Delivered-To: freebsd-x11@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEADB1065671 for ; Mon, 16 Jun 2008 17:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9AC4A8FC1A for ; Mon, 16 Jun 2008 17:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5GHo3m5003706 for ; Mon, 16 Jun 2008 17:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5GHo32X003705; Mon, 16 Jun 2008 17:50:03 GMT (envelope-from gnats) Date: Mon, 16 Jun 2008 17:50:03 GMT Message-Id: <200806161750.m5GHo32X003705@freefall.freebsd.org> To: freebsd-x11@FreeBSD.org From: Callum Gibson Cc: Subject: Re: ports/117907: x11-servers/mga_hal broken on 7.0-BETA (GLIBC error) X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Callum Gibson List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 17:50:03 -0000 The following reply was made to PR ports/117907; it has been noted by GNATS. From: Callum Gibson To: bug-followup@FreeBSD.org, josh@hewbert.com Cc: Subject: Re: ports/117907: x11-servers/mga_hal broken on 7.0-BETA (GLIBC error) Date: Mon, 16 Jun 2008 17:53:37 +1000 flz wrote: >Can you try to do these: >- Simple rebuild the port, test. - Change XORG_VERSION to 7.0.0 in >Makefile, rebuild, test. - Add the following to /etc/libmap.conf, test. >[/usr/local/lib/xorg/modules/drivers/mga_drv.so] > libc.so.6 /compat/linux/lib/libc.so.6 There are a couple of reasons the above doesn't work. Firstly, you seem to need double '/' in the constraint. ie. [/usr/local/lib/xorg/modules/drivers//mga_drv.so] I determined this with ktrace. Having fixed that... Secondly, because Xorg is running setuid it will only allow trusted library paths (/lib, /usr/lib, /usr/local/lib). However, in order to get Xorg to use /compat/linux/lib/libc.so.6 you need to have it appear within the trusted library paths. I'm not sure, but I think this is compiled into the binary, but I was able to get around this by making a symlink thus: lrwxr-xr-x 1 root wheel 13 13 Jun 10:08 /usr/local/lib/compat/linux -> /compat/linux Having done this, though, I found that Xorg segfaulted upon initialisation of the mga_drv.so inside the linux libc in strrchr(). As a matter of interest I also compiled a native version of mga_drv.so using the source from matrox and using the linux mga_hal_drv.so with a slight tweak to the libmap.conf line as follows: [/usr/local/lib/xorg/modules/drivers//mga_hal_drv.so] libc.so.6 /compat/linux/lib/libc.so.6 but this segfaults in the same place, albeit upon loading the mag_hal_drv.so (as opposed to the mga_drv.so). I'm not sure why this is occurring - it doesn't seem to be code in the driver itself that is crashing but in the loading of the linux compat library. The stack trace is something like: strrchr() __init_misc() _init() dlsym ... I can get an exact one if anyone thinks it will help. In the meantime I'm looking at v1.9.100 of xf86-video-mga instead to see if it can be made to work (for a dual DVI G550). -- Callum Gibson @ home http://members.optusnet.com.au/callumgibson/