Skip to content

Build failed due to rustc temporaries in the out-of-tree case #1015

Closed
@ojeda

Description

@ojeda

Reported by Raphael Nestler at: https://rust-for-linux.zulipchat.com/#narrow/stream/291565-Help/topic/Out.20of.20tree.20module.20for.20mainline.20kernel/near/367742473

rustc outputs by default the temporary files (i.e. the ones saved by -Csave-temps, such as *.rcgu* files) in the current working directory when -o and --out-dir are not given (even if --emit=x=path is given, i.e. it does not use those for temporaries).

Since out-of-tree modules are compiled from the linux tree, rustc then tries to create them there, which may not be accessible.

Passing --out-dir explicitly, even if it is just for the temporary files, should solve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    • kbuildRelated to building the kernel, `make`, `Kbuild`, `Kconfig` options...

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions