FAQ
Hello !

I'm currently trying to compile the trunk with dtrace under FreeBSD 8
with revision 298979 and i have the following problem :

# ./buildconf
# ./configure --enable-dtrace
#make
...
local/include -g -O2 -fvisibility=hidden -c
/usr/home/fch/php/TSRM/tsrm_strtok_r.c -o TSRM/tsrm_strtok_r.lo
/bin/sh /usr/home/fch/php/libtool --silent --preserve-dup-deps
--mode=compile cc -ITSRM/ -I/usr/home/fch/php/TSRM/ -DPHP_ATOM_INC
-I/usr/home/fch/php/include -I/usr/home/fch/php/main -I/usr/home/fch/php
-I/usr/home/fch/php/ext/date/lib -I/usr/home/fch/php/ext/ereg/regex
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/home/fch/php/ext/sqlite3/libsqlite -I/usr/home/fch/php/TSRM
-I/usr/home/fch/php/Zend -I/usr/local/include -g -O2
-fvisibility=hidden -c /usr/home/fch/php/TSRM/tsrm_virtual_cwd.c -o
TSRM/tsrm_virtual_cwd.lo
/bin/sh /usr/home/fch/php/libtool --silent --preserve-dup-deps
--mode=compile cc -Imain/ -I/usr/home/fch/php/main/ -DPHP_ATOM_INC
-I/usr/home/fch/php/include -I/usr/home/fch/php/main -I/usr/home/fch/php
-I/usr/home/fch/php/ext/date/lib -I/usr/home/fch/php/ext/ereg/regex
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/home/fch/php/ext/sqlite3/libsqlite -I/usr/home/fch/php/TSRM
-I/usr/home/fch/php/Zend -I/usr/local/include -g -O2
-fvisibility=hidden -c /usr/home/fch/php/main/main.c -o main/main.lo
In file included from /usr/home/fch/php/main/main.c:84:
/path/to/php/Zend/zend_dtrace.h:40:29: error: zend_dtrace_gen.h: No such
file or directory

Any suggestion ?
All my apologize if it's not the good place to report this.

Best regards,
Fred

Search Discussions

  • David Soria Parra at May 6, 2010 at 11:21 am
    FreeBSD Dtrace is known to be broken because of a syntax issue somewhere
    in their DTrace scripts that are included by default. FreeBSD dtrace is
    not supported at the moment.

    David
    On 2010-05-06, Frederic Hardy wrote:
    Hello !

    I'm currently trying to compile the trunk with dtrace under FreeBSD 8
    with revision 298979 and i have the following problem :

    # ./buildconf
    # ./configure --enable-dtrace
    #make
    ...
    local/include -g -O2 -fvisibility=hidden -c
    /usr/home/fch/php/TSRM/tsrm_strtok_r.c -o TSRM/tsrm_strtok_r.lo
    /bin/sh /usr/home/fch/php/libtool --silent --preserve-dup-deps
    --mode=compile cc -ITSRM/ -I/usr/home/fch/php/TSRM/ -DPHP_ATOM_INC
    -I/usr/home/fch/php/include -I/usr/home/fch/php/main -I/usr/home/fch/php
    -I/usr/home/fch/php/ext/date/lib -I/usr/home/fch/php/ext/ereg/regex
    -I/usr/local/include/libxml2 -I/usr/local/include
    -I/usr/home/fch/php/ext/sqlite3/libsqlite -I/usr/home/fch/php/TSRM
    -I/usr/home/fch/php/Zend -I/usr/local/include -g -O2
    -fvisibility=hidden -c /usr/home/fch/php/TSRM/tsrm_virtual_cwd.c -o
    TSRM/tsrm_virtual_cwd.lo
    /bin/sh /usr/home/fch/php/libtool --silent --preserve-dup-deps
    --mode=compile cc -Imain/ -I/usr/home/fch/php/main/ -DPHP_ATOM_INC
    -I/usr/home/fch/php/include -I/usr/home/fch/php/main -I/usr/home/fch/php
    -I/usr/home/fch/php/ext/date/lib -I/usr/home/fch/php/ext/ereg/regex
    -I/usr/local/include/libxml2 -I/usr/local/include
    -I/usr/home/fch/php/ext/sqlite3/libsqlite -I/usr/home/fch/php/TSRM
    -I/usr/home/fch/php/Zend -I/usr/local/include -g -O2
    -fvisibility=hidden -c /usr/home/fch/php/main/main.c -o main/main.lo
    In file included from /usr/home/fch/php/main/main.c:84:
    /path/to/php/Zend/zend_dtrace.h:40:29: error: zend_dtrace_gen.h: No such
    file or directory

    Any suggestion ?
    All my apologize if it's not the good place to report this.

    Best regards,
    Fred
  • Antony Dovgal at May 6, 2010 at 11:56 am

    On 06.05.2010 15:21, David Soria Parra wrote:
    FreeBSD Dtrace is known to be broken because of a syntax issue somewhere
    in their DTrace scripts that are included by default. FreeBSD dtrace is
    not supported at the moment.
    Anyway, you need to check the result of dtrace execution and abort with a nice errmsg if it fails.
    Also you might want to detect dtrace's version before running it.

    --
    Wbr,
    Antony Dovgal
    ---
    http://pinba.org - realtime statistics for PHP
  • Frederic Hardy at May 6, 2010 at 12:55 pm
    Hello !

    I don't known why the dtrace version has a relation with the fact that
    the file zend_dtrace_gen.h is not in the trunk...
    Perhaps you can explain that to me ?

    error: zend_dtrace_gen.h: No suchfile or directory

    Best regards,
    Fred.
  • David Soria Parra at May 6, 2010 at 1:08 pm

    Am 06.05.10 14:55, schrieb Frederic Hardy:
    Hello !

    I don't known why the dtrace version has a relation with the fact that
    the file zend_dtrace_gen.h is not in the trunk...
    Perhaps you can explain that to me ?
    zend_dtrace_gen.h is generated during configure using dtrace -h and then
    the object file is generated using dtrace -G on Solaris and FreeBSD (mac
    os doesn't need a compiled object files of the probe description). On
    FreeBSD dtrace -h fails because of a syntax error in a dtrace script
    that comes with the OS, therefore the dtrace headers cannot be
    generated. We need to generate the headers as every OS generates
    different DTrace headers.

    david
  • Frederic Hardy at Jun 23, 2010 at 8:04 pm
    Hello !
    zend_dtrace_gen.h is generated during configure using dtrace -h and then
    the object file is generated using dtrace -G on Solaris and FreeBSD (mac
    os doesn't need a compiled object files of the probe description). On
    FreeBSD dtrace -h fails because of a syntax error in a dtrace script
    that comes with the OS, therefore the dtrace headers cannot be
    generated. We need to generate the headers as every OS generates
    different DTrace headers.
    I can now compile php on Freebsd 8p3 without any problem.
    But when i'm using dtrace with php, dtrace segfault with a core.

    fch@witchblade:/usr/home/fch/php/sapi/cli
    26> sudo dtrace -ln 'php*:::' -c './php -m'
    Password:
    ID PROVIDER MODULE FUNCTION NAME
    Segmentation fault: 11 (core dumped)

    dtrace work fine with DTraceToolkit.

    The gdb backtrace say :

    fch@witchblade:/usr/home/fch/php/sapi/cli
    30> sudo gdb /usr/sbin/dtrace dtrace.core
    GNU gdb 6.1.1 [FreeBSD]
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain
    conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols
    found)...
    Core was generated by `dtrace'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libdtrace.so.2...(no debugging symbols
    found)...done.
    Loaded symbols for /lib/libdtrace.so.2
    Reading symbols from /usr/lib/libproc.so.2...(no debugging symbols
    found)...done.
    Loaded symbols for /usr/lib/libproc.so.2
    Reading symbols from /lib/libctf.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib/libctf.so.2
    Reading symbols from /usr/lib/libelf.so.1...(no debugging symbols
    found)...done.
    Loaded symbols for /usr/lib/libelf.so.1
    Reading symbols from /lib/libz.so.5...(no debugging symbols found)...done.
    Loaded symbols for /lib/libz.so.5
    Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
    Loaded symbols for /lib/libthr.so.3
    Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
    Loaded symbols for /lib/libc.so.7
    Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols
    found)...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0 0x28161380 in pthread_mutex_lock () from /lib/libthr.so.3
    [New Thread 2a56bb40 (LWP 100191)]
    [New Thread 28301140 (LWP 100166)]
    (gdb) backtrace
    #0 0x28161380 in pthread_mutex_lock () from /lib/libthr.so.3
    #1 0x280ac7b2 in dtrace_proc_grab () from /lib/libdtrace.so.2
    #2 0x2815b6fd in pthread_getprio () from /lib/libthr.so.3
    #3 0x00000000 in ?? ()

    fch@witchblade:/usr/home/fch/php/sapi/cli
    35> sudo dtrace -V
    dtrace: Sun D 1.6.2

    fch@witchblade:/usr/home/fch/php/sapi/cli
    36> ./php --version
    PHP 5.3.99-dev (cli) (built: Jun 23 2010 21:31:03)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2010 Zend Technologies

    fch@witchblade:/usr/home/fch/php/sapi/cli
    38> ./php -i | grep DTrace
    DTrace Support => enabled

    fch@witchblade:/usr/home/fch/php/sapi/cli
    39> uname -a
    FreeBSD witchblade 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #0: Wed Jun 23
    18:54:51 CEST 2010 root@witchblade:/usr/obj/usr/src/sys/WITCHBLADE i386

    Any suggestion ?

    Best regards,
    Fred.

    --
    ========================================================================
    Frédéric Hardy : Architecte d'application/Admin. système/Ergonome
    Status : En recherche d'emploi
    ========================================================================
  • Johannes Schlüter at Jun 23, 2010 at 8:44 pm
    Hi,
    On Wed, 2010-06-23 at 22:04 +0200, Frederic Hardy wrote:
    fch@witchblade:/usr/home/fch/php/sapi/cli
    26> sudo dtrace -ln 'php*:::' -c './php -m'
    Password:
    ID PROVIDER MODULE FUNCTION NAME
    Segmentation fault: 11 (core dumped)
    Well, if DTrace segfaults I'd guess that's due to the DTrace port, not
    PHP. It works for me on Solaris.

    johannes
  • Frederic Hardy at Jun 23, 2010 at 9:13 pm

    On 06/23/2010 22:43, Johannes Schlüter wrote:
    Hi,
    On Wed, 2010-06-23 at 22:04 +0200, Frederic Hardy wrote:

    fch@witchblade:/usr/home/fch/php/sapi/cli
    26> sudo dtrace -ln 'php*:::' -c './php -m'
    Password:
    ID PROVIDER MODULE FUNCTION NAME
    Segmentation fault: 11 (core dumped)
    Well, if DTrace segfaults I'd guess that's due to the DTrace port, not
    PHP. It works for me on Solaris.
    I'm agree.
    But i will hope that someone has the same problem or has a solution.
    Can you say me if dtrace -l | grep php must return nothing ?

    Best regards,
    Fred.

    --
    ========================================================================
    Frédéric Hardy : Architecte d'application/Admin. système/Ergonome
    Status : En recherche d'emploi
    ========================================================================

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedMay 6, '10 at 9:38a
activeJun 23, '10 at 9:13p
posts8
users5
websitephp.net

People

Translate

site design / logo © 2022 Grokbase