I've read about how source-based linux distros like Gentoo can have considerable performance increases when compared to pre-built distros like Ubuntu because they install from source with optimizations for your particular system. Is is possible to build Ubuntu from source to get the same kind of benefit?
Build All Installed Packages from Sources – How to
compiling
Related Solutions
I got this working with some help from the developer. First, the dev said that my version of ffmpeg was fine. He also clarified that if the output of simple-build-and-install
includes 'Configuring 32-bit GLInject library' (i.e., if you manage to get to that point in the build process) it means that the 64-bit build portion is OK. That means the solution is to use his symlink workaround.
Below are my exact steps.
Note that I skipped one step recommended by the developer. I skipped it because the target link already existed and I wanted to try it without changing that link. (It worked.)
sudo apt-get install build-essential pkg-config qt4-qmake libqt4-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libasound2-dev libpulse-dev libgl1-mesa-dev libx11-dev libxext-dev libxfixes-dev g++-multilib ia32-libs
cd /workspaces/ (or any path you choose - see note below)
git clone https://github.com/MaartenBaert/ssr.git (in my case the project path is /workspaces/ssr/)
sudo mkdir /usr/lib32/fglrx/
cd /usr/lib/i386-linux-gnu/
sudo ln -s libGL.so.1 /usr/lib32/fglrx/libGL.so # only for proprietary AMD drivers!
# SKIP: sudo ln -s fglrx/libGL.so /usr/lib32/libGL.so # only for proprietary AMD drivers!
sudo ln -s libGLU.so.1 libGLU.so
sudo ln -s libX11.so.6 libX11.so
sudo ln -s libXext.so.6 libXext.so
sudo ln -s libXfixes.so.3 libXfixes.so
sudo ldconfig
cd /path/to/ssr (will be the ssr directory under `/workspaces/` in my example)
$ ./simple-build-and-install
The final result:
Running post-install script ...
Done.
So I ran it and it didn't crash! :-) That was the first big change.
Then I tested it. I used all default settings. And the recorded screencast looked and sounded really good!!! I'm extremely pleased. The software is easy to use and it works great.
Firstly, if you don't want to build from source they provide binaries already built for Ubuntu 18.04:
Instructions for building are available from:
This specifies that you can build LLVM 7 and don't need to install LLVM 8 to build for Ubuntu Bionic (18.04)
Building should be as simple as:
sudo apt install packaging-dev python3 ninja-build
# Run from inside the clone of the repository
mkdir -p build/src
./get_package.py PACKAGE_TYPE_HERE build/src/debian
cd build/src
# Use dpkg-checkbuilddeps (from dpkg-dev) or mk-build-deps (from devscripts) to check for additional packages.
# If necessary, change the dependencies in debian/control to accommodate your environment.
# If necessary, modify AR, NM, CC, and CXX variables in debian/rules
debian/rules setup-local-src
dpkg-buildpackage -b -uc
Best Answer
Is is possible to build Ubuntu from source to get the same kind of benefit?
I am not sure about the benefits if you have fairly new hardware components but for the "Ubuntu from source" part of the question the answer is YES, you can build not only your favorite applications from source, but the entire operating system.
Here is how:
You need to install apt-build. Its a comandline tool like apt-get, but instead of downloading and installing the binary package, apt-build downloads the source code of the package, compiles it and then installs it to your system.
After you install it with
you will be asked for an optimization level (medium is ok), whether you want to create an apt-build repo for APT (Yes) and a question about processor architecture (my intel i7 is considered core2 ). Of course all options can be reconfigured in this way:
The above command offers two additional options for the gcc compiler and make builder. Their descriptions can be found in system manuals: man gcc and man make.
For a manual and available command options check
But the most useful are:
For example:
Lets say you want to compile/install Gedit. Instead of apt-get install you just do
Apt-build makes use of deb-src entries contained in the /etc/apt/sources.list file so the compilation and installation processes are fully automatic (similar to emerge found in Gentoo). Apt-build downloads sources of the main application and its dependencies, compiles them, creates a deb package, and finally installs the package.
Some notes about apt-build world.
In my opinion don't attempt it, unless you have 24 or more hours available !
If so first thing you should, remove/disable/uninstall any third party applications (it better to do in a fresh install of Ubuntu) and then do :
The above command will copy your full list of system packages to apt-build.list so that they can be compiled from source. Open that file
and remove any GCC/G++ entry
Then you can do :
I suggest to add two options — --yes and --force-yes — to make the rebuilding process fully automatic.