llvm / llvm/Polygeist

Advice on getting libstdc++ headers?

Open
#55 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
624
Forks
170
PR merge metrics
No merged PRs in 30d

Description

First up, just wanted to say this is a really interesting project, I've got some curiosity about using it to do embedded DSL's in C++ through MLIR. If I'm barking up the wrong tree there, feel free to let me know.

But I'm testing this out on a small app

#include<Kokkos_Core.hpp>
int main(int argc, char* argv[]){
  Kokkos::initialize();
  Kokkos::finalize();
}

I can point mlir-clang at the Kokkos_Core header, but that includes and the like, and compilation dies when it sees stdarg and the like. I know that gcc-toolchain isn't supported, so I try a -I /home/projects/x86-64/gcc/11.1/include/c++/11.1.0/. Which bumps me into various versions of

/home/projects/x86-64/gcc/11.1/include/c++/11.1.0/bits/stringfwd.h:70:1: error: unknown type name '_GLIBCXX_BEGIN_NAMESPACE_CXX11'
_GLIBCXX_BEGIN_NAMESPACE_CXX11

Pretty much just "everything about _GLIBCXX doesn't exist." Any thoughts on a path forward here? Should I build libc++ and use that? Am I missing something obvious? Am I trying to do something the project isn't yet trying to support?

In any case, very cool idea, really looking forward to what you're doing here

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with mlir-clang, Kokkos_Core.hpp, and the referenced GCC 11.1 include path. The report provides no named source file, test, or concrete acceptance criterion; resolution would first need to establish whether GCC toolchains or libc++ are supported and document the resulting supported path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.