At Thu, 2 Apr 2020 06:28:00 -0700 (PDT), Tristram Oaten wrote:
> I've compiled it on ubuntu 19:10, and am running into this problem on
> ubuntu:latest (18.04), due to the different versions of libc.
Ah, I didn't realize that the C library version had changed in recent
Linux distributions. (It had been the same for several years.) That's a
pain.
The distributions at
https://download.racket-lang.org/ are built with
an old enough Linux distribution to be portable in practice. So, using
that build is one option.
Currently, I guess you're building your own Racket executable on Ubuntu
19.10. That's the point where you can elect to statically link:
- If you're building from the source distribution, add
LDFLAGS=--static
to your `configure` line.
- If you're building from a Git repo checkout, add
CONFIGIRE_ARGS_qq="LDFLAGS=--static"
to your `make` line. In an existing tree, you'll need to
delete "racket/src/build" to ensure that it's rebuilt.
Make sure the "libffi-dev" package is installed, because the makefiles
for the bundled libffi do not like `--static`.
I'm not sure how well statically linking to the C library will work. I
get several linker warnings like this one:
warning: Using 'getgrgid' in statically linked applications requires
at runtime the shared libraries from the glibc version used for linking
For this reason and others, I'm surprised that other language
implementations statically link to the C library, but it's difficult to
keep track.