Difference between pages "Emerge" and "News:New OpenGL management in Funtoo"

(Difference between pages)
 
(explanation of the new system)
 
Line 1: Line 1:
== Getting started with emerge ==
+
{{News
Emerge is the front-end for funtoo's portage package manager. With emerge it is easy to install, update or remove packages.
+
|Summary=Funtoo is switching to an improved system for managing multiple OpenGL providers (Mesa/Xorg, AMD and nVidia). The update may involve blockers and file collisions.
 +
|News Format=Extended
 +
|News Category=Packages
 +
|Author=Mgorny
 +
|Publication Status=Draft
 +
|Publication Date=2015/02/28
 +
}}
 +
== New OpenGL management ==
 +
=== System principles ===
 +
The new OpenGL management design assumes that the reference OpenGL implementation (mesa/Xorg) is to be used to build packages. After switching to the new system, all packages will use the mesa/Xorg headers and link to the mesa/Xorg libraries. This improves portability of software built on Funtoo and solves some of the build failures when non-standard OpenGL provider was enabled.
  
=== Update package database ===
+
The third-party OpenGL libraries and modules provided by proprietary driver vendors can be enabled for run-time program use. They will not affect how the program is built. However, they will be loaded by the dynamic loader when starting executables. The Xorg server will also load the modules provided by blob driver vendor if appropriate.
'''Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.'''
+
<console>
+
###i## emerge --sync
+
</console>
+
  
=== Search packages ===
+
=== Implementation ===
'''Search packages by name.'''
+
The reference implementation (mesa/Xorg) packages install headers and libraries into standard system locations (/usr/include, /usr/lib*). The compiler and linker finds them using the usual rules and uses them.
<console>
+
###i## emerge -s firefox
+
###i## emerge --search firefox
+
</console>
+
  
'''Search packages by description.'''
+
The third-party OpenGL vendors install libraries and server extension modules into vendor-named subdirectories of /usr/lib*/opengl. Those files are not used directly.
<console>
+
###i## emerge -S web browser
+
###i## emerge --searchdesc web browser
+
</console>
+
  
=== Install packages ===
+
{{Package|app-admin/eselect-opengl}} is used to select OpenGL implementation used at run-time. The choice of implementation is controlled via dynamic linker configuration (ld.so.conf) and Xorg server configuration. If the reference implementation is selected, the eselect module outputs null configuration that causes the linker and server to use the standard paths. If an another implementation is selected, the configuration prepends /usr/lib*/opengl paths to linker and server configuration, causing them to prefer the third-party libraries over reference.
'''Install package.'''
+
{{NewsFooter}}
<console>
+
###i## emerge firefox
+
</console>
+
 
+
'''Install multiple packages.'''
+
<console>
+
###i## emerge firefox thunderbird
+
</console>
+
 
+
'''Install package. Ask for confirmation before performing any changes. Show verbose output.'''
+
<console>
+
###i## emerge -av firefox
+
###i## emerge --ask firefox
+
</console>
+
 
+
=== Remove packages ===
+
'''Remove package.'''
+
<console>
+
###i## emerge -C firefox
+
###i## emerge --unmerge firefox
+
</console>
+
 
+
'''Remove package. Ask for confirmation before performing any changes.'''
+
<console>
+
###i## emerge -aC firefox
+
</console>
+
 
+
'''Remove orphaned packages. Ask for confirmation before performing any changes.'''
+
<console>
+
###i## emerge -a --depclean
+
</console>
+
 
+
=== Update packages ===
+
'''Update all packages.'''
+
<console>
+
###i## emerge -uDN @world
+
</console>
+
 
+
'''Update all packages. Ask for confirmation before performing any changes. Show verbose output.'''
+
<console>
+
###i## emerge -uavDN @world
+
</console>
+
 
+
== Emerge options ==
+
 
+
; --sync
+
: Updates the portage tree that is located in /usr/portage by default.
+
 
+
; --search -s
+
: Searches  for  matches  of  the  supplied  string in the portage tree.
+
 
+
; --searchdesc -S
+
: Matches the search string against the description field as well as the package name.
+
 
+
; --ask -a
+
: Ask for confirmation before performing any changes.
+
 
+
; --pretend -p
+
: Instead of actually performing the merge, simply display what *would* have been installed if --pretend weren't used.
+
 
+
; --unmerge -C
+
: Removes all matching packages.
+
 
+
; --update -u
+
: Updates  packages to the best version available, which may not always be the  highest version number due to masking for testing and development.
+
 
+
; --deep [DEPTH] -D
+
: force  emerge  to  consider  the entire  dependency tree of packages, instead of checking only the immediate dependencies of the packages.
+
 
+
; --newuse -N
+
: Tells emerge to include installed packages where USE flags have changed since compilation.
+
 
+
; --depclean -c
+
: Remove orphaned packages. Cleans the system by removing packages that are not associated with explicitly merged packages.
+
 
+
; --autounmask-write
+
: Automatically write package.use settings as necessary to satisfy dependencies.
+
 
+
; --resume -r
+
: Resumes  the  most recent merge list that has been aborted due to an error.
+
 
+
; --jobs[=JOBS] -j [JOBS]
+
: Specifies the number of packages to build simultaneously.
+
 
+
; --load-average [LOAD]
+
: Specifies  that  no  new  builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number).
+
 
+
== Configuration ==
+
=== make.conf ===
+
Emerge can be configured with <code>/etc/portage/make.conf</code>
+
{{File
+
|/etc/portage/make.conf|<pre>
+
CFLAGS="-march=native -O2 -pipe"
+
CXXFLAGS="-march=native -O2 -pipe"
+
 
+
MAKEOPTS="-j2"
+
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 2"
+
INPUT_DEVICES="evdev synaptics"
+
VIDEO_CARDS="intel i965"
+
LINGUAS="en en_US en_GB"
+
ACCEPT_LICENSE="*"
+
 
+
USE="mmx mmxext sse sse2 sse3 ssse3 threads alsa X gtk xcb dri opengl vaapi udev \
+
    svg x264 xvid gstreamer webm vpx icu bash-completion vim-pager \
+
    -gnome -xscreensaver -cups -fortran -deprecated -iptables -ipv6 -geoloc \
+
    -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"
+
</pre>}}
+
 
+
=== package.use ===
+
Per-package use flags can be configured in <code>/etc/portage/package.use</code>:
+
 
+
 
+
<pre>
+
x11-wm/dwm savedconfig
+
x11-drivers/ati-drivers qt4
+
media-sound/ncmpcpp visualizer clock taglib
+
</pre>
+
 
+
=== package.accept_keywords ===
+
If you want to install a package that has not been tested on your architecture you need to edit <code>/etc/portage/package.accept_keywords</code>:
+
 
+
 
+
<pre>
+
=app-misc/screenfetch-9999 **
+
</pre>
+
 
+
== Other Resources ==
+
For more info see the emerge man page.
+
<console>
+
$##i## man emerge
+
</console>
+
 
+
[[Category:Portage]]
+
[[Category:HOWTO]]
+
[[Category:Tutorial]]
+
[[Category:System]]
+

Revision as of 18:53, February 28, 2015

New OpenGL management in Funtoo

Funtoo is switching to an improved system for managing multiple OpenGL providers (Mesa/Xorg, AMD and nVidia). The update may involve blockers and file collisions.

By Mgorny / February 28, 2015

New OpenGL management

System principles

The new OpenGL management design assumes that the reference OpenGL implementation (mesa/Xorg) is to be used to build packages. After switching to the new system, all packages will use the mesa/Xorg headers and link to the mesa/Xorg libraries. This improves portability of software built on Funtoo and solves some of the build failures when non-standard OpenGL provider was enabled.

The third-party OpenGL libraries and modules provided by proprietary driver vendors can be enabled for run-time program use. They will not affect how the program is built. However, they will be loaded by the dynamic loader when starting executables. The Xorg server will also load the modules provided by blob driver vendor if appropriate.

Implementation

The reference implementation (mesa/Xorg) packages install headers and libraries into standard system locations (/usr/include, /usr/lib*). The compiler and linker finds them using the usual rules and uses them.

The third-party OpenGL vendors install libraries and server extension modules into vendor-named subdirectories of /usr/lib*/opengl. Those files are not used directly.

Package:Eselect (OpenGL) is used to select OpenGL implementation used at run-time. The choice of implementation is controlled via dynamic linker configuration (ld.so.conf) and Xorg server configuration. If the reference implementation is selected, the eselect module outputs null configuration that causes the linker and server to use the standard paths. If an another implementation is selected, the configuration prepends /usr/lib*/opengl paths to linker and server configuration, causing them to prefer the third-party libraries over reference.

blog comments powered by Disqus