Building libraries with ticky-ticky

Tim Chevalier catamorphism at gmail.com
Mon Jul 21 00:08:58 EDT 2008


On 7/18/08, Andrew Hunter <ahunter at cs.hmc.edu> wrote:
>  The documentation does *not*, however, say (anywhere I can find) how
>  to do this!  My natural guess was to go into mk/build.mk, and add
>  -ticky to GhcLibHcOpts, but that didn't work (regardless of whether I
>  had previously built a ticky rts, this produced a multitude of linker
>  errors.)  I also tried, on a lark, adding "t" to GhcLibWays, and this
>  didn't die, but I'm unclear if it...did anything at all, really.  I
>  see no way to really tell one way or another.
>

Hi, Andrew--

I'm not surprised that building the libraries with ticky enabled
doesn't work, because when I fixed ticky-ticky profiling a year and a
half ago after it was bit-rotted, I hardly tested it and all and
certainly didn't try building the ticky libraries.

If I try "make way=t" in libraries/, which should be the proper way to
build the ticky libraries, I get errors, so I'm surprised it succeeded
for you (unless the build system thought that the libraries were
up-to-date and didn't try building the ticky version.)

The reason you got linker errors was because, I assume, you had
compiled the libraries with -ticky but you weren't passing the -ticky
flag to GHC when you compiled your program. If you don't pass the
-ticky flag, GHC doesn't link with the ticky RTS, so the library code
will include all sorts of undefined symbols.

But since you said below that it's OK if things are broken for
non-ticky use, you should just be able to do:
$ cd libraries/
$ make clean
$ make EXTRA_HC_OPTS=-ticky
$ cd [wherever]
$ ghc -o foo -ticky foo.hs
$ ./foo +RTS -rfoo.ticky -RTS
and foo.ticky will contain your profiling report. You just won't be
able to compile any programs without -ticky this way.

In the meantime, I'll look into making the "ticky" way work so that
it'll be possible to have ticky and non-ticky libraries coexisting.

If you have any more questions about ticky-ticky profiling, please CC
both me and this list, since I don't always read the list carefully.

Cheers,
Tim

-- 
Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt
"Faith, faith is an island in the setting sun / But proof, yes, proof
is the bottom line for everyone."--Paul Simon


More information about the Glasgow-haskell-users mailing list