Actually, the message "BINDINGS_GLOBAL_INSTALL: Install bindings to global python directory? (might need root)" shown at the bottom is not an error but a help message. So after supplying the include and library paths I could continue by pressing g in the ccmake wizard to start the generate task.
Here are the steps (customize the paths for your system!):
$ cd QGIS
$ mkdir build-master
$ cd build-master
$ ccmake ..
- In the wizard set
CMAKE_INSTALL_PREFIX to /home/user/bin/qgis. Make sure to append qgis here!
- In the wizard set
PYTHON_INCLUDE_PATH to /usr/include/python2.7. Should be already set.
- In the wizard set
PYTHON_LIBRARY to /usr/lib/x86_64-linux-gnu/libpython2.7.so.
- Press c
- Press g
$ make -j2 The number should correspond to the number of processors in your machine.
$ make install
- Add
export LD_LIBRARY_PATH=$HOME/bin/qgis/lib to your ~/.bashrc or ~/.zshrc and re-source the shell.
- Start QGIS from
~/bin/qgis/bin/qgis.