Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2011 12:56:00 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        bf1783@gmail.com
Cc:        "freebsd-x11@FreeBSD.org" <freebsd-x11@freebsd.org>, danfe@freebsd.org
Subject:   Re: x11/nvidia-driver incompatible with portmaster?
Message-ID:  <20110705095600.GE48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAGFTUwPHREj=oucqCihCpYB%2BzdZR3Vtkztaod9EbV2SaP679HA@mail.gmail.com>
References:  <CAGFTUwMPV9Tge6%2BGZO879KD7dh6Sr6%2BfPGK97SGvRndBitMTjg@mail.gmail.com> <4E0FCDD1.7050809@missouri.edu> <4E0FD8DC.20700@missouri.edu> <CAGFTUwM-c4WvkX01iuDh4kWcjX8kLKv9Gm1297orPMgNyV_1Cg@mail.gmail.com> <20110703114104.GK48734@deviant.kiev.zoral.com.ua> <CAGFTUwM2VMBsWmxQ70PkNcDfPb_JOBUw7N1wZOVsXfPPSQic1g@mail.gmail.com> <20110703140400.GO48734@deviant.kiev.zoral.com.ua> <CAGFTUwPHREj=oucqCihCpYB%2BzdZR3Vtkztaod9EbV2SaP679HA@mail.gmail.com>

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

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

On Tue, Jul 05, 2011 at 05:58:53AM +0000, b. f. wrote:
> On 7/3/11, Kostik Belousov <kostikbel@gmail.com> wrote:
> > On Sun, Jul 03, 2011 at 12:45:50PM +0000, b. f. wrote:
> >> On 7/3/11, Kostik Belousov <kostikbel@gmail.com> wrote:
> >> > 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:
> >> ...
> >> >
> >> > 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).
> >>
> >> So basically, you would prefer that we:
> >>
> >> patch xorg-server so that it installs, e.g.,
> >> ${PREFIX}/lib/xorg/modules/extensions/libglx-xorg.so.1 instead of
> >> ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1, and points the
> >> symlink ${PREFIX}/lib/xorg/modules/extensions/libglx-xorg.so at the
> >> former;
> >>
> >> patch libGL so that it installs, e.g., ${PREFIX}/lib/libGL-mesa.so.1
> >> instead of ${PREFIX}/lib/libGL.so.1, and points the symlink
> >> ${PREFIX}/lib/libGL.so at the former;
> >>
> >> and patch nvidia-driver so that it installs, e.g.,
> >> ${PREFIX}/lib/xorg/modules/extensions/libglx-nvidia.so.1 instead of
> >> ${PREFIX}/lib/xorg/modules/extensions/libglx.so.1, and
> >> ${PREFIX}/lib/libGL-nvidia.so.1 instead of ${PREFIX}/lib/libGL.so.1;
> >> and during installation it overwrites the
> >> ${PREFIX}/lib/xorg/modules/extensions/libglx-xorg.so and
> >> ${PREFIX}/lib/libGL.so symlinks, redirecting them to the corresponding
> >> nvidia libraries; while during deinstallation it changes them to point
> >> to the mesa/xorg libraries?
> > Yes.
> >
> >>
> >> And corresponding redirection to handle the libtool archive file?
> > I do not think this is needed. First, I believe .la files are only
> > installed by the Xorg ports. Second, as I described, libGL.so from
> > Xorg and from NVidia should be replacable for the static linking
> > purposes. Third, libglx.la is not used at all.
> ...
> > On Sun, Jul 03, 2011 at 01:33:09PM +0000, b. f. wrote:
> >> On second thought the renaming of these libraries is not very
> >> convenient, since they are built by nvidia, and not necessary if their
> >> mesa/xorg counterparts already have different names.
> >
> > As I said, it is useful for me on the hybrid laptop, where a switch
> > selects the GPU attached to the panel. The startup script then would
> > only need to create proper symlink, instead of delicate renaming
> > of the libraries.
>=20
> Please consider the attached patch.  Small unrelated clean-ups to
> x11-servers/xorg-server and bsd.mesalib.mk are included with the
> changes that remove the collisions, and add the necessary symlinks.
> The renaming in the xorg-server post-install target is a bit ugly, but
> much easier than dissecting the libtool build and installation of the
> glx convenience library.  I used sed rather than patches for some of
> the changes in libGL and nvidia-driver because of the multiple
> distfiles involved.
>=20

I think that the policy in xorg and mesa ports should be to install
symlinks if they are not present, instead of checking for the
presence of nvidia driver.

Also, the installation of libglx.so and post-factum renaming looks rude
and could probably cause complications since original libglx.so symlink
is removed, am I right ?

--2/WF4jK2yacEfzaN
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iEYEARECAAYFAk4S368ACgkQC3+MBN1Mb4iwNQCfRjV+vxwHJ/h+WPaLUdeHRn+q
TAUAoJMpjJ8i844kTTCaT6cvmh8fZbSY
=VsoI
-----END PGP SIGNATURE-----

--2/WF4jK2yacEfzaN--



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