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

Is MAGIC for musl only? #240

Open
jradxl opened this issue Oct 15, 2024 · 4 comments
Open

Is MAGIC for musl only? #240

jradxl opened this issue Oct 15, 2024 · 4 comments
Assignees

Comments

@jradxl
Copy link

jradxl commented Oct 15, 2024

I hear about Magic, so I thought I'd try it.
Looking at the code of your curl installer, you limit the Linux version to musl

if [[ $PLATFORM == "Darwin" ]]; then
  PLATFORM="apple-darwin"
elif [[ $PLATFORM == "Linux" ]]; then
  PLATFORM="unknown-linux-musl"
elif [[ $(uname -o) == "Msys" ]]; then
  PLATFORM="pc-windows-msvc"
fi

But your installer doesn't warn me or refuse to install on my typical AMD64 installation of Ubuntu

Linux desktop 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I've tried to find a Magic/Mojo system requirements document, but haven't.
I would have thought you would have mentioned this restriction. At least prior to magic, mojo did install.
Comments?

@ehsanmok
Copy link
Member

Thanks for the feedback! the system requirement is 8GB of RAM and magic should support major Linux distros including Ubuntu, MacOS and WSL2. Curious have you got any error when installing magic and then MAX/Mojo or it worked for our out of the box?

@jradxl
Copy link
Author

jradxl commented Oct 16, 2024

Magic installs but only --version and --help menu options work. All others hang indefinitely.
Pipx works fine.
I've tested both Magic and Pixi in new, separate user accounts so as not to interfere with my normal account.

Your curl installer uses this URL
https://dl.modular.com/public/magic/raw/versions/latest/magic-x86_64-unknown-linux-musl
So I would not expect a MUSL version to work on my standard Ubuntu kUbuntu 24.04

$ ldd --version ldd
ldd (Ubuntu GLIBC 2.35-0ubuntu3.8) 2.35

Adding:-
sudo apt install musl-tools musl musl-dev
made no difference.
If you're not going to release an amd64/glibc version, I think you need to link your source with the musl-gcc compatibility layer.
If Pixi is open source, do you have a open-source version of Magic?

@zbowling
Copy link
Contributor

Hi there! The build name is named musl because we statically link against musl libc into the binary to avoid compatibility issues with different distro glibc versions so that the binary is portable to nearly all distros regardless of the libc (so basically all we require is a modern enough Linux kernel with syscalls available for the last 8 years). It has no relation to the glibc or musl libc on your system so it should work.

For why it's hanging, I'm not sure. Which commands are invoking where it hangs?

Also can you run magic info and lsb_release -a and post here?

@jradxl
Copy link
Author

jradxl commented Oct 16, 2024

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy

$ magic info

ALL sub commands hang. eg:
$ magic task list
$ magic shell

only work
$ magic --version
magic 0.3.1 - (based on pixi 0.29.0)
$magic --help

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

3 participants