Subject: Re: XFree86-4.6.0 on Solaris
To: None <port-sparc64@NetBSD.org>
From: Raymond Meyer <raymond.meyer@rambler.ru>
List: port-sparc64
Date: 07/15/2006 23:29:04
On Sat, 15 Jul 2006 20:05:30 +0100
Raymond Meyer <raymond.meyer@rambler.ru> wrote:
> Hi, I did manage to build meta-pkgs/xorg on Sparc Solaris.
> I copied sunffb directory from NetBSD's X11 tree into my local tree and built
> the driver. When I run 'X -configure' the Xserver tries to load the driver,
> but then it gives the following error message.
>
> Couldn't open RGB_DB '/opt/pkg/xorg/lib/X11/rgb'
> List of video drivers:
> sunffb
> ld.so.1: Xorg: fatal: relocation error:
> file /opt/pkg/xorg/lib/modules/drivers/sunffb_drv.so: symbol
> xf86MatchSbusInstances: referenced symbol not found
This is the command that links all object files into final Xorg binary:
LD_RUN_PATH=/opt/pkg/xorg/lib cc -o Xorg -xO4 -xbuiltin=%all -xlibmil -xstrconst -xarch=v8plus -Xa -v -z lazyload -z combreloc -xstrconst -xildoff -B direct -M/usr/lib/ld/map.bssalign -M/usr/lib/ld/map.noexstk -L/opt/pkg.obj/x11/xorg-server/work.ultra10/xc/exports/lib xkb/xf86KillSrv.o xkb/xf86VT.o xkb/xf86Private.o /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/xf86Init.o /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/xf86IniExt.o /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/libxf86.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/parser/libxf86config.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/os-support/libxf86_os.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/loader/libloader.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/libxf86.a dix/libdi
x.a os/libos.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/lib/font/fontbase.o /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/lib/font/libfontbase.a Xext/libexts.a xkb/libxkb.a os/libos.a Xi/libxinput.a lbx/liblbx.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/lib/lbxutil/liblbxutil.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/libxf86.a composite/libcomposite.a damageext/libdamage.a miext/damage/libdamage.a xfixes/libxfixes.a miext/cw/libcw.a Xext/libexts.a xkb/libxkb.a os/libos.a Xi/libxinput.a lbx/liblbx.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/lib/lbxutil/liblbxutil.a randr/librandr.a render/librender.a dix/libxpstubs.a mi/libmi.a composite/libcomposite.a damageext/libdamage.a miext/damage/libdamage.a xfixes/libxfixes.a miext/cw/libcw.a Xext/libexts.a xkb/libxkb.a os/libos.a Xi/libxinput.a lbx/liblbx.a /opt/pkg.obj/x11/xorg-server/work.ultra10/xc/lib/lbxutil/liblbxutil.a randr/librandr.a render/librender.a /opt/pkg.obj/x11/xor
g-server/work.ultra10/xc/programs/Xserver/hw/xfree86/os-supp!
ort/libx
f86_os.a -lsocket -lnsl -lz -lm -lXau -lXdmcp -lc -L/opt/pkg/lib -L/opt/pkg/xorg/lib -Wl,-R/opt/pkg/lib -Wl,-R/opt/pkg/xorg/lib
As you can see above it links the following static library:
/opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/libxf86.a
# nm libxf86.a | grep 'xf86Match'
[88] | 13388| 492|FUNC |GLOB |0 |2 |xf86MatchDevice
[97] | 16772| 836|FUNC |GLOB |0 |2 |xf86MatchIsaInstances
[93] | 13880| 2892|FUNC |GLOB |0 |2 |xf86MatchPciInstances
[36] | 3492| 1764|FUNC |GLOB |0 |2 |xf86MatchSbusInstances
But when I run 'nm' on Xorg binary:
# nm Xorg | grep 'xf86Match'
[3726] | 402268| 492|FUNC |GLOB |0 |9 |xf86MatchDevice
[4683] | 405652| 836|FUNC |GLOB |0 |9 |xf86MatchIsaInstances
[3369] | 402760| 2892|FUNC |GLOB |0 |9 |xf86MatchPciInstances
Maybe there is a bug in Solaris linker???
Anyway I used the command above to link Xorg server again, but this time I
added the following line to the end of it:
/opt/pkg.obj/x11/xorg-server/work.ultra10/xc/programs/Xserver/hw/xfree86/common/xf86sbusBus.o
So, now
# nm Xorg | grep 'xf86Match'
[5676] | 402852| 492|FUNC |GLOB |0 |9 |xf86MatchDevice
[4614] | 406236| 836|FUNC |GLOB |0 |9 |xf86MatchIsaInstances
[3317] | 403344| 2892|FUNC |GLOB |0 |9 |xf86MatchPciInstances
[3987] | 2303868| 1764|FUNC |GLOB |0 |9 |xf86MatchSbusInstances
I really hope this will work.