Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inttypes.h not found #42

Open
konradmoesch opened this issue Feb 15, 2024 · 3 comments
Open

inttypes.h not found #42

konradmoesch opened this issue Feb 15, 2024 · 3 comments

Comments

@konradmoesch
Copy link

Trying to run west build -p auto -b nrf52dk_nrf52832 samples/rust-app/, but I get:

/usr/lib/llvm-14/lib/clang/14.0.0/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/usr/lib/llvm-14/lib/clang/14.0.0/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found\n")', src/main.rs:53:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  thread 'main' panicked at 'assertion failed: rc.success()', /home/km/zephyr-rust/rust/zephyr-sys/build.rs:11:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I installed clang (apt install clang clangd), build-essential and also tried installing libc++-dev, libc-dev and libstdc++-dev and the whole block from your Dockerfile (git cmake ninja-build gperf bzip2 \ ccache dfu-util device-tree-compiler wget \ python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ make gcc gcc-multilib g++-multilib libsdl2-dev)
What am I missing?

@sprhawk
Copy link
Contributor

sprhawk commented Mar 4, 2024

@konradmoesch

Same here.

Do you any luck to work around it ?

@konradmoesch
Copy link
Author

I had to install an older version of clang (v14.0.0 i think) to resolve some linker errors. Maybe I also changed the include paths, not sure about this.
The latter might also only be necessary for my native Windows toolchain and not for linux/WSL, though.

@sprhawk
Copy link
Contributor

sprhawk commented Mar 5, 2024

I had to install an older version of clang (v14.0.0 i think) to resolve some linker errors. Maybe I also changed the include paths, not sure about this. The latter might also only be necessary for my native Windows toolchain and not for linux/WSL, though.

I searched inside zephyr (2.4.99 from nRF Connect SDK), only minimal libc has that inttypes.h, so I added CONFIG_MINIMAL_LIBC=y to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants