<p dir="ltr">Remove the prof flag and it will work. GHC is trying to do dylib with profiling </p>
<div class="gmail_quote">On Jun 11, 2015 11:12 AM, "Ranjit Jhala" <<a href="mailto:jhala@cs.ucsd.edu">jhala@cs.ucsd.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Hi Carter,<br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">OK, here's the full info (see log below), this is on an MBP, </div><div class="gmail_default" style="font-family:'courier new',monospace">running ghc 7.8.3 (From ghcformac).</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">In a new directory, I create a FRESH cabal sandbox, and then do:</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"> $ cabal install --enable-library-profiling --ghc-options="-O2 -rtsopts -prof -auto-all -caf-all" vector<br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">In doing so I get errors about unable to build 'primitive' because </div><div class="gmail_default" style="font-family:'courier new',monospace"><div class="gmail_default"><br></div><div class="gmail_default"> Failed to load interface for ‘GHC.Integer.Type’<br></div><div class="gmail_default"> Perhaps you haven't installed the "p_dyn" libraries for package ‘integer-gmp’?</div><div class="gmail_default"> Use -v to see a list of the files searched for.</div><div class="gmail_default"><br></div><div class="gmail_default">Googling the above takes me to</div><div class="gmail_default"><br></div><div class="gmail_default"> <a href="https://ghc.haskell.org/trac/ghc/ticket/8677" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/8677</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">But unfortunately I can't from the above tell exactly how to proceed.</div><div class="gmail_default"><br></div><div class="gmail_default">1. Can you tell me how to get a profiling version of vector built in </div><div class="gmail_default"> a new sandbox? i.e. what options are you using?</div><div class="gmail_default"><br></div></div><div class="gmail_default" style="font-family:'courier new',monospace">2. Is there any other information you need? I'm assuming since its in </div><div class="gmail_default" style="font-family:'courier new',monospace"> a sandbox I needn't nuke my global cabal directory but happy to if </div><div class="gmail_default" style="font-family:'courier new',monospace"> needed.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">Thanks! (log below)</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">-- Ranjit.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><div class="gmail_default">rjhala@borscht ~/r/l/tmp> mkdir vector-build</div><div class="gmail_default">rjhala@borscht ~/r/l/tmp> cd vector-build/</div><div class="gmail_default">rjhala@borscht ~/r/l/t/vector-build> cabal sandbox init</div><div class="gmail_default">Writing a default package environment file to</div><div class="gmail_default">/Users/rjhala/research/liquid/tmp/vector-build/cabal.sandbox.config</div><div class="gmail_default">Creating a new sandbox at</div><div class="gmail_default">/Users/rjhala/research/liquid/tmp/vector-build/.cabal-sandbox</div><div class="gmail_default">rjhala@borscht ~/r/l/t/vector-build> cabal install --enable-library-profiling --ghc-options="-O2 -rtsopts -prof -auto-all -caf-all" vector</div><div class="gmail_default">Resolving dependencies...</div><div class="gmail_default">Notice: installing into a sandbox located at</div><div class="gmail_default">/Users/rjhala/research/liquid/tmp/vector-build/.cabal-sandbox</div><div class="gmail_default">Configuring primitive-0.6...</div><div class="gmail_default">Building primitive-0.6...</div><div class="gmail_default">Failed to install primitive-0.6</div><div class="gmail_default">Last 10 lines of the build log ( /Users/rjhala/research/liquid/tmp/vector-build/.cabal-sandbox/logs/primitive-0.6.log ):</div><div class="gmail_default">Configuring primitive-0.6...</div><div class="gmail_default">Building primitive-0.6...</div><div class="gmail_default">Preprocessing library primitive-0.6...</div><div class="gmail_default">[ 1 of 10] Compiling Data.Primitive.Internal.Compat ( Data/Primitive/Internal/Compat.hs, dist/dist-sandbox-34ea82/build/Data/Primitive/Internal/Compat.o )</div><div class="gmail_default"><br></div><div class="gmail_default">Top level:</div><div class="gmail_default"> Failed to load interface for ‘GHC.Integer.Type’</div><div class="gmail_default"> Perhaps you haven't installed the "p_dyn" libraries for package ‘integer-gmp’?</div><div class="gmail_default"> Use -v to see a list of the files searched for.</div><div class="gmail_default">cabal: Error: some packages failed to install:</div><div class="gmail_default">primitive-0.6 failed during the building phase. The exception was:</div><div class="gmail_default">ExitFailure 1</div><div class="gmail_default">vector-0.10.12.3 depends on primitive-0.6 which failed to install.</div><div class="gmail_default">rjhala@borscht ~/r/l/t/vector-build [1]> which ghc</div><div class="gmail_default">/Applications/ghc-7.8.3.app/Contents/bin/ghc</div><div><br></div></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><br></div>
</blockquote></div>