Skip to content

Compile errors on Windows environment #2811

Open

Description

@Elimiriel

0. environment_win.yml should be downloaded manually, and the requirements could be installed manually
At the first trial the file was auto-generated, but after some times it doesn't be generated. After reading that, I can tried in Anaconda environment+manual installation of modules in yml.
1. About initial environment settings
The code also requires 'utils' and 'case-insensitive-dictionary' module. Be aware: 'case_insensitive_dict' doesn't work even thought their names are similar.
2. While running build0.bat: A syntax warning kicks into.
C:\ProgramData\lpython\lpython\src\libasr\wasm_instructions_visitor.py:174: SyntaxWarning: invalid escape sequence '\.' splitted_name = re.split("[\._]", func)
It was possible to solve that correct as r"[\._]"
3. While running build1.bat: A fail, lots of C4xxx warnings about possible loss of data, stop of ninja by subcommand failure
3.1 Fail
FAILED: src/libasr/CMakeFiles/asr.dir/codegen/evaluator.cpp.obj C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe /nologo /TP -DHAVE_TARGET_X86=1 -DHAVE_WHEREAMI=1 -DHAVE_ZLIB=1 -DLCOMPILERS_FAST_ALLOC=1 -IC:\ProgramData\lpython\lpython\src\libasr\.. -I"C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\include" -external:IC:\ProgramData\anaconda3\Library\include -external:W0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /O2 /Ob2 /DNDEBUG -std:c++17 /GR- /showIncludes /Fosrc\libasr\CMakeFiles\asr.dir\codegen\evaluator.cpp.obj /Fdsrc\libasr\CMakeFiles\asr.dir\asr.pdb /FS -c C:\ProgramData\lpython\lpython\src\libasr\codegen\evaluator.cpp
3.2 and 3.3: They're too long to post. Because the prompt window cannot maintain whole messages, early stage prompts were scrolled out. Please check a attachment txt.
2409WinX64_lpython_err_log.txt

Additional info: LLVM 19.1.0 RC4 is connected by a plugin with my MSVS.

Activity

  1. Ljq-2413 commented on Oct 27, 2024

    @Ljq-2413

    I have encoutered the same problem, how did you solve them.

  2. Elimiriel commented on Oct 30, 2024

    @Elimiriel
    Author

    I have encoutered the same problem, how did you solve them.

    I couldn't solve this issue myself for now. And I think issue 2 could be solved by using os.curdir, os.rep and vice versa when cleaning up installation scripts.

  3. certik commented on Oct 31, 2024

    @certik
    Contributor

    You can install it like we do at the CI:

    xonsh ci/build.xsh
    , which is well tested and it works.

    Alternatively, use WSL and build it in Ubuntu, which is also tested and works.

  4. certik commented on Oct 31, 2024

    @certik
    Contributor

    @Elimiriel the error you are getting is:

    C:\ProgramData\lpython\lpython\src\libasr\codegen\evaluator.cpp(39): fatal error C1083: Cannot open include file: 'llvm/Transforms/IPO/PassManagerBuilder.h': No such file or directory
    [60/98] Building CXX object src\libasr\CMakeFiles\asr.dir\asr_scopes.cpp.obj
    cl : Command line warning D9025 : overriding '/GR' with '/GR-'
    

    You might have the wrong LLVM version installed. The CI uses LLVM 11, so you can install that.

    In LFortran we recently got all LLVM version 10-19 working, but the fixes are not yet ported to LPython. I think LPython currently works with LLVM 10-16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions