Thread: =?gb18030?B?Y29uZmlndXJlIC0tZW5hYmxlLWR0cmFjZSCjqHN5?= =?gb18030?B?c3RlbXRhcKOpIG9uIGNlbnRvczYuNCB4ODZfMzI=?= =?gb18030?B?o6wvdXNyL2Jpbi9zdGFwOiBpbnZhbGlkIG9wdGlv?= =?gb18030?B?biAtLSAnQycg?=

hi:
    Linux centos6.4 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux
     
    stap -v
    A script must be specified.
    Systemtap translator/driver (version 1.8/0.152 non-git sources)
    Copyright (C) 2005-2012 Red Hat, Inc. and others
  my configure:
  ./configure --enable-debug --enable-dtrace --prefix=/home/tom/pg9.2.1/ DTRACE=/usr/bin/stap  --without-zlib
    error is:

    make[4]: Entering directory `/home/tom/postgresql-9.2.1/src/backend'
    make[4]: Nothing to be done for `submake-errcodes'.
    make[4]: Leaving directory `/home/tom/postgresql-9.2.1/src/backend'
    make[3]: Leaving directory `/home/tom/postgresql-9.2.1/src/port'
    make -C catalog schemapg.h
    make[3]: Entering directory `/home/tom/postgresql-9.2.1/src/backend/catalog'
    make[3]: `schemapg.h' is up to date.
    make[3]: Leaving directory `/home/tom/postgresql-9.2.1/src/backend/catalog'
    prereqdir=`cd 'parser/' >/dev/null && pwd` && \
              cd '../../src/include/parser/' && rm -f gram.h && \
              ln -s "$prereqdir/gram.h" .
    prereqdir=`cd 'catalog/' >/dev/null && pwd` && \
              cd '../../src/include/catalog/' && rm -f schemapg.h && \
              ln -s "$prereqdir/schemapg.h" .
    prereqdir=`cd 'utils/' >/dev/null && pwd` && \
              cd '../../src/include/utils/' && rm -f fmgroids.h && \
              ln -s "$prereqdir/fmgroids.h" .
    make -C utils probes.h
    make[3]: Entering directory `/home/tom/postgresql-9.2.1/src/backend/utils'
    /usr/bin/stap -C -h -s probes.d -o probes.h.tmp
    /usr/bin/stap: invalid option -- 'C'
    make[3]: *** [probes.h] Error 1
    make[3]: Leaving directory `/home/tom/postgresql-9.2.1/src/backend/utils'
    make[2]: *** [utils/probes.h] Error 2
    make[2]: Leaving directory `/home/tom/postgresql-9.2.1/src/backend'
    make[1]: *** [all-backend-recurse] Error 2
    make[1]: Leaving directory `/home/tom/postgresql-9.2.1/src'
    make: *** [all-src-recurse] Error 2
Any suggestion?

thank you very much!
wk wrote:
> hi:Linux centos6.4 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux
>
> stap -v
> A script must be specified.
> Systemtap translator/driver (version 1.8/0.152 non-git sources)
> Copyright (C) 2005-2012 Red Hat, Inc. and others
>   my configure:
>   ./configure --enable-debug --enable-dtrace --prefix=/home/tom/pg9.2.1/ DTRACE=/usr/bin/stap  --without-zlib
> error is:

> make[3]: Entering directory `/home/tom/postgresql-9.2.1/src/backend/utils'
> /usr/bin/stap -C -h -s probes.d -o probes.h.tmp
> /usr/bin/stap: invalid option -- 'C'

Evidently our DTrace support hasn't been ported to the systemtap
emulation; or maybe you need some more config options.  I think you will
need to hack the makefiles until it works, and we could use a patch.
I'm sure many will be happy to use SystemTap with our dtrace
tracepoints.

(I vaguely recall somebody saying this already worked, years ago; maybe
you should troll the pgsql-hackers archives.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> wk wrote:
>> make[3]: Entering directory `/home/tom/postgresql-9.2.1/src/backend/utils'
>> /usr/bin/stap -C -h -s probes.d -o probes.h.tmp
>> /usr/bin/stap: invalid option -- 'C'

> Evidently our DTrace support hasn't been ported to the systemtap
> emulation; or maybe you need some more config options.

--enable-dtrace has worked just fine in Fedora and RHEL builds for
several years now.  What version of systemtap are you using exactly?
(A look into Red Hat's bugzilla suggests that versions later than
somewhere around 0.9.9 ought to work.)

            regards, tom lane


I wrote:
> --enable-dtrace has worked just fine in Fedora and RHEL builds for
> several years now.  What version of systemtap are you using exactly?

Actually, reading it again, the problem is this:

DTRACE=/usr/bin/stap

which is 100% wrong; stap is not a substitute for dtrace.  You should
have a program named dtrace on your system.  If you don't, you forgot
to install systemtap-sdt-devel.

            regards, tom lane