在Makefile中添加PTHREAD_STACK_MIN定义
在编译buildroot时可能会出现以下问题:
fatal error: bits/pthreadtypes.h: No such file or directory
compilation terminated.
make[2]: *** [libuClibc++/locale.o] Error 1
...
genimage -p ext4
/bin/bash: line 2: 21308 Segmentation fault (core dumped) genimage -p ext4
Makefile:511: recipe for target 'images' failed
make[1]: *** [images] Error 139
make[1]: Leaving directory '/home/user/buildroot'
Makefile:81: recipe for target '_all' failed
make: *** [_all] Error 2
这个问题可能是由于缺少pthreadtypes.h
文件导致的。可以通过在Makefile中添加PTHREAD_STACK_MIN定义,来解决这个问题。方法如下:
在buildroot目录下,找到Makefile.in
文件,然后在这个文件的开头添加以下代码:
# Fix problem with compiling on some systems
PTHREAD_STACK_MIN=16384
然后重新运行buildroot编译即可。