modularml / max

A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform
https://www.modular.com
Other
344 stars 44 forks source link

Is MAGIC for musl only? #240

Open jradxl opened 1 day ago

jradxl commented 1 day ago

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 commented 20 hours ago

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 commented 14 hours ago

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 commented 4 hours ago

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 commented 3 hours ago
$ 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