GithubHelp home page GithubHelp logo

Comments (2)

Mihnea27 avatar Mihnea27 commented on June 3, 2024

Compiling Unikraft with lib-ukrust included results in the following error initially and then on subsequent compiles it results in the initial error reported:

mihnea27@mihnea27-debian-desktop:~/git/unikraft$ RUST_BACKTRACE=full make
  LN      Makefile
  CP      config
  MKDIR   lxdialog
  MAKE    kconfig
  GEN     config.h
  GEN     libuklibid: libraries.in.new
  CP      libuklibid: libraries.in
   BINDGEN  libukrust: bindings_generated.rs
/home/mihnea27/git/unikraft/lib/uklibid/include/uk/libid.h:11:10: fatal error: 'uk/bits/libid.h' file not found
thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/home/mihnea27/git/unikraft/lib/uklibid/include/uk/libid.h:11:10: fatal error: 'uk/bits/libid.h' file not found\n")', src/main.rs:48:36
stack backtrace:
   0:     0x56404a7da30c - <unknown>
   1:     0x56404a7ee8fe - <unknown>
   2:     0x56404a7b2601 - <unknown>
   3:     0x56404a7be67e - <unknown>
   4:     0x56404a7be2e7 - <unknown>
   5:     0x56404a7beb91 - <unknown>
   6:     0x56404a7dad37 - <unknown>
   7:     0x56404a7da424 - <unknown>
   8:     0x56404a7be842 - <unknown>
   9:     0x56404a5ce8f3 - <unknown>
  10:     0x56404a5ce9d3 - <unknown>
  11:     0x56404a5e1f77 - <unknown>
  12:     0x56404a5eb957 - <unknown>
  13:     0x56404a5e2283 - <unknown>
  14:     0x56404a5e4619 - <unknown>
  15:     0x56404a7b1f15 - <unknown>
  16:     0x56404a5ebcb8 - <unknown>
  17:     0x7fbf5d5cf1ca - <unknown>
  18:     0x7fbf5d5cf285 - __libc_start_main
  19:     0x56404a5ceb41 - <unknown>
  20:                0x0 - <unknown>
make[1]: *** [/home/mihnea27/git/unikraft/lib/ukrust/Makefile.uk:28: /home/mihnea27/git/unikraft/build/libukrust/bindings_generated.rs] Error 1
make: *** [Makefile:1156: sub-make] Error 2

The error comes from this line https://github.com/unikraft/unikraft/blob/97523b55ac9e1327f7294da1feec8d4869da534d/lib/ukrust/Makefile.uk#L28C2-L28C2 that calls bindgen to generate the Rust bindings

from unikraft.

cocodery avatar cocodery commented on June 3, 2024

Yeah, I meet this problem too.
Besides, I find another sub-problem related.
Each time when you run command make after clean, which has select libukrust, you will get an error message like that

fatal error: 'uk/bits/libid.h' file not found

I trace commands generated by make --just-print and it shows part of it below
And you have too run twice to avoid this sub-problem.
I think it needs to do change the order of generated commands to fix.

printf ' %-7s %s\n' 'GEN' 'libuklibid':' libraries.in.new' && /bin/bash libraries.in.new.cmd
printf ' %-7s %s\n' 'CP' 'libuklibid':' libraries.in' && /bin/bash libraries.in.cmd
printf ' %-7s %s\n' ' RUSTC' ' libukrust':' ukrust_sys.o' && /bin/bash ukrust_sys.o.cmd
printf ' %-7s %s\n' ' RUSTC' ' libukrust':' alloc.o' && /bin/bash alloc.o.cmd
printf ' %-7s %s\n' 'AWK' 'libuklibid':' libid.h' && /bin/bash /home/cocodery/workspace/proj/unikraft/hello-world/helloworld-rust/build/libuklibid/include/uk/bits/libid.h.cmd
printf ' %-7s %s\n' 'AWK' 'libuklibid':' namemap.c' && /bin/bash /home/cocodery/workspace/proj/unikraft/hello-world/helloworld-rust/build/libuklibid/namemap.c.cmd
printf ' %-7s %s\n' 'AWK' 'libuklibid':' selfids.c' && /bin/bash /home/cocodery/workspace/proj/unikraft/hello-world/helloworld-rust/build/libuklibid/selfids.c.cmd

from unikraft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.