Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2008 17:50:03 GMT
From:      Callum Gibson <callumgibson@optusnet.com.au>
To:        freebsd-x11@FreeBSD.org
Subject:   Re: ports/117907: x11-servers/mga_hal broken on 7.0-BETA (GLIBC error)
Message-ID:  <200806161750.m5GHo32X003705@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/117907; it has been noted by GNATS.

From: Callum Gibson <callumgibson@optusnet.com.au>
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:
 
 <segfault>
 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806161750.m5GHo32X003705>