MacOS install scripts#889
Conversation
|
Hi @Ludblanc, I tested it on my MacBook Air M4, I got this error: |
|
Hi @LuigiGiuffrida98 ! Do you have any error message during the conda environment generation during the script? and make test you see is from the verilator build not from x-heep. It seems that make test in xheep is for ci integration and use hardcoded prefix for riscv compiler which will anyway make it fail (as our compiler on mac is called riscv32-corev-elf and not riscv32-unknown-elf-gcc. how ever if you use the normal make mcu-gen, make app, make verilator-build, make verilator-run this should work once the conda env issue is solved. |
|
I completely uninstalled conda (removing the environment too), verilator and the toolchain to restart from scratch. I reinstalled conda and run your script. hjson and some other packages are installed as a dependency of fusesoc/edalize. But pylibfst installation fails because of cmake versioning errors. The workaround is to use a specific version of python instead of letting conda inherit it from the system (python 3.8 should be fine) python >= 3.10 deprecates the support for the version of cmake required by the version of pylibfst installed by edalize. (This is the issues I encountered when installing the conda env on my mac and the workaround I used to fix things). I will try it asap and push the fix to this branch |
|
and |
|
you can also set this env variable: |
davidmallasen
left a comment
There was a problem hiding this comment.
@davideschiavone @StMiky what do you think of adding these scripts to the repo? I'm not entirely convinced as could be an unreliable shortcut in different systems, but on the other hand could be handy
| - conda-forge | ||
| dependencies: | ||
| - python=3.8 | ||
| - python=3.11 |
|
|
||
| Links for the packages relative to each software can also be found under the corresponding section of this guide. In general, make sure to have a look at the [Check system requirements](https://opentitan.org/book/doc/getting_started/index.html) section of the OpenTitan documentation. | ||
|
|
||
| The script `util/install_tools_and_conda_env.sh` can be used to install the required dependencies and set up the Conda environment on Linux. It uses `apt` to install the required packages and then sets up a Conda environment with the necessary Python dependencies. It also installs the CORE-V toolchain, Verilator and the oss-cad-suite. You can select the versions of the tools you want to install by changing the corresponding variables at the beginning of the script. After running the script, you can activate the environment with `source util/start_env.sh`. |
There was a problem hiding this comment.
Where are these .sh versions? I only see .zsh.
| # --- Configuration & Versions --- | ||
| RISCV_V_DATE="20240530" | ||
| OSS_CAD_DATE="2026-02-15" | ||
| VERIBLE_HASH="v0.0-4051-g9fdb4057" |
There was a problem hiding this comment.
This is not the version we have in the documentation. It should be v0.0-4023-gc1271a00
| - python=3.8 | ||
| - python=3.11 | ||
| - pip | ||
| - pyYAML |
There was a problem hiding this comment.
We should add a version if we move it from the requirements to here
|
|
||
| Links for the packages relative to each software can also be found under the corresponding section of this guide. In general, make sure to have a look at the [Check system requirements](https://opentitan.org/book/doc/getting_started/index.html) section of the OpenTitan documentation. | ||
|
|
||
| The script `util/install_tools_and_conda_env.sh` can be used to install the required dependencies and set up the Conda environment on Linux. It uses `apt` to install the required packages and then sets up a Conda environment with the necessary Python dependencies. It also installs the CORE-V toolchain, Verilator and the oss-cad-suite. You can select the versions of the tools you want to install by changing the corresponding variables at the beginning of the script. After running the script, you can activate the environment with `source util/start_env.sh`. |
There was a problem hiding this comment.
Clarify that this is only a shortcut that should be understood rather that run blindly. For both this and macos
|
Hi @Ludblanc what is the status of this PR? |
|
Hi @LuigiGiuffrida98, |
Here I propose 2 scripts:
util/install_tools_and_conda_env.zshallow to install the tools with specific versions and fix some compatibility issues such as pyYAML, and compilation issues with the specific version of verilator required for x-heep.util/start_env.zshis a script to source to start the environment.The two scripts works on both macOS arm64 and intel, as well as intel ubuntu.
Incidentally the python version had to be updated for compatibility issues.
I tried to update the documentation accordingly