skvadrik / re2c

Lexer generator for C, C++, Go and Rust.

Home Page:https://re2c.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal error: stdlib.h: No such file or directory

michacassola opened this issue · comments

I am trying to build re2c with Autotools with GitHub Actions:
Build repo: https://github.com/unypkg/re2c
Latest run: https://github.com/unypkg/re2c/actions/runs/8741186605/job/23986620028
(Tried to copy what I found here: https://github.com/skvadrik/re2c/blob/3.1/.github/workflows/ci-autotools.yml)

I get the following error many times building the partial re2c:

/pkg/gcc/13.2.0/include/c++/13.2.0/cstdlib:79:15: fatal error: stdlib.h: No such file or directory
   79 | #include_next <stdlib.h>
      |               ^~~~~~~~~~

Yes gcc is supposed to be in that folder for unypkg and I have successfully compiled many programs in my unypkg environment.
Any hints on how to go about this problem would be very welcome!

I needed to put /uny/pkg/gcc/13.2.0/include/c++/13.2.0 with the correct stdlib.h before /uny/pkg/glibc/2.39/include with the wrong stdlib.h in the CPLUS_INCLUDE_PATH variable.

Glad you've figured it out!