Binary Configuration

Journal started Nov 8, 2005


Okay, you know autotools? Autoconf? ./configure --help? I hate those. I really, really hate those. Every time I see my computer duitifully checking just in case the maximum command line argument length changed from 32768, I want to grind bones into dust with my teeth. So here's the first in a few entries giving some insight as to why autoconf/automake/configure/etc are such a bad idea. Today's lesson is late linking.

You could go over to my linking speed test and see what the difference is between strategies of linking and compilation. As verbose as it is, libtool is probably the most cross platform method, whereas the simplest is linking just statically. The graph shows some of the trends for the various tests, but it doesn't have much conclusive difference to it. To summarize, you won't lose any appreciable speed from linking dynamically. You might lose around 0.1 seconds once if you use libtool.

I think it's important to develop methods and tools of configuring our programs after execution. These 'libc.so.5 not found' errors are just unacceptable. The need to recompile just to enable ssl support, or png image manipulation, that just won't do. One nice thing though, is every POSIX system is likely to have a linker on site, good old ld.so. You can use that linker during your installation process to link your executable from binary modules, and omit modules where the system is lacking dependancies you can live without. It might be a bad idea to assume the existence of an "ld.so" program, but it sure isn't any worse than assuming the existence of a "java" program or a "tcl" program. Windows users will just have to switch to a more functional operating system if they can't be bothered with cygwin.

This notion of late linking modules really does kinda make sense, with what I've been studying about Gentoo Linux. It uses flags to enable, or disable autotools configure options, and corresponding dependencies for those options. But those flags could in almost all cases be replaced with modules that are or are not linked depending on what exists in the system. Of course the programs hobbling on autotools would have to be rewritten, but I can't see any reason to depend on compile-time configuration when starting a project anew.


Comment
Index
Previous (Inspiration on Clothing and Style)
Next (Multi-user alsa configuration)

(cc) some rights reserved