Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jul 2011 14:41:04 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        bf1783@gmail.com
Cc:        "freebsd-x11@FreeBSD.org" <freebsd-x11@freebsd.org>
Subject:   Re: x11/nvidia-driver incompatible with portmaster?
Message-ID:  <20110703114104.GK48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAGFTUwM-c4WvkX01iuDh4kWcjX8kLKv9Gm1297orPMgNyV_1Cg@mail.gmail.com>
References:  <CAGFTUwMPV9Tge6%2BGZO879KD7dh6Sr6%2BfPGK97SGvRndBitMTjg@mail.gmail.com> <4E0FCDD1.7050809@missouri.edu> <4E0FD8DC.20700@missouri.edu> <CAGFTUwM-c4WvkX01iuDh4kWcjX8kLKv9Gm1297orPMgNyV_1Cg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--PcRXrlgJrpq3uA0O
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jul 03, 2011 at 03:54:15AM +0000, b. f. wrote:
> On 7/3/11, Stephen Montgomery-Smith <stephen@missouri.edu> wrote:
> > On 07/02/2011 09:02 PM, Stephen Montgomery-Smith wrote:
> >> On 07/02/2011 08:39 PM, b. f. wrote:
>=20
> > Maybe the xorg-server and libGL ports install the libglx.la etc stuff
> > into a folder called share/xorg/gl-libs, and the nvidia-drivers install
> > their stuff into a folder called share/nvidia-driver/gl-libs.
>=20
> I think that libraries should be installed in a subdirectory of ${PREFIX}=
/lib.
>=20
> >
> > Further, the libGL port installs a script libexec/xorg/link-gl-libs.sh,
> > which links lib/modules/extensions/libglx.la to either the stuff in
> > share/xorg/gl-libs, or the stuff in share/nvidia-driver/gl-libs,
> > depending upon whether share/nvidia-driver/gl-libs exists or not.
>=20
> A libtool archive ( *.la ) is not the same as an archive (*.a).  I
> don't think there are any archives involved in the collisions, only
> shared libraries.   I wish that the *.la files were not installed,
> because I think that they are more trouble than they are worth.  In
> any event, as you suggest, they can be patched.
>=20
> But not every port that links to one of the shared libraries uses the
> *.la via libtool/libltdl.  You still have to address normal linking.
> The two methods I mentioned earlier are options.
>=20
> By a linker script I mean a script in the linker language understood
> by ld(1).  See, for example, the ld info docs.
>=20
> There is another option that I didn't mention: build the conflicting
> xorg-server and libGL libraries as filters for the corresponding
> nvidia-driver libraries.  But unfortunately, not all supported
> versions of FreeBSD have this capability in rtld(1) -- kib@ only added
> it in:
>=20
> http://svnweb.FreeBSD.org/base?view=3Drevision&revision=3D216695

There is some sort of ABI standard for libGL. Both Mesa provided
libGL and NVidia one should follow it. More, extensions functions
shall be accessed using some form of glXGetProcAddr. What I said
is a long way of statement that libGL.so.1 from Mesa and NVidia
are intercheable for the toolchain usage.

That said, there is absolutely no need in any static linker tricks,
esp. a heavy one like filters or linker scripts. A symlink named
libGL.so would be enough for the static linker, pointing to any
of two libraries. And symlink libGL.so.1 would be also enough
for dynamic linker.

The real issue with xorg-server, mesa and nvidia driver is only
the overwrite of extensions/libglx.so and lib/libGL.so.1. If
this can be somewhat solved by the packaging system, that would
be great. On my hybrid laptop I have to manually manage the
said symlinks (actually, with the rc script that verifies
the list of pci devices and arranges the symlinks).

--PcRXrlgJrpq3uA0O
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk4QVVAACgkQC3+MBN1Mb4jiMgCbB+h9epug7BxLBgC/7uBltvr3
tAIAoNQ+KEFseGYEMM+bMNTXGKPt3jcd
=rphL
-----END PGP SIGNATURE-----

--PcRXrlgJrpq3uA0O--



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