I am trying to compile the PHP xhprof extension. On one server, make
is successful, on another one it fails with "inline asm() not supported".
The relevant code is
asm volatile("rdtsc" : "=a" (__a), "=d" (__d));
Both servers run Debian with similar configuration.
Question: What package am I missing or which packages version should I compare between the servers to enable inline asm?
For reference the make output
/bin/sh /usr/local/src/xhprof/extension/libtool --mode=compile cc -I. -I/usr/local/src/xhprof/extension -DPHP_ATOM_INC -I/usr/local/src/xhprof/extension/include -I/usr/local/src/xhprof/extension/main -I/usr/local/src/xhprof/extension -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -c /usr/local/src/xhprof/extension/xhprof.c -o xhprof.lo
libtool: compile: cc -I. -I/usr/local/src/xhprof/extension -DPHP_ATOM_INC -I/usr/local/src/xhprof/extension/include -I/usr/local/src/xhprof/extension/main -I/usr/local/src/xhprof/extension -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -c /usr/local/src/xhprof/extension/xhprof.c -DPIC -o .libs/xhprof.o
/usr/local/src/xhprof/extension/xhprof.c:1224: inline asm() not supported
/usr/local/src/xhprof/extension/libtool: line 1111: 23098 Segmentation fault cc -I. -I/usr/local/src/xhprof/extension -DPHP_ATOM_INC -I/usr/local/src/xhprof/extension/include -I/usr/local/src/xhprof/extension/main -I/usr/local/src/xhprof/extension -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -c /usr/local/src/xhprof/extension/xhprof.c -DPIC -o .libs/xhprof.o
make: *** [xhprof.lo] Error 1
Apparently cc
on this machine is not a link to gcc
but to some other compiler (tcc
) which doesn't understand gcc's extended asm syntax.