Closed Vipul-Cariappa closed 3 weeks ago
The test fails at https://github.com/lcompilers/lpython/actions/runs/9270724171/job/25504443902?pr=2718#step:10:486. But the same test passes here https://github.com/lcompilers/lpython/actions/runs/9270724171/job/25504445157?pr=2718#step:6:2.
Managed to reproduce the bug locally:
>>> 3 % 2
semantic error: Could not find the module 'lpython_builtin'. If an import path is available, please use the `-I` option to specify it
--> input:1:1
|
1 | 3 % 2
| ^^^^^
Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues.
I get the following in my local system. With update CMakeLists to copy runtime files commit.
warning: The module 'lpython_builtin' located in /home/vipul/Workspace/others/lpython/lpython-0.0.0=0/bin/src/bin/../runtime/lpython_builtin.py cannot be loaded
--> ./main.py:1:7
|
1 | print(3 % 2)
| ^^^^^ imported here
semantic error: Could not find the module 'lpython'. If an import path is available, please use the `-I` option to specify it
--> /home/vipul/Workspace/others/lpython/lpython-0.0.0=0/bin/src/bin/../runtime/lpython_builtin.py:1:1 - 2:35
|
1 | from lpython import (i8, i16, i32, i64, f32, f64, c32, c64, overload, u8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
...
|
2 | u16, u32, u64)
| ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues.
With the latest commits. The error is as follows:
>>> def id(x: f64) -> f64:
... return x
...
>>> def s(x: f64) -> f64:
... return id(-x)
...
>>> id(2.3)
JIT session error: Symbols not found: [ id ]
Internal Compiler Error: Unhandled exception
Traceback (most recent call last):
LCompilersException: lookup() failed to find the symbol '__main__global_stmts_3__', error: Failed to materialize symbols: { (Main, { __main__global_stmts_3__ }) }
Looks like LLVM JIT has some problem in creating the functions(?)
I am using this: jit.patch
Closed by #2706
to debug #2706