Skip to content

Compilation error: Could not find specification for target "x86_64-unknown-none-gnu" #28

@frol

Description

@frol
$ rustup run nightly make KERNEL_BUILD_PATH=/lib/modules/4.17.11-arch1/build/ CARGO=/home/frol/.cargo/bin/xargo
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --sysroot /home/frol/.xargo -Z force-unstable-if-unmarked --target x86_64-unknown-none-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 1)
--- stderr
error: Error loading target specification: Field target-c-int-width in target specification is required
  |
  = help: Use `--print target-list` for a list of built-in targets

I have updated the x86_64-unknown-none-gnu.json file with the version from rust-barebones-kernel, but still cannot get through error:

$ rustup run nightly make KERNEL_BUILD_PATH=/lib/modules/4.17.11-arch1/build/ CARGO=/home/frol/.cargo/bin/xargo
   Compiling core v0.1.0 (https://github.com/phil-opp/nightly-libcore.git#54571deb)
   Compiling kernel32-sys v0.2.2
   Compiling log v0.4.3
   Compiling clang-sys v0.5.4
error: Error loading target specification: Could not find specification for target "x86_64-unknown-none-gnu"
  |
  = help: Use `--print target-list` for a list of built-in targets

error: Could not compile `core`.
warning: build failed, waiting for other jobs to finish...
error: build failed
make[2]: *** [/mnt/storage/projects/linux-kernel-basecamp/rust.ko/build/Makefile:46: /mnt/storage/projects/linux-kernel-basecamp/rust.ko/build/libhello.a] Error 101
make[1]: *** [Makefile:1571: _module_/mnt/storage/projects/linux-kernel-basecamp/rust.ko/build] Error 2
make: *** [Makefile:36: all] Error 2

Can anyone help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions