<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.3492" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#800080 size=2><SPAN
class=990262915-24042009>Do your profiling builds with "-osuf p_o -hisuf p_hi",
and then run a non-profiling build first. This means that both sets of object/hi
files are available which placates TH.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#800080 size=2><SPAN
class=990262915-24042009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#800080 size=2><SPAN
class=990262915-24042009>Ganesh</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> haskell-cafe-bounces@haskell.org
[mailto:haskell-cafe-bounces@haskell.org] <B>On Behalf Of </B>Krzysztof
Skrzetnicki<BR><B>Sent:</B> 24 April 2009 16:28<BR><B>To:</B> Haskell
Cafe<BR><B>Subject:</B> [Haskell-cafe] Template Haskell +
Profiling<BR></FONT><BR></DIV>
<DIV></DIV>Hi<BR><BR>I'm trying to build some modules that use TH with profiling
enabled.<BR><BR>The normal build works:<BR><BR>$ ghc -fforce-recomp --make -cpp
-O -DXQUERY2_TEST Main<BR>[1 of 8] Compiling Text.XML.Expat.FormatCustom (
Text/XML/Expat/FormatCustom.hs, Text/XML/Expat/FormatCustom.o )<BR>[2 of 8]
Compiling DataStructures ( DataStructures.hs, DataStructures.o
)<BR>Loading package ghc-prim ... linking ... done.<BR>Loading package integer
... linking ... done.<BR>Loading package base ... linking ... done.<BR>Loading
package syb ... linking ... done.<BR>Loading package array-0.2.0.0 ... linking
... done.<BR>Loading package packedstring-0.1.0.1 ... linking ...
done.<BR>Loading package containers-0.2.0.1 ... linking ... done.<BR>Loading
package pretty-1.0.1.0 ... linking ... done.<BR>Loading package template-haskell
... linking ... done.<BR>Loading package mtl-1.1.0.2 ... linking ...
done.<BR>Loading package filepath-1.1.0.2 ... linking ... done.<BR>Loading
package old-locale-1.0.0.1 ... linking ... done.<BR>Loading package
old-time-1.0.0.2 ... linking ... done.<BR>Loading package unix-2.3.2.0 ...
linking ... done.<BR>Loading package directory-1.0.0.3 ... linking ...
done.<BR>Loading package process-1.0.1.1 ... linking ... done.<BR>Loading
package random-1.0.0.1 ... linking ... done.<BR>Loading package derive-0.1.4 ...
linking ... done.<BR>[3 of 8] Compiling
Utils (
Utils.hs, Utils.o )<BR>[4 of 8] Compiling Semantics.Pure (
Semantics/Pure.hs, Semantics/Pure.o )<BR>[5 of 8] Compiling
Database ( Database.hs,
Database.o )<BR>[6 of 8] Compiling
XPathDSL ( XPathDSL.hs,
XPathDSL.o )<BR>[7 of 8] Compiling
QueryParse ( QueryParse.hs, QueryParse.o
)<BR>[8 of 8] Compiling
Main (
Main.hs, Main.o )<BR>Linking Main ...<BR><BR>But profiling one fails:<BR><BR>$
ghc -prof -auto -auto-all -fforce-recomp --make -cpp -O -DXQUERY2_TEST
Main<BR>[1 of 8] Compiling Text.XML.Expat.FormatCustom (
Text/XML/Expat/FormatCustom.hs, Text/XML/Expat/FormatCustom.o )<BR>[2 of 8]
Compiling DataStructures ( DataStructures.hs, DataStructures.o
)<BR>Loading package ghc-prim ... linking ... done.<BR>Loading package integer
... linking ... done.<BR>Loading package base ... linking ...
done.<BR>DataStructures.hs:1:0:<BR> Dynamic linking required,
but this is a non-standard build (eg. prof).<BR> You need to
build the program twice: once the normal way, and then<BR> in
the desired way using -osuf to set the object file suffix.<BR><BR>The error
message is somewhat cryptic to me. Does anyone know how to perform profiling
build when using TH?<BR><BR>Regards<BR><BR>Christopher
Skrzêtnicki<BR></BODY></HTML>
<BR/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><p class=MsoNormal><span lang=EN-US style='font-size:8.0pt;font-family:Courier'>==============================================================================<br>Please access the attached hyperlink for an important electronic communications disclaimer:<br><a href="http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html">http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html</a><br>==============================================================================<o:p></o:p></span></p></html><br>