Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22145

Building cross compiler: pthread.h: No such file or directory

$
0
0

I'm currently trying to compile my own gcc 9.1.0 cross compiler for aarch64-linux-gnu target. I used this tutorial: https://wiki.osdev.org/GCC_Cross-Compiler

The compile progress for the gcc and g++ compiler seems to finish without errors, but allways when I try to compile libgcc with the command make all-target-libgcc I run into this error:

In file included from ../../../gcc-9.1.0/libgcc/gthr.h:148,                 from ../../../gcc-9.1.0/libgcc/libgcov-interface.c:27:./gthr-default.h:35:10: fatal error: pthread.h: No such file or directory   35 | #include <pthread.h>      |          ^~~~~~~~~~~compilation terminated.

g++ --version on my build maschine prints:

g++ (GCC) 9.1.0Copyright (C) 2019 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And my configuration command for gcc is:../gcc-9.1.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --without-headersWith:

export TARGET=aarch64-linux-gnuexport PREFIX=/opt/aarch64-linux-gnu

What do I forget?


Viewing all articles
Browse latest Browse all 22145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>