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

University fuels NextCloud's improved monitoring

Encouraged by a potential customer - a large, German university - the German start-up company NextCloud has improved the resource monitoring capabilities of its eponymous cloud services solution, which it makes available as open source software. The improved monitoring should help users scale their implementation, decide how to balance work loads and alerting them to potential capacity issues. NextCloud’s monitoring capabilities can easily be combined with OpenNMS, an open source network monitoring and management solution. Read more

Linux Kernel Developers on 25 Years of Linux

One of the key accomplishments of Linux over the past 25 years has been the “professionalization” of open source. What started as a small passion project for creator Linus Torvalds in 1991, now runs most of modern society -- creating billions of dollars in economic value and bringing companies from diverse industries across the world to work on the technology together. Hundreds of companies employ thousands of developers to contribute code to the Linux kernel. It’s a common codebase that they have built diverse products and businesses on and that they therefore have a vested interest in maintaining and improving over the long term. The legacy of Linux, in other words, is a whole new way of doing business that’s based on collaboration, said Jim Zemlin, Executive Director of The Linux Foundation said this week in his keynote at LinuxCon in Toronto. Read more

Car manufacturers cooperate to build the car of the future

Automotive Grade Linux (AGL) is a project of the Linux Foundation dedicated to creating open source software solutions for the automobile industry. It also leverages the ten billion dollar investment in the Linux kernel. The work of the AGL project enables software developers to keep pace with the demands of customers and manufacturers in this rapidly changing space, while encouraging collaboration. Walt Miner is the community manager for Automotive Grade Linux, and he spoke at LinuxCon in Toronto recently on how Automotive Grade Linux is changing the way automotive manufacturers develop software. He worked for Motorola Automotive, Continental Automotive, and Montevista Automotive program, and saw lots of original equipment manufacturers (OEMs) like Ford, Honda, Jaguar Land Rover, Mazda, Mitsubishi, Nissan, Subaru and Toyota in action over the years. Read more

Torvalds at LinuxCon: The Highlights and the Lowlights

On Wednesday, when Linus Torvalds was interviewed as the opening keynote of the day at LinuxCon 2016, Linux was a day short of its 25th birthday. Interviewer Dirk Hohndel of VMware pointed out that in the famous announcement of the operating system posted by Torvalds 25 years earlier, he had said that the OS “wasn’t portable,” yet today it supports more hardware architectures than any other operating system. Torvalds also wrote, “it probably never will support anything other than AT-harddisks.” Read more