tailhook / vagga

Vagga is a containerization tool without daemons
http://vagga.readthedocs.org
MIT License
1.86k stars 96 forks source link

On Ubuntu 18.04 make vagga fails with error `x86_64-unknown-linux-musl` target may not be installed` #492

Closed bieli closed 6 years ago

bieli commented 6 years ago

I need vagga app. on my Ubutu 18.04 desktop (DELL Intel machine): $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Bionic Beaver (development branch) Release: 18.04 Codename: bionic

$ uname -a Linux machinename 4.15.0-13-generic #14-Ubuntu SMP Sat Mar 17 13:44:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

After I checkout vagga source code and try cmd: "make vagga" I got error like this:

   Compiling quick-error v1.2.1
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-linux-musl` target may not be installed`

It's possible to make, when I change Makefile like this:

git diff
diff --git a/Makefile b/Makefile
index 21923d7..ee14407 100644
--- a/Makefile
+++ b/Makefile
@@ -18,12 +18,12 @@ with-docker: downloads
 release: downloads vagga-release

 vagga:
-       cargo build --target=x86_64-unknown-linux-musl
-       cp --remove-destination target/x86_64-unknown-linux-musl/debug/vagga .
+       cargo build --target=x86_64-unknown-linux-gnu
+       cp --remove-destination target/x86_64-unknown-linux-gnu/debug/vagga .

 vagga-release:
-       cargo build --target=x86_64-unknown-linux-musl --release
-       cp --remove-destination target/x86_64-unknown-linux-musl/release/vagga .
+       cargo build --target=x86_64-unknown-linux-gnu --release
+       cp --remove-destination target/x86_64-unknown-linux-gnu/release/vagga .

 downloads: apk busybox alpine-keys.apk
tailhook commented 6 years ago

Hi,

If you don't want to build vagga by vagga : vagga make, you need to install musl stdlib. From the top of my head it's:

rustup target add x86_64-unknown-linux-musl

You may also need installing musl-tools and these packages setting some environment like this

tailhook commented 6 years ago

building it with gnu libc makes vagga unrunnable because glibc needs some shared libraries, and vagga often runs itself in a container where shared libraries from your host system aren't available.

tailhook commented 6 years ago

Doesn't look like anything actionable left here.