X Tutup
The Wayback Machine - https://web.archive.org/web/20240928202508/https://github.com/RustPython/RustPython/issues/5394
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

Compile error:failed to resolve: could not find compile in vm #5394

Open
Masrawy2 opened this issue Aug 27, 2024 · 4 comments
Open

Compile error:failed to resolve: could not find compile in vm #5394

Masrawy2 opened this issue Aug 27, 2024 · 4 comments

Comments

@Masrawy2
Copy link

Hi all!
And thank you for the super interesting project.
I'm not sure if this is a bug or not - technically it's just a compile issue.

the code
https://github.com/xforce/netease-messiah-tools/blob/main/pyc/src/main.rs

error[E0433]: failed to resolve: could not find `compile` in `vm`
  --> pyc\src/main.rs:80:21
   |
80 |                 vm::compile::Mode::Exec,
   |                     ^^^^^^^ could not find `compile` in `vm`
   |
help: consider importing this enum
   |
1  + use rustpython_vm::compiler::Mode;
   |
help: if you import `Mode`, refer to it directly
   |
80 -                 vm::compile::Mode::Exec,
80 +                 Mode::Exec,
   |

error[E0061]: this method takes 2 arguments but 1 argument was supplied
   --> pyc\src/main.rs:66:31
    |
66  |             .map_err(|err| vm.new_syntax_error(&err));
    |                               ^^^^^^^^^^^^^^^^------ an argument of type `Option<&str>` is missing
@youknowone
Copy link
Member

Try to use vm::compiler::Mode::Exec and vm.new_syntax_error(&err, None) or source code instead of None.

The code looks older than your RustPython version.

@Masrawy2
Copy link
Author

Try to use vm::compiler::Mode::Exec and vm.new_syntax_error(&err, None) or source code instead of None.

The code looks older than your RustPython version.

this problem is fixed now Thanks
but there a problem else

error: linking with C:\mingw64\bin\gcc.exe failed: exit code: 1
x86_64-w64-mingw32/bin/ld.exe: cannot find -lffi: No such file or directory
collect2.exe: error: ld returned 1 exit status

@youknowone
Copy link
Member

It doesnt look related to RustPython

@youknowone
Copy link
Member

Is this resolved?

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

No branches or pull requests

4 participants
@youknowone @Masrawy2 and others
X Tutup