Skip to content

Working example for manual x86_64-unknown-linux-musl build with docker #826

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

Closed
moschroe opened this issue Sep 3, 2019 · 4 comments · Fixed by #1358
Closed

Working example for manual x86_64-unknown-linux-musl build with docker #826

moschroe opened this issue Sep 3, 2019 · 4 comments · Fixed by #1358
Labels
meta: good first issue Anything that is good for new contributors. type: enhancement A value-adding code change that enhances its existing functionality.

Comments

@moschroe
Copy link

moschroe commented Sep 3, 2019

I wanted to build vector for x86_64-unknown-linux-musl locally, using the builder image created using scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile.

I had to guess the invocation by reading .circleci/config.yml since I do not run circleci on my workstation, so this it what I came up with:
docker run --rm -ti -v "$(readlink -f .):/tmp/build" --user 0 --env 'VERSION=0.3.0' --env RUST_LTO=lto --env 'TARGET=x86_64-unknown-linux-musl' --workdir /tmp/build builder-x86_64-unknown-linux-musl:latest make build-archive
That seems to have worked, the build succeeded.

setup/installation/manual/from-source says this:

You can view an example of this in the musl builder Docker image.

I think it would be good to have the above documented or at least referenced at that place.

@LucioFranco LucioFranco added domain: docs meta: good first issue Anything that is good for new contributors. type: enhancement A value-adding code change that enhances its existing functionality. labels Sep 4, 2019
@LucioFranco
Copy link
Contributor

I think that would be a good idea to document! I think it could go in some advanced build section.

@ghost
Copy link

ghost commented Oct 16, 2019

This can be done after #946 to not force users to build the toolchain locally.

@ghost
Copy link

ghost commented Nov 25, 2019

After #1247 is merged, It would possible to build the current master branch locally just by running

PASS_FEATURES="jemallocator rdkafka rdkafka/cmake_build leveldb leveldb/leveldb-sys-3 shiplift/unix-socket openssl/vendored" ./scripts/docker-run.sh builder-x86_64-unknown-linux-musl make build

The caveat is that the process would take around 2 hours on a 4-core machine because of the need to build LLVM.

@ghost
Copy link

ghost commented Dec 6, 2019

After #1320 is done, the approach from the comment above can even lose its downside of the slow compilation times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: good first issue Anything that is good for new contributors. type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants