godotengine / godotengine/godot-cpp

Compile error: fatal error: sys/cdefs.h: No such file or directory [AND] fatal error: bits/c++config.h: No such file or directory

Open
#230 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

I was trying to compile it on Linux Ubuntu 16.04 and I had that error:

```
scons platform=linux generate_bindings=yes
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/core/String.o -c -fPIC -g -std=c++14 -Wwrite-strings -Og -m32 -I. -Igodot_headers -Iinclude -Iinclude/gen -Iinclude/core src/core/String.cpp
In file included from /usr/include/stdint.h:25:0,
from /usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:9,
from godot_headers/gdnative/string.h:38,
from include/core/String.hpp:4,
from src/core/String.cpp:1:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
scons: *** [src/core/String.o] Error 1
scons: building terminated because of errors.
```
I found out that I needed that lib: **libc6-dev-i386**
than I had this next error

`/usr/include/c++/5/cmath:41:28: fatal error: bits/c++config.h: No such file or directory`

Which was fixed installing those libs
- gcc-multilib
- g++-multilib

And it finally compiled

Have I forgotten to read it somewhere or it wasn't documented?
I've opened this issue because I thought that it might be useful to other people.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.