Bug #45810 DTrace: build fails when 'dtrace' is not in PATH
Submitted: 28 Jun 2009 18:31 Modified: 17 Nov 2009 23:21
Reporter: Alexey Kopytov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.4.2-beta, mysql-azalea OS:Solaris
Assigned to: Jonathan Perkin CPU Architecture:Any
Tags: DTrace

[28 Jun 2009 18:31] Alexey Kopytov
Description:
DTrace-enabled build of 5.4 fails when the location of the 'dtrace' binary is not in PATH. Build log:

gmake[1]: Entering directory `/export/home/kaa/src/mysql-5.4.2-beta/include'
gmake[1]: warning: -jN forced in submake: disabling jobserver mode.
/usr/bin/rm -f readline openssl
/usr/bin/ln -s ../cmd-line-utils/readline readline
/usr/bin/ln -s ../extra/yassl/include/openssl openssl
echo timestamp > link_sources
if ! test -f probes_mysql.d ; then \
                /usr/bin/cp -f ../include/probes_mysql.d.base probes_mysql.d; \
        fi
/usr/bin/cp config.h my_config.h
../scripts/dheadgen.pl -f probes_mysql.d > probes_mysql_nodtrace.h
dtrace  -h -s probes_mysql.d -o probes_mysql_dtrace.h
gmake[1]: dtrace: Command not found

How to repeat:
Try to build 5.4 when PATH does not contain /usr/sbin.
[29 Jun 2009 11:52] Valeriy Kravchuk
I can't repeat this with 5.4.4-alpha (azalea) on Mac OS X for some reason.
[29 Jun 2009 12:09] Alexey Kopytov
Valeriy, the code that triggers this bug is only in 5.4 (aka "5.1-performance-version") tree and has not been merged into the azalea tree yet.
[29 Jun 2009 16:57] Sveta Smirnova
Thank you for the report.

Verified as described.
[30 Sep 2009 13:18] Jonathan Perkin
I can't reproduce this, and looking at the script it calls '/usr/sbin/dtrace' directly so should not be affected by $PATH.  However, I cannot see in the bzr log for this script in mysql-trunk any changes suggesting this used to only be 'dtrace' and rely on $PATH.

Can you confirm this works as intended now?  Perhaps I'm just looking in the wrong bzr tree.
[2 Oct 2009 8:41] Sveta Smirnova
Still repeatable for me with mysql-next-mr tree
[2 Oct 2009 12:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/85514

2885 Jonathan Perkin	2009-10-02
      bug#45810: DTrace: build fails when 'dtrace' is not in PATH
      
      Ensure full path to dtrace binary is used, fixes builds where /usr/sbin
      is not in $PATH.
[2 Oct 2009 12:40] Jonathan Perkin
If either Sveta or Alexey can confirm this patch fixes the problem (I'm very confident it does) then I'll merge up.
[2 Oct 2009 13:04] Sveta Smirnova
Yes, this solved problem in my case.
[2 Oct 2009 13:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/85526

2893 Jonathan Perkin	2009-10-02
      bug#45810: DTrace: build fails when 'dtrace' is not in PATH
      
      Ensure full path to dtrace binary is used, fixes builds when
      /usr/sbin is not in $PATH.
[7 Oct 2009 19:10] Joerg Bruehe
"The proof lies in the pudding".

I see no reason against this change, as it solves the problem.
[8 Oct 2009 7:31] Bjørn Munch
Looks sensible and if it's reported to fix the problem, I'm OK with it.
[8 Oct 2009 7:31] Bjørn Munch
Looks sensible and if it's reported to fix the problem, I'm OK with it.
[14 Oct 2009 11:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/86776

2900 Jonathan Perkin	2009-10-14
      bug#45810: DTrace: build fails when 'dtrace' is not in PATH
      
      Ensure full path to dtrace binary is used, fixes builds where
      /usr/sbin is not in $PATH.
[14 Oct 2009 13:25] Jonathan Perkin
Merged trunk-bugfixing => next-mr-bugfixing => 6.0-codebase-bugfixing
[31 Oct 2009 8:18] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091031081410-qkxmjsdzjmj840aq) (version source revid:jperkin@sun.com-20091014112234-s3n7sq1fbhfrfjfy) (merge vers: 6.0.14-alpha) (pib:13)
[31 Oct 2009 8:21] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091031081110-58tn67wz7226hk03) (version source revid:jperkin@sun.com-20091014111658-rtu6o3h3cyuo41d6) (merge vers: 5.5.0-beta) (pib:13)
[17 Nov 2009 23:21] Paul DuBois
Noted in 5.5.0, 6.0.14 changelogs.

Configuring MySQL for DTrace support resulted in a build failure on
Solaris if the directory for the dtrace executable was not in PATH.