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

Support Alpine Linux #562

Open
springmeyer opened this issue Feb 24, 2018 · 2 comments
Open

Support Alpine Linux #562

springmeyer opened this issue Feb 24, 2018 · 2 comments

Comments

@springmeyer
Copy link
Contributor

springmeyer commented Feb 24, 2018

Mason currently supports most linux systems (like ubuntu, debian, amazon linux, rhel, centos, fedora) and the binaries mason produces run across all those systems. This is possible because:

  • the C and C++ standard libraries on these systems support symbol versioning
  • all these linux distros default to the same C and C++ standard libraries
  • We statically link all other deps into the binaries

Alpine Linux is a different story since alpine uses musl for the C standard library rather than glibc. So to support Alpine linux we'll need to:

  • have a new linux variant that is linux-musl
  • we'll need to detect this platform automatically
  • we'll need to create a dockerfile using alpine to do the binary builds for publishing
  • we'll need to add this custom dockerfile to CI
  • we'll need to build binaries for lots of mason packages

This is a large lift, but one that may be worthwhile because:

  • musl is a great, small, well supported C standard library
  • alpine linux is popular among docker users since small images are made with it
@springmeyer
Copy link
Contributor Author

This work is still outstanding and would be a useful project. I don't have time to work on it but I did get the mason bash scripts running on alpine recently. f6ab273 and c7ea656 were enough to be able to run ./mason install <package> <version> on alpine. The resulting binary was broken still (of course) but at least the bash worked to try to install it.

@springmeyer
Copy link
Contributor Author

A potential Dockerfile could look like:

FROM alpine:3.8 AS build

ENV CXX=clang++ CC=clang
RUN apk add --no-cache bash ca-certificates curl libstdc++ clang build-base

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

No branches or pull requests

1 participant