casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
21.42k stars 476 forks source link

Just doesn't work on Alpine (Error relocating /usr/local/lib/libgcc_s.so.1) #1937

Closed ghost closed 8 months ago

ghost commented 8 months ago

https://github.com/dprkh/ushrt/tree/4b7735b4938443e9f15d7d2831b2237b3aadaa3e

> sudo docker run --rm 1c5a070bd160d875b1f9fafe6c3335d821b588311d88c1af33477041581394ff
Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
Error relocating /usr/local/lib/libgcc_s.so.1: __cpu_model: symbol not found
casey commented 8 months ago

Interesting! I'm pretty slammed, so I probably won't get to this for a bit, but the next step would probably be to track down which dependency wants this symbol, and see if we can remove it.

ghost commented 8 months ago

It appears to be working when compiled from the latest source (36bd375eab32c579f6c1a2eed3d7c2a2dd7b2cdc).

https://github.com/dprkh/ushrt/tree/57fd4228888f3aee02c24291729cc0689b6818bf

casey commented 8 months ago

Huh, that's weird. I guess we can close this, since it's working. Rather odd though.

casey commented 8 months ago

I'll cut a release so that prebuilt binaries are available.

casey commented 8 months ago

Done!

ghost commented 8 months ago

Upon further investigation it appears the version of Just that I received from apk was 1.16, and it doesn't seem like much has changed dependency-wise.

diff --git a/Cargo.toml b/Cargo.toml
index f636509..ad7c8ac 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "just"
-version = "1.16.0"
+version = "1.25.0"
 authors = ["Casey Rodarmor <casey@rodarmor.com>"]
 autotests = false
 categories = ["command-line-utilities", "development-tools"]
@@ -20,13 +20,15 @@ members = [".", "bin/ref-type", "bin/generate-book", "bin/update-contributors"]
 [dependencies]
 ansi_term = "0.12.0"
 atty = "0.2.0"
+blake3 = { version = "1.5.0", features = ["rayon", "mmap"] }
 camino = "1.0.4"
 clap = { version = "2.33.0", features = ["wrap_help"] }
 ctrlc = { version = "3.1.1", features = ["termination"] }
 derivative = "2.0.0"
+dirs = "5.0.1"
 dotenvy = "0.15"
 edit-distance = "2.0.0"
-env_logger = "0.10.0"
+env_logger = "0.11.0"
 heck = "0.4.0"
 lexiclean = "0.0.1"
 libc = "0.2.0"
@@ -38,8 +40,8 @@ serde = { version = "1.0.130", features = ["derive", "rc"] }
 serde_json = "1.0.68"
 sha2 = "0.10"
 similar = { version = "2.1.0", features = ["unicode"] }
-snafu = "0.7.0"
-strum = { version = "0.25.0", features = ["derive"] }
+snafu = "0.8.0"
+strum = { version = "0.26.0", features = ["derive"] }
 target = "2.0.0"
 tempfile = "3.0.0"
 typed-arena = "2.0.1"
@@ -51,7 +53,7 @@ cradle = "0.2.0"
 executable-path = "1.0.0"
 pretty_assertions = "1.0.0"
 temptree = "0.2.0"
-which = "5.0.0"
+which = "6.0.0"
 yaml-rust = "0.4.5"

 [lib]
@@ -77,6 +79,7 @@ targets = ["x86_64-unknown-linux-gnu"]

 [profile.release]
 lto = true
+codegen-units = 1

 [[test]]
 name = "integration"

I am not going to dig any deeper since the issue seems to be gone, but I would double-check once the latest release actually makes it into the package manager.