1

I'm compiling erlang otp from source like following:

./configure --with-dynamic-trace=systemtap

But it reports error:

checking for dtrace... no
configure: error: No dtrace utility found.

I think systemtap is for linux usage and it is different from dtrace, am I right?


After installed dtrace Now the error is:

dtrace: failed to compile script emulator/beam/erlang_dtrace.d: Preprocessor not found
configure: error: Could not precompile erlang_dtrace.d: dtrace -h failed
configure: error: /root/otp/erts/configure failed for erts
apollosoftware.org
  • 12,161
  • 4
  • 48
  • 69
goofansu
  • 2,277
  • 3
  • 30
  • 48

2 Answers2

2

Which distro are you using? I'd forget using DTRACE, it will be a bit harder to make it to work than Systemtap (at least it was for me). I'm using Systemtap and it works perfectly.

If you are not using Fedora/RH you should patch your kernel with UTRACE or use a kernel >= 3.5 with UPBOBES enabled.

To verify if your kernel has UTRACE/UPROBE enabled run this:

grep UTRACE /boot/config-$(uname -r)

or

grep PROBES /boot/config-$(uname -r)

For example, in my machine (Ubuntu 12.04 with Mainline kernel 3.5):

$ grep UTRACE /boot/config-$(uname -r)
$
$ grep UPROBES /boot/config-$(uname -r)
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_UPROBES=y

You should also have systemtap installed. The version shipped with Ubuntu (my case) is quite old, so I compiled it from source (traditional configure/make/make install). You can get it here:

http://sourceware.org/systemtap/ftp/releases/

I'm using version 1.8.

Then try to recompile it again. It should work.

Regards

Francesquini
  • 1,605
  • 1
  • 11
  • 14
  • Thank you, I prefer systemtap too. My distro is Fedora17. `rep UTRACE /boot/config-$(uname -r)` get `CONFIG_UTRACE=y`. Systemtap is 1.8. It is very strange that it requires dtrace while I chose systemtap as the trace tool when configure erlang. – goofansu Sep 21 '12 at 22:30
  • It's ok now. I installed systemtap from source and it's ok. Thank you. – goofansu Sep 21 '12 at 22:55
0
  • After installing systemtap(sudo apt-get install systemtap), exiting or logging out from the current shell session then logging in may help.

  • Also, you may try using kerl.

Miloud Eloumri
  • 779
  • 1
  • 8
  • 14