Skip to content

Failed to build RustPython [Fail to compile] #2746

@bobsiunn

Description

@bobsiunn

After I clone RustPython, I build Rustpython by command "cargo run --release" and I could compile 331 files.
But when I try to compile 'rustpython-vm', it failed because of this error
Is there anyone who know how to fix it?

error[E0599]: no function or associated item named `try_from_object` found for struct `CString` in the current scope
    --> vm/src/stdlib/os.rs:1700:54
     |
1700 |                     let cstring = std::ffi::CString::try_from_object(vm, obj)?;
     |                                                      ^^^^^^^^^^^^^^^ function or associated item not found in `CString`
     |
     = help: items from traits can only be used if the trait is implemented and in scope
note: `pyobject::TryFromObject` defines an item `try_from_object`, perhaps you need to implement it
    --> vm/src/pyobject.rs:799:1
     |
799  | pub trait TryFromObject: Sized {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rustpython-vm`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

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