Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T-242] Docker for alpine and centos binaries #24

Merged
merged 55 commits into from
Feb 9, 2020
Merged

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented Dec 13, 2019

This PR aims to create binaries for alpine and linux versions that use an older libc than the one we use in CI (apparently centos is a good target to build against as it's using a very old libc version... source: prebuild)

Using docker this PR virtualises centos and alpine using the docker images by the prebuild project.

Related #23 #18
Closes T-242

@mischnic
Copy link
Member

mischnic commented Dec 13, 2019

  • The alpine issue: Alpine uses musl, which is a reimplementation of glibc. It seems like the fts functions (which are part of glibc) aren't installed by default. They can be installed with apk add fts-dev (which should install the fts package as well?), which should hopefully fix the error.

  • The centos problem:
    64-bit support for fts was only added in glibc 2.23: https://abi-laboratory.pro/?view=changelog&l=glibc&v=2.23
    Not quite sure what we can/should do here

@DeMoorJasper
Copy link
Member Author

DeMoorJasper commented Dec 13, 2019

@mischnic awesome, thanks for the fast review.

Knew alpine ran musl didn't know you needed to install that package, appears to have fixed it. Thanks!

Read about centos only supporting 32bit fts, that's what I meant with superold. Didn't even know 32-bit was still a thing. Have no clue if it's possible to build 2 versions and just switch between 32 and 64 bit fts.

Screenshot 2019-12-13 at 22 00 06

@mischnic
Copy link
Member

mischnic commented Dec 13, 2019

prebuild might support fallback to 32bit, but having libraries with different architectures can cause problems on linux: if the 32bit watcher library links dynamically to glibc, then glibc needs to be installed in a 32bit variant as well (and Node at runtime needs to likely be 32 bit as well). I'm not sure how this works out on centos.

@mischnic
Copy link
Member

Another possibility: loading glibc via dlopen, so that we can handle a failure ourselves and fallback to the BruteForceBackend.

@DeMoorJasper
Copy link
Member Author

Isn't it used for the BruteForceBackend?

@DeMoorJasper DeMoorJasper changed the title Docker for alpine and older libc Docker for alpine and centos binaries Dec 14, 2019
@mischnic
Copy link
Member

What do you mean?

@DeMoorJasper
Copy link
Member Author

DeMoorJasper commented Dec 14, 2019

@mischnic I mean it's used for BruteForceBackend::readTree on unix based systems (mac and linux)

So we can't really fallback to BruteForceBackend as this is already used for the BruteForceBackend

@mischnic
Copy link
Member

Ah, you're right

@DeMoorJasper
Copy link
Member Author

DeMoorJasper commented Dec 14, 2019

Rewrote the readDirTree to support centos without needing fts

implementation runtime
fts 600ms
custom 700ms

@devongovett devongovett merged commit c2ff0cd into master Feb 9, 2020
@height
Copy link

height bot commented Feb 9, 2020

The task T-242 has been marked as "Done".

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

Successfully merging this pull request may close these issues.

3 participants