Commit Graph

11 Commits

Author SHA1 Message Date
Francesco Mazzoli
9c477ffa40 Make RocksDB patching idempotent 2024-01-30 11:37:52 +00:00
Miroslav Crnic
1d6ac9f648 cmake: add patch -N back 2024-01-29 17:25:07 +00:00
Francesco Mazzoli
9cf2931bc7 We do want the default patch behavior, not the -N one 2024-01-29 16:02:26 +00:00
Francesco Mazzoli
1145ea10a3 Put patch in alpine docker build image 2024-01-29 14:43:36 +00:00
Francesco Mazzoli
2a6feb6df5 Patch RocksDB to make it compile with clang 15. 2024-01-29 14:15:29 +00:00
Francesco Mazzoli
e48bb98f73 Remove outdated comment
We now include all dependencies which are needed beyond basic build tools
2023-11-28 21:45:40 +00:00
Francesco Mazzoli
2ad278adaa Add ubuntu image to build, use jemalloc in release build
I want to use the introspection capabilities of jemalloc, and it
should also be much faster. Preserve alpine build for go build,
it's also really useful to test inside the kmod.
2023-11-13 15:44:55 +00:00
Francesco Mazzoli
688059fd60 Vendor in everything
The go deps are vendored as source files, the C++ deps are vendored
as artifactory tarballs rather than internet tarballs.

Good practice, but the immediate motivation was to allow Saulius
to build stuff in Iceland.
2023-04-11 15:13:01 +00:00
Francesco Mazzoli
4243ff71e2 Assorted fixes 2023-02-01 12:00:44 +00:00
Francesco Mazzoli
85889266b1 Various housekeeping while I get ready to deploy...
...most notably we now produce fully static binaries in an alpine
image.

A few assorted thoughts:

* I really like static binaries, ideally I'd like to run EggsFS
    deployments with just systemd scripts and a few binaries.

* Go already does this, which is great.

* C++ does not, which is less great.

* Linking statically against `glibc` works, but is unsupported.
    Not only stuff like NSS (which `gethostbyname` requires)
    straight up does not work, unless you build `glibc` with
    unsupported and currently apparently broken flags
    (`--enable-static-nss`), but also other stuff is subtly
    broken (I couldn't remember exactly what was broken,
    but see comments such as
    <https://github.com/haskell/haskell-language-server/issues/2431#issuecomment-985880838>).

* So we're left with alternative libcs -- the most popular being
    musl.

* The simplest way to build a C++ application using musl is to just
    build on a system where musl is already the default libc -- such
    as alpine linux.

The backtrace support is in a bit of a bad state. Exception stacktraces
work on musl, but DWARF seems to be broken on the normal release build.

Moreover, libunwind doesn't play well with musl's signal handler:
<https://maskray.me/blog/2022-04-10-unwinding-through-signal-handler>.

Keeping it working seems to be a bit of a chore, and I'm going to revisit
it later.

In the meantime, gdb stack traces do work fine.
2023-01-29 21:41:40 +00:00
Francesco Mazzoli
9adca070ba Convert build system to cmake
Also, produce fully static binaries. This means that `gethostname`
does not work (doesn't work with static glibc unless you build it
with `--enable-static-nss`, which no distro builds glibc with).
2023-01-26 23:20:58 +00:00