tideways / php-xhprof-extension

This XHProf PHP extension fork has outlived its purpose and is archived in favor of the revitalized https://github.com/longxinH/xhprof
https://tideways.com
Apache License 2.0
1.64k stars 209 forks source link

5 b3 build segfaults for s390x #72

Open andypost opened 5 years ago

andypost commented 5 years ago

I pushed upgrade to 5 beta 3 (for php 7.2) https://github.com/alpinelinux/aports/commit/2d7cbaa7a0838d0eab7176e61bbb3874892020f0

But build for x86 (not 64 bit) fails, log https://build.alpinelinux.org/buildlogs/build-edge-x86/testing/php7-tideways_xhprof/php7-tideways_xhprof-5.0_beta3-r1.log

In file included from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.h:1,
                 from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tideways_xhprof.c:13:
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h: In function 'time_milliseconds':
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h:79:13: error: a label can only be part of a statement and a declaration is not a statement
             int64_t ret;
             ^~~~~~~
In file included from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.h:1,
                 from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.c:11:
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h: In function 'time_milliseconds':
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h:79:13: error: a label can only be part of a statement and a declaration is not a statement
             int64_t ret;
             ^~~~~~~
make: *** [Makefile:196: tracing.lo] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:194: tideways_xhprof.lo] Error 1

Any idea what's wrong?

andypost commented 5 years ago

btw aarch64 build fails on

config.status: creating config.h
/bin/sh /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/libtool --mode=compile gcc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1    -I. -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -DPHP_ATOM_INC -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/include -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/main -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib  -Os -fomit-frame-pointer -DHAVE_CONFIG_H  -Os -fomit-frame-pointer   -c /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tideways_xhprof.c -o tideways_xhprof.lo 
/bin/sh /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/libtool --mode=compile gcc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1    -I. -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -DPHP_ATOM_INC -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/include -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/main -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib  -Os -fomit-frame-pointer -DHAVE_CONFIG_H  -Os -fomit-frame-pointer   -c /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.c -o tracing.lo 
mkdir .libs
mkdir .libs
mkdir: can't create directory '.libs': File exists
 gcc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -DPHP_ATOM_INC -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/include -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/main -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -Os -fomit-frame-pointer -DHAVE_CONFIG_H -Os -fomit-frame-pointer -c /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tideways_xhprof.c  -fPIC -DPIC -o .libs/tideways_xhprof.o
 gcc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -DPHP_ATOM_INC -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/include -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/main -I/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3 -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -Os -fomit-frame-pointer -DHAVE_CONFIG_H -Os -fomit-frame-pointer -c /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.c  -fPIC -DPIC -o .libs/tracing.o
In file included from /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.h:1,
                 from /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.c:11:
/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h: In function 'time_milliseconds':
/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h:89:2: error: #error You need to define CycleTimer for your OS and CPU
 #error You need to define CycleTimer for your OS and CPU
  ^~~~~
In file included from /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.h:1,
                 from /home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tideways_xhprof.c:13:
/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h: In function 'time_milliseconds':
/home/andypost/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h:89:2: error: #error You need to define CycleTimer for your OS and CPU
 #error You need to define CycleTimer for your OS and CPU
  ^~~~~
make: *** [Makefile:194: tideways_xhprof.lo] Error 1
andypost commented 5 years ago

and the same error on all arm* & s390x arches

andypost commented 5 years ago

Looks related https://github.com/google/benchmark/pull/540

andypost commented 5 years ago

x86, arm and ppc64 were fixed in https://github.com/tideways/php-xhprof-extension/pull/74

but s390x still segfailts - details https://github.com/tideways/php-xhprof-extension/pull/74#issuecomment-522457306