The joys of open source®©™ – bloat
The tarball I got for dnstracer-1.9, when picked apart, gives me the following file list:
size | file |
---|---|
38 | aclocal.m4 |
1 | autom4te.cache |
0 | autoscan.log |
7 | CHANGES |
76 | config.guess |
7 | config.h.in |
56 | config.sub |
288 | configure |
3 | configure.in |
2 | configure.scan |
1 | CONTACT |
24 | depcomp |
14 | dnstracer.8 |
86 | dnstracer.c |
6 | dnstracer.pod |
2 | dnstracer.spec |
3 | dnstracer_broken.h |
3 | FILES |
11 | getopt.c |
2 | getopt.h |
11 | install-sh |
3 | LICENSE |
1 | Makefile.am |
29 | Makefile.in |
18 | missing |
3 | mkinstalldirs |
1 | MSVC.BAT |
2 | README |
1 | stamp-h |
0 | stamp-h.in |
The majority of the files here are the lovecraftian horror that is GNU configure, which is used to detect/set WORDS_BIGENDIAN
and NOIPV6
!
This is nonsense. There’s a grand total of one thing here that would benefit from an autoconfigure program (WORDS_BIGENDIAN, because basically every low-level networking program out there uses hton?() and ntoh?() instead of hand-tweaking byte order, so there really wasn’t much call for actually knowing what the byte order was and as a result the macros defining byte order are named different things and located in different files on different unices) and one configuration tweak that, arguably, is easier to hand off to configure
to set.
Note, particularly, that Makefile.in
is 14,000 bytes long. 14,000 bytes long for a makefile that is used to compile a program consisting of one (the getopt()
here is for Windows, which apparently doesn’t have it) source module.
I looked at this last weekend (I wanted to compile dnstracer on a Centos 7 box), thought “this is bullshit”, and went on a configuration repair spree:
size | file |
---|---|
7 | CHANGES |
76 | configure.inc |
3 | configure.sh |
1 | CONTACT |
14 | dnstracer.8 |
87 | dnstracer.c |
6 | dnstracer.pod |
2 | dnstracer.spec |
3 | dnstracer_broken.h |
2 | FILES |
11 | getopt.c |
2 | getopt.h |
3 | LICENSE |
1 | Makefile.in |
1 | MSVC.BAT |
2 | README |
Note that 1) it’s 16 files, not 30 (4597 lines vs 12470 lines), that 2) dnstracer.c
(the file that’s being built) is the largest file in the heap, instead of one of the many GNU configure support files, and 3) Makefile.in
is 450 bytes instead 14,000.