Language Selection

English French German Italian Portuguese Spanish

One more reason not to trust CMake

Filed under
Software

So everybody says that CMake is great because it’s faster. Of course CMake achieves speed with an approach different from the one autotools have, that is, they don’t discover features, they apply knowledge. Hey it’s a valid method as any other, if you actually know what you are doing, and if you can keep up with variants and all the rest. Another thing that it does is to avoid the re-linking during the install phase.

Let me try to explain why re-linking exists: when you build a project using libtool, there might be binaries (executables and/or libraries) that depend on shared libraries that are being built in the same source tree. When you run the executables from the source tree, you want them to be used. When you install, as you might be installing just a subtree of the original software, libtool tries to guess if you just installed the library or not (often making mistakes) and if not, it re-links the target, that is, recreates it from scratch to link to the system library. In the case of packages built by ebuild, by the use of DESTDIR, we almost always have the relinking stage in there. Given that GNU ld is slow (and IMHO should be improved, rather than replaced by gold, but that’s material for another post), it’s a very wasteful process indeed, and libtool should be fixed not to perform that stage every time.

One of the things that the relinking stage is supposed to take care is to replace the rpath entries. An rpath entry specify to the runtime linker (ld.so) where to find the dependent libraries outside of the usual library paths (that is /etc/ld.so.conf and LD_LIBRARY_PATH). It’s used for non-standard install directories (for instance for internal libraries that should never be linked against) or during the in-tree execution of software, so that the just-built libraries are preferred over the ones in the system already.

So to make the install phase faster in CMake, they decided, with 2.6 series, to avoid the relinking, by messing with the rpath entries directly. It would be all fine and nice if they did it correctly of course.

MOre Here




More in Tux Machines

today's leftovers

Software: VirtualBox, Franz, ClipGrab, Gammu, AppArmor, Xfce4, GTK+

  • Oracle Releases VM VirtualBox 5.2
    It was more than one year ago that VirtualBox 5.1 was released while today it's finally been succeeded by a new feature release.
  • Franz Combines all Your Messaging Apps in a Single Application
    Franz is a free to use application that combines different messaging services like WhatsApp, WeChat, Facebook Messenger, Gmail, Telegram, Skype, Slack and other chat applications in one application.
  • ClipGrab: Video Downloader and Converter Updated for Ubuntu/Linux Mint (PPA)
    ClipGrab is a free software to download and convert videos from different famous sites of Internet. You can easily save your favorite videos from sites like Dailymotion or Vimeo. And you can convert these videos into "usable" formats like WMV, MPEG or MP3. You can check here which sites are supported by this software.
  • Gammu 1.38.5
    Today, Gammu 1.38.5 has been released. After long period of bugfix only releases, this comes with several new noteworthy features.
  • Watch Out Upgrading To Linux 4.14 If You Use AppArmor
    Just a quick public service announcement if you rely upon AppArmor for security on your Linux distribution like Ubuntu/Debian and plan to soon upgrade to the Linux 4.14 kernel...
  • New hotness: xfce4-notifyd 0.4.0
    After quite some development time I have decided to push out xfce4-notifyd 0.4.0 today. This is not just a bugfix, but a feature-packed release.
  • Xfce Gets Notification Improvements With xfce4-notifyd 0.4
    For users of the Xfce4 desktop environment, a new release of xfce4-notifyd 0.4 is now available as the project's newest feature release.
  • GTK+ 3.92 Released With Many Improvements & New Features
    Matthias Clasen has today released GTK+ 3.92 as the latest test release in the long road towards the major GTK4 tool-kit update. GTK+ 3.92 features Vulkan improvements, more widget reworking, continued Emoji support, and more. Highlights of changes found in this GTK+ 3.92 update include:
  • SteelCloud Expands Linux STIG Support to Ubuntu, SUSE, and Oracle Linux
    SteelCloud LLC announced today that it has enhanced ConfigOS, its patented STIG remediation software, to support the newly released Ubuntu, SUSE, and Oracle Linux STIGs. These new supported platforms bolster the product's existing Red Hat Linux automated STIG remediation capabilities. The expanded ConfigOS Linux security content will be provided to new and existing customers at no additional charge.

today's howtos

Linux and Graphics: AMD and AGL