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

Kdenlive 17.12.0 released

We are happy to announce the latest Kdenlive version, part of the KDE Applications 17.12 release, making it the last major release using the current code base. This is a maintenance release focused on stability, while feature development is going in next year’s 18.04 version. Proxy clips were given some attention and should give you better seeking experience as well as reduced memory usage for images. Other fixes include fixes in timeline preview, a crash when using a Library clip and smoother seeking on rewind playback. Read more

Systemd 236 Brings Support For LUKS2 Encrypted Partitions, New Options

Lennart Poettering has announced the release of systemd 236 as the init system's final release of 2017. Systemd 236 is another significant feature release and includes support for the LUKS2 on-disk format for encrypted partitions, bootctl list can now list all available boot menu options, improved cgroup option, various systemd-networkd networking improvements, support for setting the initial keyboard mapping systemd-firstboot, several new systemd-resolve command line arguments, and other minor improvements throughout the systemd landscape. Read more

Red Hat: 5 focal points for Kubernetes

Linux runs the containers and manages resources and security. The container runtime manages host-level instantiation and resource assignment (for example Docker or CRI-O). IT departments can use Kubernetes to: Read more

10 Best Linux Business Apps

There’s no question that the Linux desktop can be a highly effective workhorse. Note, as proof of this, the greater coverage in the media of the best business apps for Linux. Keep reading for the best Linux business apps – and please add your own favorite in the Comments section below. Read more