Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhprof-0.10.3 compile failures with Ubuntu-13.10 + Apache-2.4.6 + PHP-5.5.3 #78

Open
davidfavor opened this issue Jan 3, 2014 · 4 comments

Comments

@davidfavor
Copy link

Using git version which has line...

define XHPROF_VERSION "0.10.3"

Building on latest Ubuntu... software versions follow + error spew...

net1# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

net1# uname -a
Linux net1.bizcooker.com 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

net1# apache2 -version
Server version: Apache/2.4.6 (Ubuntu)
Server built: Dec 5 2013 18:32:22

PHP 5.5.3-1ubuntu2.1 (cli) (built: Dec 12 2013 04:24:35)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
... ... ...
net1# phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212

net1# ./configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -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
checking for PHP extension directory... /usr/lib/php5/20121212
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking whether to enable xhprof support... yes, shared
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands

net1# make
/bin/bash /smartbuild/work/xhprof.git/extension/libtool --mode=compile cc -I. -I/smartbuild/work/xhprof.git/extension -DPHP_ATOM_INC -I/smartbuild/work/xhprof.git/extension/include -I/smartbuild/work/xhprof.git/extension/main -I/smartbuild/work/xhprof.git/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 -O2 -c /smartbuild/work/xhprof.git/extension/xhprof.c -o xhprof.lo
libtool: compile: cc -I. -I/smartbuild/work/xhprof.git/extension -DPHP_ATOM_INC -I/smartbuild/work/xhprof.git/extension/include -I/smartbuild/work/xhprof.git/extension/main -I/smartbuild/work/xhprof.git/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 -O2 -c /smartbuild/work/xhprof.git/extension/xhprof.c -fPIC -DPIC -o .libs/xhprof.o
In file included from /usr/include/php5/main/php.h:33:0,
from /smartbuild/work/xhprof.git/extension/xhprof.c:27:
/usr/include/php5/main/php_config.h:2366:0: warning: "_GNU_SOURCE" redefined [enabled by default]
#define _GNU_SOURCE 1
^
/smartbuild/work/xhprof.git/extension/xhprof.c:24:0: note: this is the location of the previous definition

define _GNU_SOURCE

^
/smartbuild/work/xhprof.git/extension/xhprof.c: In function 'hp_get_function_name':
/smartbuild/work/xhprof.git/extension/xhprof.c:972:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
func = curr_func->common.function_name;
^
/smartbuild/work/xhprof.git/extension/xhprof.c:1042:9: warning: passing argument 1 of 'hp_get_base_filename' discards 'const' qualifier from pointer target type [enabled by default]
filename = hp_get_base_filename((curr_func->op_array).filename);
^
/smartbuild/work/xhprof.git/extension/xhprof.c:926:14: note: expected 'char ' but argument is of type 'const char *'
static char *hp_get_base_filename(char *filename) {
^
/smartbuild/work/xhprof.git/extension/xhprof.c: In function 'hp_execute_internal':
/smartbuild/work/xhprof.git/extension/xhprof.c:1715:36: error: 'zend_execute_data' has no member named 'Ts'
#define EX(element) ((execute_data)->element)
^
/smartbuild/work/xhprof.git/extension/xhprof.c:1716:51: note: in expansion of macro 'EX'
#define EX_T(offset) (
(temp_variable _)((char *) EX(Ts) + offset))
^
/smartbuild/work/xhprof.git/extension/xhprof.c:1741:30: note: in expansion of macro 'EX_T'
temp_variable *retvar = &EX_T(opline->result.var);
^
/smartbuild/work/xhprof.git/extension/xhprof.c: In function 'hp_compile_file':
/smartbuild/work/xhprof.git/extension/xhprof.c:1785:3: warning: passing argument 1 of 'hp_get_base_filename' discards 'const' qualifier from pointer target type [enabled by default]
filename = hp_get_base_filename(file_handle->filename);
^
/smartbuild/work/xhprof.git/extension/xhprof.c:926:14: note: expected 'char *' but argument is of type 'const char *'
static char *hp_get_base_filename(char *filename) {
^
/smartbuild/work/xhprof.git/extension/xhprof.c: In function 'hp_begin':
/smartbuild/work/xhprof.git/extension/xhprof.c:1853:19: error: lvalue required as left operand of assignment
zend_execute = hp_execute;
^
/smartbuild/work/xhprof.git/extension/xhprof.c:1856:28: warning: assignment from incompatible pointer type [enabled by default]
_zend_execute_internal = zend_execute_internal;
^
/smartbuild/work/xhprof.git/extension/xhprof.c:1861:29: warning: assignment from incompatible pointer type [enabled by default]
zend_execute_internal = hp_execute_internal;
^
/smartbuild/work/xhprof.git/extension/xhprof.c: In function 'hp_stop':
/smartbuild/work/xhprof.git/extension/xhprof.c:1926:25: error: lvalue required as left operand of assignment
zend_execute = _zend_execute;
^
/smartbuild/work/xhprof.git/extension/xhprof.c:1927:25: warning: assignment from incompatible pointer type [enabled by default]
zend_execute_internal = zend_execute_internal;
^
make: *
* [xhprof.lo] Error 1

@preinheimer
Copy link
Owner

Hi,
You've probably moved on, but I would take a look at UProfiler: https://github.com/FriendsOfPHP/uprofiler

@aik099
Copy link
Collaborator

aik099 commented Sep 5, 2014

Actually UProfiler seems to fork your library. The only difference I've spotted so far (except for all function prefix change) is ability to create diffs between recorded profile sessions to see what has been improved more easily.

@preinheimer
Copy link
Owner

Drats. People had been telling me it was a better maintained version of the actual profiller. I'll keep looking. thanks for letting me know.

@preinheimer preinheimer reopened this Sep 5, 2014
@liuqian1990
Copy link

/bin/sh /home/soft/xhprof/extension/libtool --mode=compile cc -I. -I/home/soft/xhprof/extension -DPHP_ATOM_INC -I/home/soft/xhprof/extension/include -I/home/soft/xhprof/extension/main -I/home/soft/xhprof/extension -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/soft/xhprof/extension/xhprof.c -o xhprof.lo
mkdir .libs
cc -I. -I/home/soft/xhprof/extension -DPHP_ATOM_INC -I/home/soft/xhprof/extension/include -I/home/soft/xhprof/extension/main -I/home/soft/xhprof/extension -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/soft/xhprof/extension/xhprof.c -fPIC -DPIC -o .libs/xhprof.o
/home/soft/xhprof/extension/xhprof.c: In function ‘hp_get_function_name’:
/home/soft/xhprof/extension/xhprof.c:972: warning: assignment discards qualifiers from pointer target type
/home/soft/xhprof/extension/xhprof.c:1042: warning: passing argument 1 of ‘hp_get_base_filename’ discards qualifiers from pointer target type
/home/soft/xhprof/extension/xhprof.c:926: note: expected ‘char ’ but argument is of type ‘const char *’
/home/soft/xhprof/extension/xhprof.c: In function ‘hp_execute_internal’:
/home/soft/xhprof/extension/xhprof.c:1741: error: ‘zend_execute_data’ has no member named ‘Ts’
/home/soft/xhprof/extension/xhprof.c: In function ‘hp_compile_file’:
/home/soft/xhprof/extension/xhprof.c:1785: warning: passing argument 1 of ‘hp_get_base_filename’ discards qualifiers from pointer target type
/home/soft/xhprof/extension/xhprof.c:926: note: expected ‘char *’ but argument is of type ‘const char *’
/home/soft/xhprof/extension/xhprof.c: In function ‘hp_begin’:
/home/soft/xhprof/extension/xhprof.c:1853: error: lvalue required as left operand of assignment
/home/soft/xhprof/extension/xhprof.c:1856: warning: assignment from incompatible pointer type
/home/soft/xhprof/extension/xhprof.c:1861: warning: assignment from incompatible pointer type
/home/soft/xhprof/extension/xhprof.c: In function ‘hp_stop’:
/home/soft/xhprof/extension/xhprof.c:1926: error: lvalue required as left operand of assignment
/home/soft/xhprof/extension/xhprof.c:1927: warning: assignment from incompatible pointer type
make: *
* [xhprof.lo] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants