Static Builds Useful?


#1

I am considering putting together a handful of static builds for popular platforms build daily and hosted here – is that something people would be interested in?


#2

I considered static builds to work around the problem of debian shipping a castrated ncurses that doesn’t support mouse wheel up (3 years after ncurses6 was released, unbelievable), but as far as I remember it didn’t work out because ncurses has runtime dependencies or something.

Considering that ncurses is the only “real” dependency, I think it’s not as useful as with some other applications.

There is also the problem that you really want the bundled scripts too, so the best solution would be to lobby distros to package kakoune.


#3

I considered static builds to work around the problem of debian shipping a castrated ncurses that doesn’t support mouse wheel up

The whole ncurses gpm thing is a mess indeed, on Debian and Debian derivatives… additionally it can be annoying to get it building on older distros, which is exactly what bites me sometimes when support clients. Landing on Ubuntu 12.04 or 14.04 isn’t that unusual… even with 12.04 being EOL like last year.

There is also the problem that you really want the bundled scripts too, so the best solution would be to lobby distros to package kakoune.

True about the bundled scripts. I think Kakoune is still moving quick enough getting packagers to support it is tough. But as I am writing this comment, I wonder how much headway we could make with just a snap and a flatpak… Snaps work back to 14.04 Ubuntu at this point.


#4

Kakoune only cares about the relative path from binary to resource files, so it will run happily from a tar.gz expanded anywhere.

AFAIK, the main problem with static linking is that glibc way to get the user name is not compatible with static linking, and warns that it will only work if it can find libresolv.so or something like that.


#5

I assumed static builds would not be useful, until I tried to build Kakoune on a machine with 500MB of RAM.

Heck, since the only dependencies are ncurses and glibc, both of which have pretty solid ABI guarantees, even dynamically-linked builds would be useful. CentOS 7 only has ncurses 5.9, so a Kakoune built on a CentOS VM wouldn’t have mouse-wheel-up support, but for a lot of uses that’d be better than no Kakoune at all.

It might be useful to have a ‘portable’ makefile target that creates a temporary directory, installs Kakoune into it with “make install”, and tars it up.


#6

make PREFIX="" DESTDIR=/tmp/kakoune/ install should do the trick. tar that directory and you will have something that should work everywhere, regardless of the path it gets untared in.