#3978 Missing tclDTrace.h dependency

obsolete: 8.6a0
closed-fixed
9
2008-04-15
2008-04-15
Donal K. Fellows
No

When I try to build tcltest out of Tcl's CVS using Xcode, it fails due to tclDTrace.h being missing. Did someone forget to check this in, or should DTrace support be not compiled in by default even in debug configurations?

Discussion

  • Logged In: YES
    user_id=90580
    Originator: NO

    tclDTrace.h is a generated file, c.f. unix/Makefile.in

    $(DTRACE_HDR): $(DTRACE_SRC)
    $(DTRACE) -h $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC)

    it should be autogenerated by XCode, is that not working for you? what Xcode and OS X version are you using?
    DTrace only works on Leopard, I suspect you may be using the wrong XCode project, c.f. tcl/macosx/README:

    * Tcl.xcode for Xcode 2.4 on 10.4 and Xcode 2.5 on 10.4 and later,
    * Tcl.xcodeproj for Xcode 3.0 on 10.5 and later,

     
    • status: open --> open-invalid
     
  • Logged In: YES
    user_id=79902
    Originator: YES

    I'm using Xcode 3 on Leopard.

    Using the correct project (oops!) I still get problems; things still fail during generation of the stub library. I include the segment of trace here (from an otherwise-clean build):

    cd /Users/dkf/Documents/software/tcl/macosx
    /bin/sh -c /Users/dkf/Documents/software/tcl/macosx/../../build/tcl/Tcl.build/Debug/tcltest.build/Script-F95FA74C0B32CE190072E431.sh
    /Developer/usr/bin/gcc-4.0 -c -g -pipe -mmacosx-version-min=10.5 -Wall -Wno-implicit-int -fno-common -I"." -I/Users/dkf/Documents/software/tcl/macosx/../unix -I/Users/dkf/Documents/software/tcl/macosx/../generic -I/Users/dkf/Documents/software/tcl/macosx/../libtommath -DHAVE_TCL_CONFIG_H -imacros tclConfig.h /Users/dkf/Documents/software/tcl/macosx/../generic/tclStubLib.c
    In file included from /Users/dkf/Documents/software/tcl/macosx/../generic/tclStubLib.c:25:
    /Users/dkf/Documents/software/tcl/macosx/../generic/tclInt.h:3288:23: error: tclDTrace.h: No such file or directory
    make: *** [tclStubLib.o] Error 1

    The only thing I've changed from the default configuration at all is to associate Tcl's CVS tree with the project.

     
  • Logged In: YES
    user_id=90580
    Originator: NO

    ok, that error I can reproduce

    it occurs in 'make dltest.marker' at the end of the build, due to a missing dependency on tclDTrace.h caused by the removal of tclStubLib.c from libtcl (not a problem in a normal make build because by the time we build tclStubLib.c, tclDTrace.h has been generated by other dependencies).

    the following fixes it, committing:
    Index: unix/Makefile.in
    ===================================================================
    RCS file: /cvsroot/tcl/tcl/unix/Makefile.in,v
    retrieving revision 1.230
    diff -u -p -r1.230 Makefile.in
    --- unix/Makefile.in 1 Apr 2008 16:23:42 -0000 1.230
    +++ unix/Makefile.in 15 Apr 2008 09:55:45 -0000
    @@ -1448,7 +1448,7 @@ tclMacOSXNotify.o: $(MAC_OSX_DIR)/tclMac

    # DTrace support

    -$(TCL_OBJS): @DTRACE_HDR@
    +$(TCL_OBJS) $(STUB_LIB_OBJS): @DTRACE_HDR@

    $(DTRACE_HDR): $(DTRACE_SRC)
    $(DTRACE) -h $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC)

     
    • summary: Missing File: tclDTrace.h --> Missing tclDTrace.h dependency
    • status: open-invalid --> closed-fixed
     
  • Logged In: YES
    user_id=173641
    Originator: NO

    Trying to build with dtrace support on Solaris 10, I get (after a seemingly successful ./configure):

    me@mxdevsrv:murex/tcl8.5.3/unix (619) make
    /usr/sbin/dtrace -h -o tclDTrace.h -s /export/home/me/tcl8.5.3/unix/../generic/tclDTrace.d
    dtrace: illegal option -- h
    Usage: dtrace [-32|-64] [-aACeFGHlqSvVwZ] [-b bufsz] [-c cmd] [-D name[=def]]
    [-I path] [-L path] [-o output] [-p pid] [-s script] [-U name]
    [-x opt[=val]] [-X a|c|s|t]

    [-P provider [[ predicate ] action ]]
    [-m [ provider: ] module [[ predicate ] action ]]
    [-f [[ provider: ] module: ] func [[ predicate ] action ]]
    [-n [[[ provider: ] module: ] func: ] name [[ predicate ] action ]]
    [-i probe-id [[ predicate ] action ]] [ args ... ]

    predicate -> '/' D-expression '/'
    action -> '{' D-statements '}'

    -32 generate 32-bit D programs and ELF files
    -64 generate 64-bit D programs and ELF files

    -a claim anonymous tracing state
    -A generate driver.conf(4) directives for anonymous tracing
    -b set trace buffer size
    -c run specified command and exit upon its completion
    -C run cpp(1) preprocessor on script files
    -D define symbol when invoking preprocessor
    -e exit after compiling request but prior to enabling probes
    -f enable or list probes matching the specified function name
    -F coalesce trace output by function
    -G generate an ELF file containing embedded dtrace program
    -H print included files when invoking preprocessor
    -i enable or list probes matching the specified probe id
    -I add include directory to preprocessor search path
    -l list probes matching specified criteria
    -L add library directory to library search path
    -m enable or list probes matching the specified module name
    -n enable or list probes matching the specified probe name
    -o set output file
    -p grab specified process-ID and cache its symbol tables
    -P enable or list probes matching the specified provider name
    -q set quiet mode (only output explicitly traced data)
    -s enable or list probes according to the specified D script
    -S print D compiler intermediate code
    -U undefine symbol when invoking preprocessor
    -v set verbose mode (report stability attributes, arguments)
    -V report DTrace API version
    -w permit destructive actions
    -x enable or modify compiler and tracing options
    -X specify ISO C conformance settings for preprocessor
    -Z permit probe descriptions that match zero probes
    make: *** [tclDTrace.h] Error 2

     
  • Logged In: YES
    user_id=90580
    Originator: NO

    kot, please do not add new bugreports to unrelated (and already closed) bugs (and esp. not to several), please open a new issue. In any case it looks like you dtrace is too old to support USDT probes, not much we can do about that, your only option is likely to be to get a newer version of solaris.