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

Up the revolution! The rise of Red Hat

One of the IT industry's quiet successes of the last 20 years has been Red Hat (some stories say it was named for the red caps favoured by 18th and 19th century revolutionaries). In 2012 the vendor reported revenues of $1B+ for the first time and this has increased to $1.5B+ in its most recent full financial year (ending Feb 2014). 26% of Red Hat’s revenue is generated in Europe and more than 20% its 7,000 employees are based in the EU, including those at its Bruno-based development in the Czech Republic. Read more

Most Popular Linux Desktop Environment: GNOME Shell

Even after settling on a Linux distribution to use, you still have to decide on a desktop environment. There are tons to choose from, and last week we asked you for your favorites. Then we looked at the five best Linux desktop environments. Now we're back to highlight your favorite, 11,000 votes later. Read more

Mutual business crowdfunding for LibreOffice results in new features investment

Last Friday Wilhelm Tux, a Swiss community group, reached their €8,000 (CHF 10.000) crowdfunding target for LibreOffice. The money will be used to add support for digital signatures in PDF documents in a secure and compliant way. From announcement to completion took four days.Once implemented, Read more

ROSA Desktop Fresh R4 Review: Refreshing Mandriva based KDE spin

ROSA is a Russian company developing a variety of Linux-based solutions. Its flagship product, ROSA Desktop, is a Linux distribution featuring a highly customized KDE desktop and a number of modifications designed to enhance the user-friendliness of the working environment. The company also develops an "Enterprise Server" edition of ROSA which is based on Red Hat Enterprise Linux. On 9th October 2014, Ekaterina Lopukhova has announced the release of ROSA R4 "Desktop Fresh" edition, a desktop Linux distribution featuring a customized and user-friendly KDE 4.13.3 desktop: "The ROSA company is happy to present the long-awaited ROSA Desktop Fresh R4, the number 4 in the "R" lineup of the free ROSA distros with the KDE desktop as the main graphical environment. The distro presents a vast collection of games and emulators, as well as the Steam platform package along with standard suite of audio and video communications software, including the newest version of Skype. All modern video formats are supported. The distribution includes the fresh LibreOffice 4.3.1, the full TeX suite for true nerds, along with the best Linux desktop publishing, text editing and polygraphy WYSISYG software. The LAMP/C++/ development environments are waiting to be installed by true hackers." The present version is supported for 2 years. ROSA was previously based on Mandriva but now independent like many of the formerly Mandriva based distros, e.g. PCLinuxOS, Mageia, OpenMandriva Lx (based on ROSA), to name a few. Mandriva in turn was based on Red Hat Linux and a lot of programs which work for Fedora or OpenSUSE, worked on ROSA as well. Read more