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

Linux AArch64 build fails with missing include <features.h> #247

Closed
dprogm opened this issue Jan 22, 2024 · 1 comment
Closed

Linux AArch64 build fails with missing include <features.h> #247

dprogm opened this issue Jan 22, 2024 · 1 comment

Comments

@dprogm
Copy link

dprogm commented Jan 22, 2024

What is the issue?

When compiling a simple program that includes the <algorithm> header the compiler is raising the following error:

external/toolchains_llvm~override~llvm~llvm_toolchain_llvm/bin/../include/c++/v1/__config:261:14: fatal error: 'features.h' file not found
#    include <features.h>

How did you compile?

Used this .bazelrc

build --cxxopt=-std=c++17 --enable_bzlmod --incompatible_enable_cc_toolchain_resolution

On which platform did you compile?

AArch64 Linux, Ubuntu 22.04

What version did you use?

Version 0.10.3 with LLVM 17.04

This looks like a sysroot issue?

@siddharthab
Copy link
Contributor

features.h is a libc header. Short of a resolution on #155, you need to install glibc in your OS.

On Ubuntu 22.04, unless you are cross-compiling, the apt package libc6-dev is what you need (although it almost always comes preinstalled).

sudo apt-get install libc6-dev && (dpkg -L libc6-dev | grep features.h)

If this is not enough, please reopen the issue.

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