BUPT-OS / RROS

RROS is a dual-kernel OS for satellites or other scenarios that need both real-time and general-purpose abilities. RROS = RTOS (Rust) + Linux (C).
https://bupt-os.github.io/website/
Other
580 stars 42 forks source link

Failed to build kernel #33

Closed rpashkoff closed 7 months ago

rpashkoff commented 7 months ago

I configured build environment in Docker using Dockerfile from manual and proceed with Quick start steps (https://bupt-os.github.io/website/docs/introduction/quick-start/). On Compile Kernel Step (4) I got the following error:

  RUSTC L rust/build_error.o
  EXPORTS rust/exports_alloc_generated.h
  RUSTC L rust/kernel.o
error[E0425]: cannot find function `skb_alloc_oob_head` in module `bindings`
  --> rust/kernel/skbuff.rs:11:24
   |
11 |     unsafe { bindings::skb_alloc_oob_head(gfp_mask) }
   |                        ^^^^^^^^^^^^^^^^^^ not found in `bindings`

error[E0425]: cannot find function `__netdev_alloc_oob_skb` in module `bindings`
      --> rust/kernel/skbuff.rs:35:24
       |
35     |       unsafe { bindings::__netdev_alloc_oob_skb(dev, len, gfp_mask) }
       |                          ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `__netdev_alloc_skb`
       | 
      ::: /root/RROS/rust/bindings_generated.rs:132602:5
       |
132602 | /     pub fn __netdev_alloc_skb(
132603 | |         dev: *mut net_device,
132604 | |         length: c_types::c_uint,
132605 | |         gfp_mask: gfp_t,
132606 | |     ) -> *mut sk_buff;
       | |______________________- similarly named function `__netdev_alloc_skb` defined here

error: aborting due to 2 previous errors

kindly ask to help to resolve it

Richardhongyu commented 7 months ago

It seems the .config file is not correctly configured. You can have the right .config with make LLVM=1 rros_defconfig.

rpashkoff commented 7 months ago

Thanks, build successfull now