If you get errors like this when trying to compile pthreads for PHP 7.2, see the article Installing PHP 7.2 with pthreads on CentOS 6 for a solution.
[root@parox03 /home/files/php-7.2.1/ext/pthreads]# make
/bin/sh /home/files/php-7.2.1/ext/pthreads/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/files/php-7.2.1/ext/pthreads -DPHP_ATOM_INC -I/home/files/php-7.2.1/ext/pthreads/include -I/home/files/php-7.2.1/ext/pthreads/main -I/home/files/php-7.2.1/ext/pthreads -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/home/files/php-7.2.1/ext/pthreads/. -DHAVE_CONFIG_H -g -O2 -c /home/files/php-7.2.1/ext/pthreads/php_pthreads.c -o php_pthreads.lo
mkdir .libs
cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/files/php-7.2.1/ext/pthreads -DPHP_ATOM_INC -I/home