Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Remove glibc dependency, statically link binaries to musl #54

Closed
hannobraun opened this issue Mar 13, 2014 · 5 comments
Closed

Remove glibc dependency, statically link binaries to musl #54

hannobraun opened this issue Mar 13, 2014 · 5 comments

Comments

@hannobraun
Copy link
Owner

I'm currently having a problem with the production server:

/opt/vndf/vndf-game-service: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by /opt/vndf/vndf-game-service)

The problem here is, that some symbols in libc are used, that are only available in glibc 2.17.

Research shows, that the clock-related functions are to blame:

$ objdump -p output/bin/vndf-game-service
...
required from libc.so.6:
0x06969194 0x00 16 GLIBC_2.14
0x0d696913 0x00 14 GLIBC_2.3
0x0d696914 0x00 11 GLIBC_2.4
0x09691974 0x00 09 GLIBC_2.3.4
0x06969197 0x00 08 GLIBC_2.17
0x0d696917 0x00 07 GLIBC_2.7
0x09691972 0x00 05 GLIBC_2.3.2
0x09691a75 0x00 03 GLIBC_2.2.5

$ objdump -T output/bin/vndf-game-service | grep GLIBC_2.17
0000000000000000 DF UND 0000000000000000 GLIBC_2.17 clock_gettime
0000000000000000 DF UND 0000000000000000 GLIBC_2.17 clock_getres

Unfortunately, older versions of the symbols don't seem to be available:

$ objdump -T /lib/x86_64-linux-gnu/libc.so.6 | grep -w clock_gettime
000000000010f950 g DF .text 000000000000003b GLIBC_2.17 clock_gettime
$ objdump -T /lib/x86_64-linux-gnu/libc.so.6 | grep -w clock_getres
000000000010f8f0 g DF .text 0000000000000053 GLIBC_2.17 clock_getres

I'm attempting to solve this problem by just not referencing any clock-related functions for now. Of course, this isn't a good solution.

I see two good ways to solve this:

  • Practical: Build any binaries on their target platform. This requires better build infrastructure.
  • Ideal: Statically link libc, for example using musl (http://www.musl-libc.org/). I like this a lot, since it would solve any libc versioning problems once and for all. However, this might not be easy to do.
@hannobraun hannobraun added the bug label Mar 13, 2014
hannobraun added a commit that referenced this issue Mar 13, 2014
@hannobraun
Copy link
Owner Author

+1, see #61

@hannobraun hannobraun changed the title libc incompatibility Remove glibc dependency, statically link binaries to musl Apr 25, 2014
@hannobraun
Copy link
Owner Author

Changed the title of this issue from a problem description to a description of the solution. Removing bug tag, adding enhancement tag.

I think this should best be done by improving Rust directly. There's an existing issue for this that explicitly mentions musl: rust-lang/rust#7283

@hannobraun
Copy link
Owner Author

+1, due to #62

@hannobraun
Copy link
Owner Author

+1, failed to run the client on my mom's laptop due to glibc

@hannobraun
Copy link
Owner Author

Adding the priority tag. This absolutely must be solved before VNDF can see widespread use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant