BuildInstructions

Building Oxide

Oxide uses cmake, although the core library, renderer and setuid sandbox are built with Chromium's build system (gyp + ninja). You don't directly interact with Chromium's build system when building Oxide.

System requirements

Operating system

Currently Oxide has only been tested on Ubuntu, although it should work on other Linux distributions as well. As Chromium is cross-platform, there is no reason why Oxide could not build and work on non-Linux platforms too with some modifications. Whilst it's not a priority for us to make Oxide work on non-Ubuntu systems, we will happily welcome contributions to enable support for other platforms.

Memory space

Oxide embeds Chromium, which means it's big and requires a lot of memory to build - particularly during linking. You will need at least 8GB of RAM for a normal build.

Disk space

The initial checkout requires around 13GB of disk space, and up to 25GB more disk space during the build.

CPU architecture

You will need a 64-bit CPU, operating system and toolchain to compile Oxide.

Building Chromium with a 32-bit toolchain has been unsupported for some time, as the linker exhausts the virtual address space. If you attempt to build Oxide with a 32-bit toolchain, we do take some steps to reduce the amount of memory required by the linker (such as compiling the Blink components without debugging symbols). However, your mileage may vary and you may still struggle to complete a build successfully.

See also LinuxBuildInstructionsPrerequisites

Build prerequisites

The following packages are required to build Oxide on Ubuntu:

  • cmake
  • gettext
  • qt5-qmake
  • qtchooser
  • qtbase5-dev
  • qtbase5-dev-tools
  • qtdeclarative5-dev
  • qtbase5-private-dev
  • qtdeclarative5-private-dev
  • qtpositioning5-dev
  • qtfeedback5-dev
  • make
  • ninja-build
  • python
  • g++
  • pkg-config
  • libglib2.0-dev
  • libgtk2.0-dev (not used, but gclient complains when checking out if you don't have it)
  • libgconf2-dev (not used, but gclient complains when checking out if you don't have it)
  • libcups2-dev (shouldn't be required - investigate)
  • libexif-dev (investigate why this is needed)
  • libgnome-keyring-dev (not used, but gclient complains when checking out if you don't have it)
  • libnss3-dev
  • libpci-dev
  • libgcrypt-dev
  • libdbus-1-dev
  • libudev-dev
  • libpulse-dev
  • libasound2-dev
  • libx11-dev (required because we add glx support)
  • libxi-dev (required because we add glx support)
  • libcap-dev
  • libfontconfig1-dev
  • libfreetype6-dev
  • libpango1.0-dev
  • libxext-dev (required because we add glx support)
  • libxcomposite-dev (required because we add glx support)
  • libxrender-dev (seems to be linked from webrtc)
  • libxcursor-dev (required unconditionally on linux - seems unused)
  • libxrandr-dev (required unconditionally on linux - seems unused)
  • libxtst-dev (required unconditionally on linux - seems unused)
  • libxdamage-dev (required unconditionally on linux - seems unused)
  • libxfixes-dev (required unconditionally on linux - seems unused)
  • libkrb5-dev
  • libssl-dev
  • libgdk-pixbuf2.0-dev
  • libnotify-dev
  • libffi-dev
  • libandroid-properties-dev
  • libhybris-dev
  • python-psutil
  • gperf
  • bison
  • git
  • subversion

To install these, you can just run:

sudo apt-get install cmake gettext qt5-qmake qtchooser qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev qtbase5-private-dev qtdeclarative5-private-dev qtpositioning5-dev qtfeedback5-dev make ninja-build python g++ pkg-config libglib2.0-dev libgtk2.0-dev libgconf2-dev libcups2-dev libexif-dev libgnome-keyring-dev libnss3-dev libpci-dev libgcrypt-dev libdbus-1-dev libudev-dev libpulse-dev libasound2-dev libx11-dev libxi-dev libcap-dev libfontconfig1-dev libfreetype6-dev libpango1.0-dev libxext-dev libxcomposite-dev libxrender-dev libxcursor-dev libxrandr-dev libxtst-dev libxdamage-dev libxfixes-dev libkrb5-dev libssl-dev libgdk-pixbuf2.0-dev libnotify-dev libffi-dev libandroid-properties-dev libhybris-dev python-psutil gperf bison git subversion

See also LinuxBuildInstructionsPrerequisites

Getting the code

Instructions for checking out the code can be found here.

Building

To build, run the following from the checkout directory:

mkdir src/objdir && cd src/objdir && cmake ../ && make

A separate build directory is required for building Oxide - you can call this whatever you like, but the top-level .gitignore will ignore any directory that begins with "objdir".

Build options

Compile time options are passed to cmake using the "-D" option (eg, -DENABLE_TESTS=1). Some notable compile time options are:

  • CMAKE_BUILD_TYPE:
    • Release: Disable debug code paths and run-time assertions, and disable debug symbols
    • Debug: Enable debug code paths and run-time assertions, and enable debug symbols. Note that debug builds are quite a lot slower than release builds
    • RelWithDebinfo: Disable debug code paths and run-time assertions, but enable debug symbols

  • ENABLE_TESTS:
    • 0: (Default) Disable unit tests
    • 1: Enable unit tests
  • ENABLE_OXIDEQMLSCENE:
    • 0: (Default with Qt >= 5.3.0) Don't build oxideqmlscene binary

    • 1: (Default with Qt < 5.3.0) Build oxideqmlscene, which provides similar functionality to qmlscene with the addition that it allows compositing to work. This option is redundant with Qt 5.3 and doesn't work at all in Qt 5.4

  • ENABLE_PLUGINS:
    • 0: Disable support for PPAPI plugins
    • 1: (Default) Build support for PPAPI plugins. Only the Pepper Flash plugin is supported at present
  • ENABLE_PROPRIETARY_CODECS:
    • 0: (Default) Don't build proprietary codecs
    • 1: Build support for MP3, H264 and AAC codecs
  • ENABLE_TCMALLOC:
    • 0: Use the system malloc implementation in child processes
    • 1: (Default) Use TCMalloc in child processes instead of the system malloc implementation
  • USE_SYSTEM_PROTOBUF:
    • 0: (Default) Use the bundled protobuf
    • 1: Use the system protobuf. This may be necessary in component builds if the in-tree version of protobuf is different to the system version, and embedding applications depends on protobuf (eg, via libmirclient). This shouldn't be needed if you're not building with ENABLE_COMPONENT_BUILD=1.
  • ENABLE_HYBRIS:
    • 0: Don't enable code that depends on libhyris. This removes the dependency on libandroid-properties-dev.
    • 1: (Default) Enable code that depends on libhybris. Oxide uses the android-properties component for detecting if the system is based on Android and retrieving some device properties for GPU blacklisting.
  • ENABLE_HYBRIS_CAMERA:
    • 0: (Default) Don't enable camera support via the libhybris compatibility layer
    • 1: Enable camera support via the libhybris compatibility layer. Note that this only works with libhybris in Ubuntu, and depends on libhybris-dev.
  • ENABLE_COMPONENT_BUILD:
    • 0: (Default) Disable component build. All components of the core library are statically linked.
    • 1: Enable component build. All components of the core library are built as shared objects. This reduces the amount of RAM required to link, and may also be useful when testing unstripped builds on devices where it is not possible to open files greater than 2GB.

Running test cases

You will need to build Oxide with "ENABLE_TESTS=1" in order to run unit tests.

Running unit tests also requires the following additional dependencies:

  • qtdeclarative5-qtquick2-plugin
  • qtdeclarative5-test-plugin
  • python-yaml

sudo apt-get install qtdeclarative5-qtquick2-plugin qtdeclarative5-test-plugin python-yaml

To execute unit tests, please run the following from the build directory:

make test

Oxide/BuildInstructions (last edited 2016-10-04 18:03:20 by chrisccoulson)