lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.51k stars 164 forks source link

windows build failure #2250

Open liudonghua123 opened 1 year ago

liudonghua123 commented 1 year ago

Hi, I tried to build lpython following the readme doc. But when I execute call build1.bat, it failed with some errors which I could not find.

The last logs are belows.

[81/87] Building CXX object src/lpython/CMakeFiles/lpython_lib.dir/pickle.cpp.obj
In file included from D:/code/python/lpython/src/libasr/exception.h:29,
                 from D:/code/python/lpython/src/libasr/assert.h:7,
                 from D:/code/python/lpython/src/libasr/alloc.h:10,
                 from D:/code/python/lpython/src/lpython/python_ast.h:6,
                 from D:/code/python/lpython/src/lpython/pickle.h:4,
                 from D:/code/python/lpython/src/lpython/pickle.cpp:3:
In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)',
    inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4,
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17,
    inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator<LCompilers::diag::Span>]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30,
    inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator<LCompilers::diag::Span>]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21,
    inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector<LCompilers::Location>&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28,
    inlined from 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector<LCompilers::Location>&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)' at D:/code/python/lpython/src/libasr/diagnostics.h:139:5:
D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)&<unnamed> + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized]
   15 | struct Span {
      |        ^~~~
D:/code/python/lpython/src/libasr/diagnostics.h: In member function 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector<LCompilers::Location>&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)':
D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '<anonymous>' declared here
   54 |             spans.push_back(Span(loc));
      |                                     ^
ninja: build stopped: subcommand failed.

See the following for full logs.

Details ``` D:\code\python\lpython>conda activate lp (lp) D:\code\python\lpython>call build0.bat xonsh ./build0_win.xsh Assuming default values of Python.asdl and python_ast.py Assuming default values of wasm_instructions.txt and wasm_visitor.h D:\code\python\lpython\src\lpython\parser D:\code\python\lpython D:\code\python\lpython D:\code\python\lpython\src\lpython\parser D:\code\python\lpython D:\code\python\lpython (lp) D:\code\python\lpython>call build1.bat cmake -DCMAKE_BUILD_TYPE=Release -DWITH_LLVM=yes -DLPYTHON_BUILD_ALL=yes -DWITH_STACKTRACE=no -DCMAKE_PREFIX_PATH="D:\apps\mambaforge\envs\lp" -DCMAKE_INSTALL_PREFIX=D:\code\python\lpython/inst . -G "Ninja" -- The C compiler identification is GNU 12.1.0 -- The CXX compiler identification is GNU 12.1.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/msys64/mingw64/bin/c++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found ZLIB: D:/apps/mambaforge/envs/lp/Library/lib/z.lib (found version "1.2.13") -- Found LLVM 11.1.0 -- Using LLVMConfig.cmake in: D:/apps/mambaforge/envs/lp/Library/lib/cmake/llvm Configuration results --------------------- LPYTHON_VERSION: 0.19.0-65-gd335252c2 CPACK_PACKAGE_FILE_NAME: lpython-0.19.0-65-gd335252c2-Windows C compiler : C:/msys64/mingw64/bin/cc.exe C++ compiler : C:/msys64/mingw64/bin/c++.exe Build type: Release C compiler flags : -O3 -DNDEBUG C++ compiler flags : -Wall -Wextra -O3 -march=native -funroll-loops -DNDEBUG Installation prefix: D:/code/python/lpython/inst WITH_LFORTRAN_ASSERT: no LPYTHON_STATIC_BIN: no LPYTHON_BUILD_TO_WASM: no WITH_STACKTRACE: no WITH_RUNTIME_STACKTRACE: WITH_UNWIND: no WITH_BFD: no WITH_DWARFDUMP: no WITH_LINKH: no WITH_MACHO: no HAVE_LFORTRAN_DEMANGLE: yes WITH_LLVM: yes WITH_XEUS: no WITH_JSON: no WITH_LSP: no WITH_FMT: no WITH_LFORTRAN_BINARY_MODFILES: YES WITH_RUNTIME_LIBRARY: YES WITH_WHEREAMI: yes WITH_ZLIB: yes WITH_TARGET_AARCH64: no WITH_TARGET_X86: yes -- Configuring done (20.7s) -- Generating done (0.2s) -- Build files have been written to: D:/code/python/lpython cmake --build . --config Release -j8 --target install [7/87] Building CXX object src/libasr/CMakeFiles/asr.dir/codegen/asr_to_wasm.cpp.obj In file included from D:/code/python/lpython/src/libasr/exception.h:29, from D:/code/python/lpython/src/libasr/assert.h:7, from D:/code/python/lpython/src/libasr/alloc.h:10, from D:/code/python/lpython/src/libasr/asr.h:6, from D:/code/python/lpython/src/libasr/codegen/asr_to_wasm.cpp:8: In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In constructor 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28, inlined from 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)' at D:/code/python/lpython/src/libasr/diagnostics.h:139:5: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In member function 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ ...... # omit due to the issue has limit of maximum 65536 characters C:/msys64/mingw64/include/c++/12.1.0/bits/stl_pair.h:663:5: note: candidate: 'template constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 663 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_pair.h:663:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::pair<_T1, _T2>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/string_view:594:5: note: candidate: 'template constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 594 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/string_view:594:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'ptw32_handle_t' is not derived from 'std::basic_string_view<_CharT, _Traits>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/string_view:600:5: note: candidate: 'template constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t >)' 600 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/string_view:600:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'ptw32_handle_t' is not derived from 'std::basic_string_view<_CharT, _Traits>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/string_view:607:5: note: candidate: 'template constexpr bool std::operator<(__type_identity_t >, basic_string_view<_CharT, _Traits>)' 607 | operator< (__type_identity_t> __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/string_view:607:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'ptw32_handle_t' is not derived from 'std::basic_string_view<_CharT, _Traits>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/basic_string.h:3691:5: note: candidate: 'template bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3691 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/basic_string.h:3691:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/basic_string.h:3704:5: note: candidate: 'template bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3704 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/basic_string.h:3704:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/basic_string.h:3716:5: note: candidate: 'template bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3716 | operator<(const _CharT* __lhs, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/basic_string.h:3716:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: mismatched types 'const _CharT*' and 'ptw32_handle_t' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/tuple:1538:5: note: candidate: 'template constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_UTypes ...>&)' 1538 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/tuple:1538:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::tuple<_UTypes ...>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:872:5: note: candidate: 'template bool std::operator<(const unique_ptr<_Tp, _Dp>&, const unique_ptr<_Up, _Ep>&)' 872 | operator<(const unique_ptr<_Tp, _Dp>& __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:872:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:885:5: note: candidate: 'template bool std::operator<(const unique_ptr<_Tp, _Dp>&, nullptr_t)' 885 | operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:885:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:895:5: note: candidate: 'template bool std::operator<(nullptr_t, const unique_ptr<_Tp, _Dp>&)' 895 | operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:895:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr_base.h:1840:5: note: candidate: 'template bool std::operator<(const __shared_ptr<_Tp1, _Lp>&, const __shared_ptr<_Tp2, _Lp>&)' 1840 | operator<(const __shared_ptr<_Tp, _Lp>& __a, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr_base.h:1840:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::__shared_ptr<_Tp1, _Lp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr_base.h:1851:5: note: candidate: 'template bool std::operator<(const __shared_ptr<_Tp, _Lp>&, nullptr_t)' 1851 | operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr_base.h:1851:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::__shared_ptr<_Tp, _Lp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr_base.h:1859:5: note: candidate: 'template bool std::operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>&)' 1859 | operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr_base.h:1859:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::__shared_ptr<_Tp, _Lp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr.h:606:5: note: candidate: 'template bool std::operator<(const shared_ptr<_Tp>&, const shared_ptr<_Tp>&)' 606 | operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr.h:606:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::shared_ptr<_Tp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr.h:617:5: note: candidate: 'template bool std::operator<(const shared_ptr<_Tp>&, nullptr_t)' 617 | operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr.h:617:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::shared_ptr<_Tp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr.h:626:5: note: candidate: 'template bool std::operator<(nullptr_t, const shared_ptr<_Tp>&)' 626 | operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/shared_ptr.h:626:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::shared_ptr<_Tp>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:2074:5: note: candidate: 'template bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2074 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:2074:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::vector<_Tp, _Alloc>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/array:340:5: note: candidate: 'template bool std::operator<(const array<_Tp, _Nm>&, const array<_Tp, _Nm>&)' 340 | operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/array:340:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::array<_Tp, _Nm>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_map.h:1549:5: note: candidate: 'template bool std::operator<(const map<_Key, _Tp, _Compare, _Allocator>&, const map<_Key, _Tp, _Compare, _Allocator>&)' 1549 | operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_map.h:1549:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::map<_Key, _Tp, _Compare, _Allocator>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_multimap.h:1170:5: note: candidate: 'template bool std::operator<(const multimap<_Key, _Tp, _Compare, _Allocator>&, const multimap<_Key, _Tp, _Compare, _Allocator>&)' 1170 | operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_multimap.h:1170:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::multimap<_Key, _Tp, _Compare, _Allocator>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_set.h:1023:5: note: candidate: 'template bool std::operator<(const set<_Key, _Compare, _Allocator>&, const set<_Key, _Compare, _Allocator>&)' 1023 | operator<(const set<_Key, _Compare, _Alloc>& __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_set.h:1023:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::set<_Key, _Compare, _Allocator>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_multiset.h:1010:5: note: candidate: 'template bool std::operator<(const multiset<_Key, _Compare, _Allocator>&, const multiset<_Key, _Compare, _Allocator>&)' 1010 | operator<(const multiset<_Key, _Compare, _Alloc>& __x, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/bits/stl_multiset.h:1010:5: note: template argument deduction/substitution failed: C:/msys64/mingw64/include/c++/12.1.0/thread:74:32: note: 'std::thread::native_handle_type' is not derived from 'const std::multiset<_Key, _Compare, _Allocator>' 74 | return __x._M_thread < __y._M_thread; | ^~~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/system_error:269:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 269 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/system_error:269:31: note: no known conversion for argument 1 from 'std::thread::native_handle_type' to 'const std::error_code&' 269 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ C:/msys64/mingw64/include/c++/12.1.0/system_error:398:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 398 | operator<(const error_condition& __lhs, | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/system_error:398:36: note: no known conversion for argument 1 from 'std::thread::native_handle_type' to 'const std::error_condition&' 398 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ C:/msys64/mingw64/include/c++/12.1.0/thread:70:3: note: candidate: 'bool std::operator<(thread::id, thread::id)' 70 | operator<(thread::id __x, thread::id __y) noexcept | ^~~~~~~~ C:/msys64/mingw64/include/c++/12.1.0/thread:70:24: note: no known conversion for argument 1 from 'std::thread::native_handle_type' to 'std::thread::id' 70 | operator<(thread::id __x, thread::id __y) noexcept | ~~~~~~~~~~~^~~ [79/87] Building CXX object src/libasr/CMakeFiles/asr.dir/codegen/asr_to_llvm.cpp.obj In file included from D:/code/python/lpython/src/libasr/exception.h:29, from D:/code/python/lpython/src/libasr/assert.h:7, from D:/code/python/lpython/src/libasr/alloc.h:10, from D:/code/python/lpython/src/libasr/asr.h:6, from D:/code/python/lpython/src/libasr/codegen/asr_to_llvm.cpp:42: In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In constructor 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28, inlined from 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)' at D:/code/python/lpython/src/libasr/diagnostics.h:139:5: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In member function 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ [80/87] Building CXX object src/lpython/CMakeFiles/lpython_lib.dir/semantics/python_ast_to_asr.cpp.obj In file included from D:/code/python/lpython/src/libasr/exception.h:29, from D:/code/python/lpython/src/libasr/assert.h:7, from D:/code/python/lpython/src/libasr/alloc.h:10, from D:/code/python/lpython/src/libasr/asr.h:6, from D:/code/python/lpython/src/lpython/semantics/python_ast_to_asr.cpp:14: In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In constructor 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28, inlined from 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)' at D:/code/python/lpython/src/libasr/diagnostics.h:139:5: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In member function 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ [81/87] Building CXX object src/lpython/CMakeFiles/lpython_lib.dir/pickle.cpp.obj In file included from D:/code/python/lpython/src/libasr/exception.h:29, from D:/code/python/lpython/src/libasr/assert.h:7, from D:/code/python/lpython/src/libasr/alloc.h:10, from D:/code/python/lpython/src/lpython/python_ast.h:6, from D:/code/python/lpython/src/lpython/pickle.h:4, from D:/code/python/lpython/src/lpython/pickle.cpp:3: In constructor 'LCompilers::diag::Span::Span(LCompilers::diag::Span&&)', inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/new_allocator.h:175:4, inlined from 'static void std::allocator_traits >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = LCompilers::diag::Span; _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span]' at C:/msys64/mingw64/include/c++/12.1.0/bits/alloc_traits.h:516:17, inlined from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {LCompilers::diag::Span}; _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/vector.tcc:117:30, inlined from 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = LCompilers::diag::Span; _Alloc = std::allocator]' at C:/msys64/mingw64/include/c++/12.1.0/bits/stl_vector.h:1294:21, inlined from 'LCompilers::diag::Label::Label(const std::string&, const std::vector&, bool)' at D:/code/python/lpython/src/libasr/diagnostics.h:54:28, inlined from 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)' at D:/code/python/lpython/src/libasr/diagnostics.h:139:5: D:/code/python/lpython/src/libasr/diagnostics.h:15:8: warning: '*(__vector(4) unsigned int*)((char*)& + offsetof(LCompilers::diag::Span, LCompilers::diag::Span::first_line))' may be used uninitialized [-Wmaybe-uninitialized] 15 | struct Span { | ^~~~ D:/code/python/lpython/src/libasr/diagnostics.h: In member function 'void LCompilers::diag::Diagnostics::message_label(const std::string&, const std::vector&, const std::string&, const LCompilers::diag::Level&, const LCompilers::diag::Stage&)': D:/code/python/lpython/src/libasr/diagnostics.h:54:37: note: '' declared here 54 | spans.push_back(Span(loc)); | ^ ninja: build stopped: subcommand failed. (lp) D:\code\python\lpython> ``` [call build1.bat.txt](https://github.com/lcompilers/lpython/files/12249295/call.build1.bat.txt)
Thirumalai-Shaktivel commented 1 year ago

Thanks, @liudonghua123 for trying out LPython!! Currently, we don't support building the LPython using minGW, can you try MSVC? If MSVC is already installed on your system, try calling the following in the mini forge command prompt: call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd" -arch=x64 (See: https://github.com/lcompilers/lpython#windows).

Or you can also try installing lpython using conda on Windows and see if that helps.

liudonghua123 commented 1 year ago

Yes, I forget to execute call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd" -arch=x64.

And I also got the following errors after I use MSVC build tools even I execute chcp 65001.

......
[5/83] Building CXX object src\libasr\CMakeFiles\asr.dir\codegen\asr_to_x86.cpp.obj
FAILED: src/libasr/CMakeFiles/asr.dir/codegen/asr_to_x86.cpp.obj
C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe  /nologo /TP -DHAVE_TARGET_X86=1 -DHAVE_WHEREAMI=1 -DHAVE_ZLIB=1 -DLCOMPILERS_FAST_ALLOC=1 -ID:\code\python\lpython\src\libasr\.. -external:ID:\apps\mambaforge\envs\lp\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\asr_to_x86.cpp.obj /Fdsrc\libasr\CMakeFiles\asr.dir\asr.pdb /FS -c D:\code\python\lpython\src\libasr\codegen\asr_to_x86.cpp
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
D:\code\python\lpython\src\libasr\..\libasr/location.h(18): warning C4267: 'return': conversion from 'size_t' to 'uint32_t', possible loss of data
D:\code\python\lpython\src\libasr\..\libasr/location.h(19): warning C4267: 'initializing': conversion from 'size_t' to 'uint32_t', possible loss of data
D:\code\python\lpython\src\libasr\..\libasr/location.h(201): warning C4267: 'initializing': conversion from 'size_t' to 'uint32_t', possible loss of data
D:\code\python\lpython\src\libasr\..\libasr/alloc.h(70): warning C4101: 'e': unreferenced local variable
D:\code\python\lpython\src\libasr\..\libasr/asr.h(5702): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6533): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6549): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6559): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6605): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6622): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6666): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6732): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6752): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6760): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6824): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6862): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6950): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(6988): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(7049): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(7125): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(7151): error C2001: newline in constant
D:\code\python\lpython\src\libasr\..\libasr/asr.h(7280): error C2001: newline in constant
......

TO FIX THIS error C2001: newline in constant ERROR, I NEED TO CHECK Beta: Use Unicode UTF-8 for worldwide language support.

image

Now I have build it successfully. Thanks! :)

......
[81/82] Install the project...-- Install configuration: "Release"
-- Installing: D:/code/python/lpython/inst/bin/msvcp140.dll
-- Installing: D:/code/python/lpython/inst/bin/msvcp140_1.dll
-- Installing: D:/code/python/lpython/inst/bin/msvcp140_2.dll
-- Installing: D:/code/python/lpython/inst/bin/msvcp140_atomic_wait.dll
-- Installing: D:/code/python/lpython/inst/bin/msvcp140_codecvt_ids.dll
-- Installing: D:/code/python/lpython/inst/bin/vcruntime140_1.dll
-- Installing: D:/code/python/lpython/inst/bin/vcruntime140.dll
-- Installing: D:/code/python/lpython/inst/bin/concrt140.dll
-- Up-to-date: D:/code/python/lpython/inst/bin
-- Installing: D:/code/python/lpython/inst/bin/lpython.exe
-- Installing: D:/code/python/lpython/inst/share/lpython/lib/lpython_runtime.lib
-- Installing: D:/code/python/lpython/inst/bin/lpython_runtime.dll
-- Installing: D:/code/python/lpython/inst/share/lpython/lib/lpython_runtime_static.lib
liudonghua123 commented 1 year ago

However, I got the following errors when I tried to execute Tests and examples. Did I forget something?

ctest
inst\bin\lpython examples\expr2.py
inst\bin\lpython examples\expr2.py -o a.out
a.out
(lp) D:\code\python\lpython>ctest
Test project D:/code/python/lpython
    Start 1: test_stacktrace
1/2 Test #1: test_stacktrace ..................   Passed    0.04 sec
    Start 2: test_lpython
2/2 Test #2: test_lpython .....................   Passed    0.18 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.23 sec

(lp) D:\code\python\lpython>inst\bin\lpython examples\expr2.py
semantic error: Could not find the module 'lpython'. If an import path is available, please use the `-I` option to specify it
 --> examples\expr2.py:1:1
  |
1 | from lpython import i32
  | ^^^^^^^^^^^^^^^^^^^^^^^

Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that must be fixed).

(lp) D:\code\python\lpython>inst\bin\lpython examples\expr2.py -o a.out
semantic error: Could not find the module 'lpython'. If an import path is available, please use the `-I` option to specify it
 --> examples\expr2.py:1:1
  |
1 | from lpython import i32
  | ^^^^^^^^^^^^^^^^^^^^^^^

Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that must be fixed).

(lp) D:\code\python\lpython>
Thirumalai-Shaktivel commented 1 year ago

Happy that you were able to build successfully!!! Recently someone had the same issue, check out: https://github.com/lcompilers/lpython/issues/2234. Let us know, if it fixes the problem.