exqlite icon indicating copy to clipboard operation
exqlite copied to clipboard

Error happened while installing exqlite from precompiled binary message

Open axelson opened this issue 2 years ago • 9 comments

I recently update exqlite and now when I run mix compile I see the following error printed in red text:

Error happened while installing exqlite from precompiled binary: cannot find download url for current target "x86_64-linux-musl". Available targets are: [{"x86_64-windows-msvc", "2.16"}, {"x86_64-linux-gnu", "2.16"}, {"x86_64-linux-gnu", "2.15"}, {"s390x-linux-gnu", "2.16"}, {"s390x-linux-gnu", "2.15"}, {"riscv64-linux-gnu", "2.16"}, {"riscv64-linux-gnu", "2.15"}, {"powerpc64le-linux-gnu", "2.16"}, {"powerpc64le-linux-gnu", "2.15"}, {"i686-linux-gnu", "2.16"}, {"i686-linux-gnu", "2.15"}, {"armv7l-linux-gnueabihf", "2.16"}, {"armv7l-linux-gnueabihf", "2.15"}, {"aarch64-linux-gnu", "2.16"}, {"aarch64-linux-gnu", "2.15"}, {"x86_64-apple-darwin", "2.16"}, {"x86_64-apple-darwin", "2.15"}, {"aarch64-apple-darwin", "2.16"}, {"aarch64-apple-darwin", "2.15"}].

Attempting to compile exqlite from source...

If I'm understanding correctly this is more or less expected since exqlite won't be compiled for every system/platform (although I'm slightly surprised because I'm currently on Linux mint which I wouldn't expect to be too exotic).

My suggestion is to "downgrade" this from an error to a warning and change the default text color from red to yellow.

Something like:

Warning: Unable to install exqlite from precompiled binary: cannot find...

axelson avatar Mar 12 '23 19:03 axelson

To not use the precompiled binaries, throw this into your config

config :exqlite, make_force_build: true

https://github.com/elixir-sqlite/exqlite#compile-time-configuration

warmwaffles avatar Mar 13 '23 16:03 warmwaffles

@axelson I'll look into what it is going to take to compile for a musl based distribution.

warmwaffles avatar Mar 13 '23 16:03 warmwaffles

@cocoa-xu have you had anyone ask for musl precompiled binary support before?

warmwaffles avatar Mar 13 '23 16:03 warmwaffles

@warmwaffles Yeah, it's customizable in cc_precompiler, and I just updated it to v0.1.7 with a :include_default_ones key, which makes it much easier to just add some more targets or override some default ones.

I'll send a PR!

cocoa-xu avatar Mar 13 '23 19:03 cocoa-xu

@axelson we have precompiled binaries for musl now under v0.3.17

warmwaffles avatar Mar 13 '23 21:03 warmwaffles

That's great, thanks!

What do you think about the idea of considering it only a warnings instead of an error when there are no precompiled binaries available for the current system?

axelson avatar Mar 17 '23 06:03 axelson

cc @cocoa-xu

warmwaffles avatar Mar 17 '23 14:03 warmwaffles

I do believe it should warn and just fallback to building it from source. Or even not say anything at all and just build from source.

warmwaffles avatar Mar 17 '23 16:03 warmwaffles

I do believe it should warn and just fallback to building it from source. Or even not say anything at all and just build from source.

Yeah, I agree. Just submitted a PR to elixir_make.

cocoa-xu avatar Mar 17 '23 16:03 cocoa-xu

I believe this can be closed now. :)

josevalim avatar Apr 22 '24 12:04 josevalim

It certainly can be.

warmwaffles avatar Apr 22 '24 13:04 warmwaffles