C compiler error: cdefs.h not found

(There are similar questions, but no one applies to this)

I have a board with Fedora 20 architecture and armv71 (32-bit). I installed all the gcc libraries through yum that are required, such as gcc , g++ , cmake , glibc , glibc-devel , etc. ( glibc-devel equivalent to libc6-dev-i386 in Fedora).

I am trying to compile a C project that compiles fine on 64bit MAC OS and 64bit Ubuntu, but gives me the following error in Fedora 20 when running make :

 /usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file or directory # include <sys/cdefs.h> 

When I check the folder /usr/include/sys , it is empty, and the cdefs.h file does not exist anywhere on the system.

The problem is that I am missing a package (maybe?), But I can’t figure out which one is missing, since I seem to have everything installed. Or did the 32-bit C compiler skip this file for a specific reason? Any help would be appreciated.

+6
source share
2 answers

using this command (or similar, depending on your OS)

 apt-get install libc6-dev-i386 
+3
source

Since you are on an RPM based distribution, you can do this:

 # yum provides '*sys/defs.h' 

and let the tool do the hard part.

0
source

Source: https://habr.com/ru/post/989730/


All Articles