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

RISC-V support and micromamba bootstrap build #2308

Closed
ifsheldon opened this issue Feb 19, 2023 · 11 comments · Fixed by #2329
Closed

RISC-V support and micromamba bootstrap build #2308

ifsheldon opened this issue Feb 19, 2023 · 11 comments · Fixed by #2329
Assignees

Comments

@ifsheldon
Copy link

Hi! I want to build a micromamba for my RISC-V SBC, but to setup a dev env for micromamba, a micromamba needs to be installed first as said in the documentation. This gets me stuck.

So now I have two questions:

  • Do we have a plan to add RISC-V support? I think a minimum support for managing pure-python (or any architecture-independent) packages should be possible and easy.
  • Can we somehow bootstrap building micromamba without an existing micromamba?
@jonashaag
Copy link
Contributor

Are there any packages for RISC-V in the first place?

@wolfv
Copy link
Member

wolfv commented Feb 19, 2023

This is a good question! I think we'd love to have support on more platforms :)

If you can get micromamba/libmamba dependencies from somewhere else / from source, this should be totally doable.

We do use vcpkg on Windows to get dependencies for the Windows build. If vcpkg works on RISC-V then that might be viable.

I can give you more details or you can look at the micromamba feedstock: http://github.com/conda-forge/micromamba-feedstock

You need libarchive, libcurl, and a couple more packages.

@ifsheldon
Copy link
Author

Are there any packages for RISC-V in the first place?

I guess any pure-Python packages work since there're ports of Python and some Python packages in distros like Debian.

@ifsheldon
Copy link
Author

If vcpkg works on RISC-V then that might be viable.

The support is there but not in a stable release yet. I guess we can see it works this week when 2023-02-24 is released. Related PR of vcpkg is this.

I can give you more details or you can look at the micromamba feedstock

I'm not very familiar with feedstocks. Can you give me some pointers? Maybe we can wait a bit until the end of this week when a new vcpkg is released?

@jonashaag
Copy link
Contributor

This is the build script: https://github.com/conda-forge/micromamba-feedstock/blob/main/recipe/build.sh

Here you’ll find the list of dependencies: https://github.com/conda-forge/micromamba-feedstock/blob/main/recipe/meta.yaml all of those are found as feedstocks. In general you should be able to use any of the dependencies installed from any package manager (or simply using the source distribution). So you might want to start with any Linux distribution that has a lot of packages and see how far you’ll get.

@dtcxzyw
Copy link
Contributor

dtcxzyw commented Feb 26, 2023

Hi! The risc-v support for vcpkg is now available: https://github.com/microsoft/vcpkg/releases/tag/2023.02.24. I am trying to port mamba to linux-riscv32/64 platforms. Could you assign this issue to me?

@jonashaag jonashaag assigned jonashaag and dtcxzyw and unassigned jonashaag Feb 26, 2023
@ifsheldon
Copy link
Author

Thanks. I've been too busy to try it out these days. I can help with writing a bootstrapping documentation.

port mamba

I guess you are referring to micromamba? Because mamba still needs conda as a dependency, porting micromamba may be easier.

@dtcxzyw
Copy link
Contributor

dtcxzyw commented Feb 28, 2023

@ifsheldon I have successfully built micromamba on my risc-v machine. Here is my bootstrapping script: https://gist.github.com/dtcxzyw/9fe5a3d7404d4234bc675a7847a3fa48. Hope it helps you.

However, it cannot install any conda-forge packages since the channels for linux-riscv32/64 are not available.
Here are some related issues/PRs:
conda-forge/conda-forge.github.io#1744
conda/conda#12319

I will make some contributions to conda and conda-forge for risc-v support. There's still a long way to go. 😂

@ifsheldon
Copy link
Author

However, it cannot install any conda-forge packages since the channels for linux-riscv32/64 are not available.

I am not very familiar with the internals of conda-forge, but I guess any packages marked as "noarch" should in theory be able to be installed? For example, I don't see any reasons why toposort cannot be installed.

@jonashaag
Copy link
Contributor

Yes but you need the Python dependency. So you’ll have to at least port the Python package (or fake it with some hacking)

@ifsheldon
Copy link
Author

True.

I don't know porting status of other distributions, but I've seen many ports of Python packages in Debian port repository and instructions on the Debian port wiki. Maybe these could 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

Successfully merging a pull request may close this issue.

4 participants