# Meet Mr. DTrace - Part 4

dtrace

Eventually, we got the building environment working. Thanks to Ben and help from

# gnusol, the missing piece is sunwbtool

## Using OpenSolaris binutils

Make sure you are using the OpenSolaris toolchain instead of GNU’s, otherwise the ld may crash with objects compiled with cc. Be cautious to you environment variable $PATH, and make sure /usr/ccs/bin and $SUNWspro/bin precede the generic /usr/bin.

And copy this configuration to your $HOME/.mozconfig, copied from Alex .$topsrcdir/browser/config/mozconfig

ac_add_options --enable-svg

## Building, building, building…

Run the following commands:

./configure
gmake

wait it to fail

cd config; gmake
cd ../js; gmake

If it works, we can apply the patch to add static probes:

cd js/src; patch -p2

If you are in luck, you could get libmozjs.so. Now we need to preload it using run-firefox.sh:

libmozjs=/export/home/bookstack/work/firefox-1.5.0.7/trunk/js/src/libmozjs.so
/usr/lib/firefox/firefox-bin
Unfortunately, there is a core dump when loading the libmozjs.so whenever the dtrace support is added. I doubt that the Firefox in NexentaOS is built by GCC, and it is not binary compatible with the SunStudio, I might have to build the whole Firefox. Ooooh, that is painful, I even does not do that in my Gentoo Linux…