Page MenuHomePhabricator

Check for prerequisites and give meaningful hints for missing packages
Open, WishlistPublic

Description

For Ubuntu we have a quite extensive list of prerequisites/packages that we require to be installed but checking for them early in our build system is very... rudimentary. Currently we check for the dev packages of libxt and libtiff.

In contrast, here is our list of prerequisites from the documentation:

  • build-essential
  • doxygen
  • git
  • graphviz
  • libfreetype6-dev
  • libglu1-mesa-dev
  • libssl-dev
  • libtiff5-dev
  • libwrap0-dev
  • libxcomposite1
  • libxcursor1
  • libxdamage-dev
  • libxi-dev
  • libxkbcommon-x11-0
  • libxt-dev
  • mesa-common-dev

We should try to check for all of them but keep also in mind that some of them are optional. Instead of immediately stop processing we should check for everything and only then create a summary that is displayed together with an error message.

Event Timeline

kislinsk triaged this task as Wishlist priority.Jul 15 2022, 8:04 AM
kislinsk created this task.
NOTE: https://packages.ubuntu.com/ started to spit out a lot of Internal Server Errors. Will continue later with the table below...
PackageFind fileNotes
build-essentialMeta-package for C/C++ toolchain: dpkg-dev, g++, gcc, libc-dev, make. Already checked by CMake generator? Is it enough to recommend g++ and make?
doxygen/usr/bin/doxygenNot sure if optional?
git/usr/bin/git
graphviz/usr/bin/dotOptional, used by Doxygen
libfreetype6-dev/usr/include/freetype2/freetype/freetype.hShould be libfreetype-dev
libglu1-mesa-dev/usr/include/GL/glu.h
libssl-dev
libtiff5-devShould be libtiff-dev
libwrap0-devT27578: 2021.1 Linux installer does not work on Fedora
libxcomposite1
libxcursor1Should be libxcursor1-dev
libxdamage-dev
libxi-dev
libxkbcommon-x11-0
libxt-dev
mesa-common-dev

In Ubuntu 20.04+, system Qt can be used instead of the online installer, greatly reducing the hassle of creating a Qt account and so on:

  • qtbase5-dev
  • qtscript5-dev
  • libqt5svg5-dev
  • libqt5xmlpatterns5-dev
  • qtxmlpatterns5-dev-tools
  • qtwebengine5-dev
  • qttools5-dev
  • libqt5x11extras5-dev

I had a nice talk with @nolden about this topic and we concluded that dpkg is a good solution for checking for certain packages. The more I think about it, though, I think that we should stick at least partially to the file checking approach. The main reason is that we are not restricted to the Ubuntu package names or have to maintain additional alternatives. In particular, think of the OpenGL mess. Quite a few packages provide required header files and libraries, overriding each other. For example think of someone with proprietary nvidia dev packages who very likely does not want to be "forced" or wrongly advised to install overlapping mesa packages or similar.