Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added initial implementation for supporting internal function definitions #2119

Merged

Conversation

arteevraina
Copy link
Collaborator

Towards: #2006

@certik
Copy link
Contributor

certik commented Jul 8, 2023

We are getting some error messages at the CI:

Internal Compiler Error: Unhandled exception
Traceback (most recent call last):
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0x9a01d4
  Binary file "/lib/x86_64-linux-gnu/libc.so.6", local address: 0x29e3f
  Binary file "/lib/x86_64-linux-gnu/libc.so.6", local address: 0x29d8f
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0x9afc09
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0x9a71c7
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xa7699d
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xa76344
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xaac25c
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xadf5ed
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xa8aafd
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xaaef5f
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xadf5ed
  Binary file "/home/runner/work/lpython/lpython/src/bin/lpython", local address: 0xa8ad19
LCompilersException: visit_Pass() not implemented
make[2]: *** [CMakeFiles/const_03_FAST.dir/build.make:74: const_03_FAST.o] Error 1

Not sure where they care coming from, but we need to fix it.

@arteevraina arteevraina force-pushed the internal-function-def-implementation branch from 70894a2 to 4a93c27 Compare July 11, 2023 15:00
@arteevraina
Copy link
Collaborator Author

arteevraina commented Jul 14, 2023

Hi @certik ,

The remaining CI's are failing and giving this as stacktrace:

Traceback (most recent call last):
+ rm -rf /Users/runner/work/lpython/lpython/integration_tests/_lpython-tmp-test-wasm_x86
  File "ci/test.xsh", line 26, in <module>
+ rm -rf /Users/runner/work/lpython/lpython/integration_tests/_lpython-tmp-test-wasm_x64
  File "/usr/local/miniconda/envs/test/lib/python3.10/site-packages/xonsh/built_ins.py", line 196, in subproc_captured_hiddenobject
+ rm -rf /Users/runner/work/lpython/lpython/integration_tests/_lpython-tmp-test-c_py
    return xonsh.procs.specs.run_subproc(cmds, captured="hiddenobject", envs=envs)
+ rm -rf /Users/runner/work/lpython/lpython/integration_tests/_lpython-tmp-test-c_sym
  File "/usr/local/miniconda/envs/test/lib/python3.10/site-packages/xonsh/procs/specs.py", line 900, in run_subproc
+ rm -rf /Users/runner/work/lpython/lpython/integration_tests/_lpython-tmp-test-cpython_sym
    return _run_specs(specs, cmds)
+ mkdir /Users/runner/work/lpython/lpython/integration_tests/_lpython-tmp-test-llvm
  File "/usr/local/miniconda/envs/test/lib/python3.10/site-packages/xonsh/procs/specs.py", line 933, in _run_specs
+ cmake -DKIND=llvm -DFAST=yes -DPYTHON_LIBS_REQ=no ..
    command.end()
+ make -j16
  File "/usr/local/miniconda/envs/test/lib/python3.10/site-packages/xonsh/procs/pipelines.py", line 458, in end
Command failed: make -j16
    self._end(tee_output=tee_output)
ci/test.xsh:7:src/bin/lpython --version
  File "/usr/local/miniconda/envs/test/lib/python3.10/site-packages/xonsh/procs/pipelines.py", line 477, in _end
ci/test.xsh:9:src/bin/lpython -c examples/expr2.py -o expr2.o
    self._raise_subproc_error()
ci/test.xsh:10:src/bin/lpython -o expr2 expr2.o
  File "/usr/local/miniconda/envs/test/lib/python3.10/site-packages/xonsh/procs/pipelines.py", line 599, in _raise_subproc_error
ci/test.xsh:11:./expr2
    raise subprocess.CalledProcessError(rtn, spec.args, output=self.output)
ci/test.xsh:14:src/bin/lpython --show-ast tests/doconcurrentloop_01.py
subprocess.CalledProcessError: Command '['python', 'run_tests.py', '-j16', '-b', 'llvm', 'cpython', 'c', 'wasm', '-f']' returned non-zero exit status 1.
make[2]: *** [func_internal_def_01_FAST.o] Segmentation fault: 11
[ 95%] Generating bit_operations_i32_FAST.o
make[1]: *** [CMakeFiles/func_internal_def_01_FAST.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I think tests are still trying to generate C code and then the missing implementation error comes in for the internally defined functions.

Can these error be possible because of this as it is trying to generate C code ?

@arteevraina
Copy link
Collaborator Author

I have removed it to test 551997b. Let's see if ci works now.

@certik
Copy link
Contributor

certik commented Jul 14, 2023

The failure is:

make[2]: *** [CMakeFiles/func_internal_def_01_FAST.dir/build.make:74: func_internal_def_01_FAST.o] Segmentation fault (core dumped)
make[1]: *** [CMakeFiles/Makefile2:5822: CMakeFiles/func_internal_def_01_FAST.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

ci/test.xsh Outdated Show resolved Hide resolved
@arteevraina arteevraina marked this pull request as ready for review July 15, 2023 04:38
@arteevraina arteevraina force-pushed the internal-function-def-implementation branch from c659ea1 to 994964a Compare July 15, 2023 04:47
@arteevraina
Copy link
Collaborator Author

Hi @certik ,
Sorry, tried updating this branch with base branch and forced pushed without pulling your changes. Sorry about that.
But, I have added those changes in my new commits and marked this PR as ready for review.

@certik certik enabled auto-merge (squash) July 15, 2023 05:19
@certik certik merged commit 47bd6d5 into lcompilers:main Jul 15, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants