Open TheKaram opened 1 year ago
We're triaging new platforms as requests come in, and prioritizing with respect to our roadmap. Other folks with the same request - please upvote this issue. Stay tuned!
This is a working PKGBUILD file:
pkgname=modular
pkgver=0.1.4
pkgrel=1
pkgdesc="Modular installation tool"
url="https://developer.modular.com/download"
license=("custom:modular")
depends=(
"python"
"python-pip"
"ncurses"
"libxml2"
)
arch=("x86_64")
source=("https://dl.modular.com/public/installer/deb/debian/pool/any-version/main/m/mo/modular_$pkgver/modular-$pkgver-amd64.deb")
sha256sums=("7b958ac02260ae9a7224c6ae50860a4dd00089ffc00fc87a0c56585b34c10849")
package() {
bsdtar -xf data.tar -C "$pkgdir/"
}
But due to some other issues, you still can't fully install mojo. This for one is due to the modular package manager not creating a custom Python venv (which can be easily fixed by invoking it in a shell which has a venv active). The however bigger problem is that the shipped lldb was compiled against an ncurses build which is not available on Arch Linux - the LLVM build that ModularML does needs to link against ncursesw, instead of ncurses in order for it to run on Arch Linux.
Nice, thanks for the example. We'll take all this under advisement for when we get to Arch support :)
You want your language to grow, it needs to be able to be installed anywhere. Let the packagers do their work. The only place this can currently be used is with Debian and RPM package managers, which is just disappointing.
Hopefully someday Mojo is truly open source because then it would be easier to actually install it in places and use it.
I'm sorry you're disappointed! We are working on pushing things forward and expanding support, please do stay tuned.
@bzcheeseman Could you please post an ETA on this thread, if and when there is one.
Manually changed libpanelw.so & libncursesw.so per Janrupf's comment to the filenames lldb asks for, gives this error now.
In case it's of any help, here are the logs. Running wsl2 arch.
pond:lib duck$ modular install mojo
# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /home/duck/.modular/pkg/packages.modular.com_mojo
# Downloads complete, setting configs...
# Configs complete, running post-install hooks...
Requirement already satisfied: find_libpython==0.3.0 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from -r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 1)) (0.3.0)
Requirement already satisfied: papermill==2.4.0 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from -r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (2.4.0)
Requirement already satisfied: jupyter_client>=8.3.0 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from -r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (8.3.1)
Requirement already satisfied: ansiwrap in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (0.8.4)
Requirement already satisfied: click in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (8.1.7)
Requirement already satisfied: pyyaml in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (6.0.1)
Requirement already satisfied: nbformat>=5.1.2 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (5.9.2)
Requirement already satisfied: nbclient>=0.2.0 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (0.8.0)
Requirement already satisfied: tqdm>=4.32.2 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (4.66.1)
Requirement already satisfied: requests in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (2.31.0)
Requirement already satisfied: entrypoints in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (0.4)
Requirement already satisfied: tenacity in /home/duck/.python/pkgs/lib/python3.11/site-packages (from papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (8.2.3)
Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (5.3.1)
Requirement already satisfied: python-dateutil>=2.8.2 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (2.8.2)
Requirement already satisfied: pyzmq>=23.0 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (25.1.1)
Requirement already satisfied: tornado>=6.2 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (6.3.3)
Requirement already satisfied: traitlets>=5.3 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (5.9.0)
Requirement already satisfied: platformdirs>=2.5 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jupyter-core!=5.0.*,>=4.12->jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (3.10.0)
Requirement already satisfied: fastjsonschema in /home/duck/.python/pkgs/lib/python3.11/site-packages (from nbformat>=5.1.2->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (2.18.0)
Requirement already satisfied: jsonschema>=2.6 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from nbformat>=5.1.2->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (4.19.0)
Requirement already satisfied: six>=1.5 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from python-dateutil>=2.8.2->jupyter_client>=8.3.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 3)) (1.16.0)
Requirement already satisfied: textwrap3>=0.9.2 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from ansiwrap->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (0.9.2)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from requests->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from requests->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from requests->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (2.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from requests->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (2023.7.22)
Requirement already satisfied: attrs>=22.2.0 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jsonschema>=2.6->nbformat>=5.1.2->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jsonschema>=2.6->nbformat>=5.1.2->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (2023.7.1)
Requirement already satisfied: referencing>=0.28.4 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jsonschema>=2.6->nbformat>=5.1.2->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (0.30.2)
Requirement already satisfied: rpds-py>=0.7.1 in /home/duck/.python/pkgs/lib/python3.11/site-packages (from jsonschema>=2.6->nbformat>=5.1.2->papermill==2.4.0->-r /home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/requirements.txt (line 2)) (0.10.2)
Testing `MODULAR_HOME=/home/duck/.modular`
* `/home/duck/.modular/pkg/packages.modular.com_mojo/bin/mojo`...
TEST: `mojo --help`... OK
TEST: `mojo run --help`... OK
TEST: `mojo build test_mandelbrot.mojo`... OK
TEST: `mojo build test_python.mojo`... OK
TEST: `mojo demangle`... OK
TEST: `mojo format`... OK
TEST: `mojo package`... OK
TEST: `mojo test_mandelbrot.mojo`... OK
TEST: `mojo test_python.mojo`... OK
== stdout ==
== stderr ==
/home/duck/.modular/pkg/packages.modular.com_mojo/bin/lldb: /usr/lib/libpanel.so.6: version `NCURSES6_5.0.19991023' not found (required by /home/duck/.modular/pkg/packages.modular.com_mojo/bin/../lib/liblldb.so.18git)
/home/duck/.modular/pkg/packages.modular.com_mojo/bin/lldb: /usr/lib/libncurses.so.6: version `NCURSES6_5.0.19991023' not found (required by /home/duck/.modular/pkg/packages.modular.com_mojo/bin/../lib/liblldb.so.18git)
TEST: `mojo repl`... ERROR
Traceback (most recent call last):
File "/home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py", line 342, in <module>
main()
File "/home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py", line 338, in main
tester.test(args.test_jupyter)
File "/home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py", line 275, in test
self.test_mojo_repl()
File "/home/duck/.modular/pkg/packages.modular.com_mojo/scripts/post-install/self-test.py", line 195, in test_mojo_repl
assert False
AssertionError
modular: error: failed to run python:
You want your language to grow, it needs to be able to be installed anywhere. Let the packagers do their work. The only place this can currently be used is with Debian and RPM package managers, which is just disappointing.
Hopefully someday Mojo is truly open source because then it would be easier to actually install it in places and use it.
Could not agree more. It's disappointing that modular first realised a locked-down cloud offering, and then a custom downloader that requires auth tokens and only supports a subset of one distro, before a simple and obvious binary tarball. Bad priorities. I'd suggest that the roadmap should be revisited.
You won't go far with out neckbeards. Please get this on the AUR soon, TY.
We appreciate your feedback. Please stay tuned for our future news!
Tickets should not be closed until the issues are resolved.
I have made some experiments, i finally got it working, but it is not ideal.
I can add the steps to get it working to the PKGBUILD from @Janrupf. I'll do that later on.
Okay, i have created a gist, i hope all the scripts are working, i could not test all of them
both fresh install scripts work after changing lines 21-23 from:
if [$authtoken != "done"] then
modular auth $authtoken
fi
to
if [ $authtoken != "done" ]
then
modular auth $authtoken
fi
(added a space in the []
and moved then
to a new line)
also echo
is spelt ehco
on line 17.
I have changed this in the gist, im not shure, but when coping the libraries to the OS library folders, you might need the libncurses.so.6 in both /lib/
and /usr/lib
. I've added this also to the script.
@Sharktheone how did you get arround the externally-managed-environment error when running the post-install hooks of the mojo installer(modular install mojo)
@JustFrederik i just created a python venv and used this python version
I created a venv and activated it, but i got the same error. Did you also set some env variables?
no, just
python3 -m venv venv
source venv/bin/activate
modular install mojo
I reinstalled python, modular, and recreated the venv and that solved it. Thanks
Good, another opportunity would removing the EXTERNALLY-MANAGED
file in /usr/lib/python3.11
or what ever your python version is
Ty got it working on my Arch distro
Welcome to Mojo! 🔥
Expressions are delimited by a blank line.
Type :mojo help
for further assistance.
1> print("I use Arch Btw")
I use Arch Btw 2> ⏎
@Sharktheone it might makes sense to create a custom venv to arch to use and activate automaticly everytime install is used(updating).
Something like this in(.bashrc/.zshrc):
function modular() {
if [[ "$1" == "install" ]] || [[ "$1" == "uninstall" ]]; then
source ~/.modular_venv/bin/activate
fi
command modular "$@"
}
function mojo() {
if [[ "$1" == "update" ]]; then
source ~/.modular_venv/bin/activate
modular uninstall mojo
modular clean
modular install mojo
else
command mojo "$@"
fi
}
custom venv... and activate automaticly everytime
direnv is helpful for that.
@JustFrederik If you want i can include an option in the install script i wrote. But most of the time it is not a huge problem just activating a random venv to install / update mojo.
@Sharktheone i added it to my zshrc file bc I wanted a easy way to update. It’s up to you if you think it’s worth adding.
please support arch.
please support arch.
It would be nice, we simply use an AUR package to install 🔥SDK on ArchLinux.
please support arch.
It would be nice, we simply use an AUR package to install 🔥SDK on ArchLinux.
Yeah that would be great
Please support arch.
Please support Arch
Yes, please support Arch Linux. I wanna switch my Discord.py bot to Mojolang.
When Arch support Get on this pls
Arch install when
I shall continue to bully Mojo devs until support is added. Join me fellow Arch users, and let us commence in meme-ing the crap out of this issue.
That doesn't help anyone. Why don't you create an AUR package for arch and everyone gets something out of it. That's Open Source
the most mentally stable arch user
the most mentally stable arch user
Are you seriously judging all Arch users because of the behavior of one annoying guy?
Heh heh heh heh heh
the most mentally stable arch user
Are you seriously judging all Arch users because of the behavior of one annoying guy?
as an arch user myself, I absolutely am doing that
Why don't you create an AUR package for arch and everyone gets something out of it. That's Open Source
I've been working on my script to install it, so it clould work with the AUR. But i need a few days to get it ready.
If anyone on Arch wants to use Mojo, here's a script someone made: https://github.com/Sharktheone/arch-mojo
I'll look into porting it to an AUR package later.
@AgentLoneStar007 thank you for relinking the workaround that @Sharktheone produced. Please don't use spamming as a tactic, that's not helpful to anyone, and stops users from finding helpful workarounds like @Sharktheone produced.
If anyone on Arch wants to use Mojo, here's a script someone made: https://github.com/Sharktheone/arch-mojo
I'll look into porting it to an AUR package later.
I am already on it, creating an AUR package.
I have completed the two PKGBUILD files, but I am not shure, how we should handle this with versioning and the packages.
I would create one package for modular from the PKGBUILD from Janrupf and a second for mojo. For the mojo packages I am not sure, how we should handle this with versioning, since modular just installs the newest version. mojo-git
would be an option and updating the version manually, because I thing checking the newest version in the PKGBUILD is more work than just updating it manually. We could also just do a pkg mojo-libs
, but i think this goes completely misses the point from just typing in yay -S mojo
or paru -S mojo
Link? https://github.com/Sharktheone/arch-mojo For anyone coming along.
I have completed the two PKGBUILD files, but I am not shure, how we should handle this with versioning and the packages.
I would create one package for modular from the PKGBUILD from Janrupf and a second for mojo. For the mojo packages I am not sure, how we should handle this with versioning, since modular just installs the newest version.
mojo-git
would be an option and updating the version manually, because I thing checking the newest version in the PKGBUILD is more work than just updating it manually. We could also just do a pkgmojo-libs
, but i think this goes completely misses the point from just typing inyay -S mojo
orparu -S mojo
I think is simpler packages like "mojo-0.1", "mojo-0.2", etc.
You mean for versioning? The main problem is, i cannot influence the version of mojo, that is being installed. Maybe a package called mojo
makes sense, which has only to purpose to depend on modular
and mojo-git
You mean for versioning? The main problem is, i cannot influence the version of mojo, that is being installed. Maybe a package called
mojo
makes sense, which has only to purpose to depend onmodular
andmojo-git
Oh yes.. I don't know the internals.. I this case, just mojo
makes sense..
@Kamek437 python script worked out of the box to me https://github.com/modularml/mojo/issues/572#issuecomment-1752202145 and I hope this lands in AUR soon although it was also unexpectedly sketchy to curl your file that doesn't understand ArchLinux ... may I suggest to add the provided link in the Distro-specific Setup which currently only shows Ubuntu 20?
Basically an ArchLinux entry in the select that either points at the community GitHub hosted page or the AUR module, once it gets out?
Thank you!
I want to upload it to the AUR soon™. I only procrastinate this since - uh - two weeks... 😅
Issue description
I have received an email from Modular to download Mojo but the installation script supports only Fedora and Ubuntu.
Steps to reproduce
Run the installation script on arch linux.
Version Info