lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.37k stars 156 forks source link

lpython and MSYS2 - findings #2678

Open carlkl opened 2 months ago

carlkl commented 2 months ago

These are my findings with the first steps to compile lpython on Msys2 environments.

The environments I tested are the ucrt64 and the clang64 environment.

  1. the version file is not created. Minor problem as it can be created manually.
  2. One has to install clang-15 instead of clang, as llvm-18 is not yet supported. I guess llvm-16 supported as well, but there is no canonical way to install this version of the toolchain with pacman. Later on I recognized, that lfortran builds on Msys2 use clang-15 as well.
  3. src/bin/lpython.cpp includes hardcoded paths which match a conda environment. Has to be adapted somehow. Maybe some environment variables could be introduced to allow user defined paths to Python, numpy headers at build time.
  4. The install is spread all over multiple folders. I have no clue how to create a standalone lpython install. This would be great for Windows vanilla CPython usage.
  5. lfortran has to be started from the src/bin folder; see 4. Is this documented somewhere other than in a github issue?
  6. Is there a way to automate the type-hinting to python source code somehow?
  7. There are some warning during the compile process. I want to test further before adding these to this issue.

I guess there will be more to tell later.