mirror of
https://github.com/glfs-book/glfs.git
synced 2025-07-22 01:12:59 +00:00
313 lines
10 KiB
XML
313 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY libglvnd-root "https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive">
|
|
<!ENTITY libglvnd-download
|
|
"&libglvnd-root;/v&libglvnd-version;/libglvnd-v&libglvnd-version;.tar.gz">
|
|
]>
|
|
|
|
<sect1 id="libglvnd" xreflabel="libglvnd-&libglvnd-version;">
|
|
<?dbhtml filename="libglvnd.html"?>
|
|
|
|
<title>libglvnd-&libglvnd-version;</title>
|
|
|
|
<indexterm zone="libglvnd">
|
|
<primary sortas="a-glvnd">libglvnd</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to libglvnd</title>
|
|
|
|
<para>
|
|
The libglvnd package dispatchs API calls to a given driver vendor at
|
|
runtime. Some of the libraries are simply wrappers to the main
|
|
dispatcher. Drivers that are built with libglvnd in mind provide their
|
|
own OpenGL implementations. For <xref linkend="mesa"/>, it will install
|
|
<filename class="libraryfile">libEGL_mesa</filename> and <filename
|
|
class="libraryfile">libGLX_mesa</filename>. For <xref linkend="nvidia"/>,
|
|
it will provide <filename class="libraryfile">libEGL_nvidia</filename>,
|
|
<filename class="libraryfile">libGLESv2_nvidia</filename>, and
|
|
<filename class="libraryfile">libGLX_nvidia</filename>. Each
|
|
implementation is specific to the driver it comes from.
|
|
</para>
|
|
|
|
<para>
|
|
The benefit of doing it that way is that a driver doesn't have to obey to
|
|
the architecture an OpenGL vendor applies nor being absorbed by the
|
|
vendor.
|
|
</para>
|
|
|
|
<important><para>
|
|
Read <xref linkend="aboutgl"/> to decide if you want to install OpenGL
|
|
implementations from this provider.
|
|
</para></important>
|
|
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download: <ulink url="&libglvnd-download;"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">libglvnd Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="xorg7-lib"/>
|
|
<footnote><para>
|
|
If <xref linkend="xorg7-lib"/> is not installed, this package will not
|
|
provide <filename class="libraryfile">libGL</filename> or <filename
|
|
class="libraryfile">libGLX</filename>. <filename
|
|
class="libraryfile">libOpenGL</filename> will still be built. Many
|
|
build systems will expect <filename
|
|
class="libraryfile">libGL</filename> to be present, so it is heavily
|
|
recommended to install <xref linkend="xorg7-lib"/> before installing
|
|
this package.
|
|
</para></footnote>
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of libglvnd</title>
|
|
|
|
<para>
|
|
Install libglvnd by running the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>mkdir build &&
|
|
cd build &&
|
|
|
|
meson setup --prefix=/usr \
|
|
--buildtype=release \
|
|
-D gles1=false \
|
|
-D hgl=false \
|
|
.. &&
|
|
|
|
ninja</userinput></screen>
|
|
|
|
<para>
|
|
Now as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>ninja install</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>lib32 Installation of libglvnd</title>
|
|
|
|
<para>
|
|
Install lib32-libglvnd by running the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>rm -rf * &&
|
|
CC="gcc -m32" CXX="g++ -m32" \
|
|
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
|
|
meson setup --prefix=/usr \
|
|
--libdir=/usr/lib32 \
|
|
--buildtype=release \
|
|
-D gles1=false \
|
|
-D hgl=false \
|
|
.. &&
|
|
|
|
ninja</userinput></screen>
|
|
|
|
<para>
|
|
Now as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>DESTDIR=$PWD/DESTDIR ninja install &&
|
|
cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
|
|
rm -rf DESTDIR &&
|
|
ldconfig</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
&options-meson;
|
|
|
|
&meson-buildtype-release;
|
|
|
|
<para>
|
|
<parameter>-D gles1=false</parameter>: This disables an obsolete version
|
|
of OpenGL ES.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>-D hgl=false</parameter>: This disables targetting Haiku by
|
|
default as this guide is for Linux, not Haiku.
|
|
</para>
|
|
|
|
<para>
|
|
<option>-D gles2=false</option>: If you don't need OpenGL ES, use
|
|
this option. Be sure to read <xref linkend="aboutgles"/>.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>List of packages With Issues</title>
|
|
|
|
<para>
|
|
While installing this package can help prevent a lot of issues down the
|
|
road, this package can come with some caveats and all of them are in
|
|
relation to BLFS. BLFS naturally expects that the only OpenGL vendor is
|
|
Mesa, so the instructions will thus assume
|
|
that this package has not been installed. The following have known
|
|
issues, and solutions:
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>Mesa: In BLFS, a patch is listed in
|
|
the <ulink url="&blfs-svn;/x/mesa.html">Mesa</ulink> page and will
|
|
instruct you to apply it. This will cause an issue unless you explictly
|
|
tell the build system not to link against this package's libraries,
|
|
which means having it build its own OpenGL implementations, which will
|
|
cause issues of its own. The exact error the patch causes is a linking
|
|
error in the final set of steps when building the demos as it expects
|
|
functions that are not found in the specific libraries from this
|
|
package it tries to link against.</para>
|
|
<para>Either don't apply that patch or follow this book's <xref
|
|
linkend="mesa"/> page instead. Thanks to
|
|
Mesa's build system autodetecting if
|
|
libglvnd is installed, the installation
|
|
instructions don't change that much between this book and BLFS. The
|
|
main differences are lib32 support and not listing the demos
|
|
patch.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>GLU: In BLFS, the <ulink
|
|
url="&blfs-svn;/x/glu.html">GLU</ulink> page explictly sets the GL
|
|
vendor to be Mesa as the build system will
|
|
otherwise expect libglvnd and
|
|
<filename class="libraryfile">libOpenGL</filename> to be installed.
|
|
While the BLFS page instructions lead to a successful compilation, the
|
|
resulting library does not function properly. You should follow the
|
|
<ulink url="&slfs-website;/general/glu.html">SLFS GLU</ulink> page
|
|
instead. It also does check if the vendor is
|
|
Mesa.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>None</seg>
|
|
<seg>
|
|
libEGL,
|
|
libGL,
|
|
libGLESv2,
|
|
libGLX,
|
|
libGLdispatch, and
|
|
libOpenGL
|
|
</seg>
|
|
<seg>
|
|
/usr/include/{EGL,GLES{2,3},glvnd,KHR}
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="glvnd-libEGL">
|
|
<term><filename class="libraryfile">libEGL</filename></term>
|
|
<listitem>
|
|
<para>
|
|
contains EGL window-system API functions
|
|
</para>
|
|
<indexterm zone="libglvnd glvnd-libEGL">
|
|
<primary sortas="b-glvnd-libEGL">libEGL</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="glvnd-libGL">
|
|
<term><filename class="libraryfile">libGL</filename></term>
|
|
<listitem>
|
|
<para>
|
|
is the <quote>legacy</quote> OpenGL library; wrapper library
|
|
calling <filename class="libraryfile">libGLdispatch
|
|
</filename> and <filename class="libraryfile">libGLX</filename>
|
|
</para>
|
|
<indexterm zone="libglvnd glvnd-libGL">
|
|
<primary sortas="b-glvnd-libGL">libGL</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="glvnd-libGLESv2">
|
|
<term><filename class="libraryfile">libGLESv2</filename></term>
|
|
<listitem>
|
|
<para>
|
|
exposes OpenGL ES 2.x and 3.x entrypoints; wrapper library calling
|
|
<filename class="libraryfile">libGLdispatch</filename>
|
|
</para>
|
|
<indexterm zone="libglvnd glvnd-libGLESv2">
|
|
<primary sortas="b-glvnd-libGLESv2">libGLESv2</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="glvnd-libGLX">
|
|
<term><filename class="libraryfile">libGLX</filename></term>
|
|
<listitem>
|
|
<para>
|
|
dispatches GLX extensions to the right vendor
|
|
</para>
|
|
<indexterm zone="libglvnd glvnd-libGLX">
|
|
<primary sortas="b-glvnd-libGLX">libGLX</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="glvnd-libGLdispatch">
|
|
<term><filename class="libraryfile">libGLdispatch</filename></term>
|
|
<listitem>
|
|
<para>
|
|
dispatches OpenGL and TLS to the right vendor
|
|
</para>
|
|
<indexterm zone="libglvnd glvnd-libGLdispatch">
|
|
<primary sortas="b-glvnd-libGLdispatch">libGLdispatch</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="glvnd-libOpenGL">
|
|
<term><filename class="libraryfile">libOpenGL</filename></term>
|
|
<listitem>
|
|
<para>
|
|
is the <quote>new</quote> OpenGL library and exposes OpenGL
|
|
entrypoints; wrapper library calling <filename
|
|
class="libraryfile"> libGLdispatch</filename>
|
|
</para>
|
|
<indexterm zone="libglvnd glvnd-libOpenGL">
|
|
<primary sortas="b-glvnd-libOpenGL">libOpenGL</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|