llvm / llvm/llvm-project

unknown type name '__BEGIN_DECLS' while building openmp offloading library for libcxxabi

Open
#180,983 0 comments 0 reactions 0 assignees View on GitHub
build-problem
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Here's the command I got so far,

`
cd llvm-project-21.1.8.src
mkdir build
cd build
cmake ../llvm -G "Unix Makefiles" \
-C ../offload/cmake/caches/Offload.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=

make
make install
`

But I'm facing some compilation errors,
`llvm-project-21.1.8.src/libcxxabi/src/cxa_guard_impl.h:57:
/usr/include/unistd.h:27:1: error: unknown type name '__BEGIN_DECLS'
27 | __BEGIN_DECLS`

Any idea how to fix the problem ?
I'm also wondering if the compiler can support openmp offloading to all GPUs from NVIDIA, AMD, and Intel?
Thanks,

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented CMake and Make commands from the issue, then inspect libcxxabi/src/cxa_guard_impl.h and the included /usr/include/unistd.h around the __BEGIN_DECLS diagnostic. Determine whether the failure is specific to this offloading configuration and document the supported GPU targets relevant to the question.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.