<div dir="ltr">I'm back at it after the holidays. I hope you all had a great New Years eve and day! I got my program up and running with only one warning, which doesn't seem like a big deal:<div><br></div><div>    (Apple Mach-O Linker Warning): PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _s3rt_info from /Users/schell/Code/blocks-ios/Blocks/src/Main.a(Main.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie</div>
<div><br></div><div>I just wanted to say thanks for your help! </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 23, 2013 at 4:14 PM, Luke Iannini <span dir="ltr"><<a href="mailto:lukexipd@gmail.com" target="_blank">lukexipd@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Schell,</div><div><br></div><div>If you're building onto a 4S/iPad4 or later, you're probably partially running into the thing I mentioned wherein the arm-apple-darwin10-clang script isn't quite correctly generating fat binaries for armv7 and armv7s yet. I reverted it back to just doing armv7s (you'd have to switch it to armv7 if you wanted an earlier device):</div>


<a href="https://github.com/ghc-ios/ghc-ios-scripts/blob/master/arm-apple-darwin10-clang" target="_blank">https://github.com/ghc-ios/ghc-ios-scripts/blob/master/arm-apple-darwin10-clang</a><br><div><br></div><div>You'll have to rebuild GHC with this :P.</div>


<div><br></div><div>Also, in "Build Settings", change "Architectures" to "Standard Architectures (armv7, armv7s)" (as opposed to "(including 64-bit)") which should fix the Arm64 messages (just added this to the wiki — we're awaiting llvm code from Apple before we can support Arm64), and possibly set "Valid Architectures" to just armv7s or armv7 depending on which device you're building for until we get the fat stuff figured out.</div>


<div><br></div><div>Cheers</div><span class="HOEnZb"><font color="#888888"><div>Luke</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 23, 2013 at 10:29 AM, Schell Scivally <span dir="ltr"><<a href="mailto:efsubenovex@gmail.com" target="_blank">efsubenovex@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It looks like nuking jobs: $ncpus did the trick. I now have primitive and vector installed and confirmed with arm-apple-darwin10-ghc. After building my static lib the next issue is that I'm having a lot of linking errors in Xcode. Here is the build log: <a href="https://gist.github.com/schell/f10af8c0d29e24da5c25" target="_blank">https://gist.github.com/schell/f10af8c0d29e24da5c25</a></div>


<div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 22, 2013 at 4:47 PM, Luke Iannini <span dir="ltr"><<a href="mailto:lukexipd@gmail.com" target="_blank">lukexipd@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hey Schell,<div><br></div><div>I think I see the issue — did you see the note in section 6 of <a href="https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS</a> regarding the</div>





<div>jobs: $ncpus</div><div>option in ~/.cabal/config ?</div><div>If you've got that, nuke it and see if that fixes it.</div><div><br></div><div>I need to file a bug about that with the Cabal team.</div><div><br></div>





<div>I've also been meaning to warn — I am pretty sure the fat armv7s/armv7 binary approach taken by arm-apple-darwin10-ghc doesn't fully work yet (I was convinced it did when I implemented it, but recent testing with armv7 and armv7s devices show missing symbols for one arch or the other). I haven't had nearly the time to work on it and if anyone's looking for a way to help with GHC iOS that's a great self-contained problem to work on : ).</div>





<div><br></div><div>If we can't get that approach to work (intercepting build commands and lipoing things together on the fly), there's always the approach of building one GHC for each armv7 and armv7s, but that's got its own pain points since GHC calls both of those just "arm" internally and you have to do some yucky stuff with directory management :/ (that's what I've done here, and it works at least : )).</div>





<div><br></div><div>Hopefully I'll be out of the woods in my primary work soon and able to devote more cycles help in cleaning these things up.<br><div><br></div><div>Cheers</div></div><div>Luke</div><div class="gmail_extra">





<br><br><div class="gmail_quote"><div><div>On Sun, Dec 22, 2013 at 4:22 PM, Schell Scivally <span dir="ltr"><<a href="mailto:efsubenovex@gmail.com" target="_blank">efsubenovex@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

<div dir="ltr">The primitive log is empty, nothing is printed to it. The version of vector I'm trying to build is 0.10.9.1, which is currently on hackage. I've also tried building primitive 0.5.2.0 by hand - cloning it from github and then running arm-apple-darwin10-cabal install and it stops at the same error. Nothing is printed to the log file. If I try each step separately (configure, build, install) I can configure fine and building gives this output:<br>














<p>Building primitive-0.5.2.0...</p>
<p>Preprocessing library primitive-0.5.2.0...</p>
<p>[ 1 of 10] Compiling Data.Primitive.Internal.Compat ( Data/Primitive/Internal/Compat.hs, dist-arm/build/Data/Primitive/Internal/Compat.o )</p>
<p>[ 2 of 10] Compiling Data.Primitive.MachDeps ( Data/Primitive/MachDeps.hs, dist-arm/build/Data/Primitive/MachDeps.o )</p>
<p>[ 3 of 10] Compiling Data.Primitive.Internal.Operations ( Data/Primitive/Internal/Operations.hs, dist-arm/build/Data/Primitive/Internal/Operations.o )</p>
<p>[ 4 of 10] Compiling Control.Monad.Primitive ( Control/Monad/Primitive.hs, dist-arm/build/Control/Monad/Primitive.o )</p>
<p>[ 5 of 10] Compiling Data.Primitive.Types ( Data/Primitive/Types.hs, dist-arm/build/Data/Primitive/Types.o )</p>
<p>[ 6 of 10] Compiling Data.Primitive.Array ( Data/Primitive/Array.hs, dist-arm/build/Data/Primitive/Array.o )</p>
<p>[ 7 of 10] Compiling Data.Primitive.ByteArray ( Data/Primitive/ByteArray.hs, dist-arm/build/Data/Primitive/ByteArray.o )</p>
<p>[ 8 of 10] Compiling Data.Primitive.Addr ( Data/Primitive/Addr.hs, dist-arm/build/Data/Primitive/Addr.o )</p>
<p>[ 9 of 10] Compiling Data.Primitive   ( Data/Primitive.hs, dist-arm/build/Data/Primitive.o )</p>
<p>[10 of 10] Compiling Data.Primitive.MutVar ( Data/Primitive/MutVar.hs, dist-arm/build/Data/Primitive/MutVar.o )</p>
<p>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: dist-arm/build/libHSprimitive-0.5.2.0.a will be fat and ar(1) will not be able to operate on it</p>

<div>In-place registering primitive-0.5.2.0...</div><div><br></div><div>And then installing gives:</div><div>







<p>Resolving dependencies...</p>
<p>Configuring primitive-0.5.2.0...</p>
<p>Failed to install primitive-0.5.2.0</p>
<p>Last 10 lines of the build log ( /Users/schell/.cabal/logs/primitive-0.5.2.0.log ):</p><div>
<p>cabal: Error: some packages failed to install:</p>
</div><p>primitive-0.5.2.0 failed during the configure step. The exception was:</p>
<p>ExitFailure 127</p></div><div><br></div><div>To me it seems like the line "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: dist-arm/build/libHSprimitive-0.5.2.0.a will be fat and ar(1) will not be able to operate on it" could be important? Does that sound like it may have something to do with the install failure?</div>






<div> </div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 22, 2013 at 2:49 PM, Carter Schonwald <span dir="ltr"><<a href="mailto:carter.schonwald@gmail.com" target="_blank">carter.schonwald@gmail.com</a>></span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oooooo.   What version of vector are you using?  It needs to be the one for ghc HEAD. <div><div>
<span></span><br><br>On Sunday, December 22, 2013, Carter Schonwald  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Could you also share the primitive log?  Seems like something is happening there. <div>Can't you just build primitive by hand then vector?<span></span><br><br>On Sunday, December 22, 2013, Schell Scivally  wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Ah, cool - I didn't know that the verbosity arg took a parameter. Here is the full output: </span><a href="https://gist.github.com/schell/7c08631f52e1e6f54a39" style="font-family:arial,sans-serif;font-size:13.333333969116211px" target="_blank">https://gist.github.com/schell/7c08631f52e1e6f54a39</a><br>









</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 22, 2013 at 1:13 PM, Carter Schonwald <span dir="ltr"><<a>carter.schonwald@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The -v flag is for cabal.  Be sure to post a link to the full output.  <div><span></span><br><br>On Sunday, December 22, 2013, Schell Scivally  wrote:<br>









</div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hey guys, I thought I had fixed my issues by rebuilding HEAD but it looks like I just went in a circle and now I'm back at the same problem from my first message: <a href="http://www.haskell.org/pipermail/iphone/2013-December/000345.html" target="_blank">http://www.haskell.org/pipermail/iphone/2013-December/000345.html</a><div>











<div><br></div><div>I'm trying to cabal install vector but it's failing while installing primitive. The log file shows no error, so it looks like it's silently erring. My setup is here: <a href="https://gist.github.com/schell/f3a737171ce2f6b1119c" target="_blank">https://gist.github.com/schell/f3a737171ce2f6b1119c</a></div>











<div><div>Just for posterity I'll post the output from `arm-apple-darwin10-cabal install vector`:</div><div><p>Resolving dependencies...</p><p>Configuring primitive-0.5.1.0...</p><p>Failed to install primitive-0.5.1.0</p>











<p>Last 10 lines of the build log ( /Users/schell/.cabal/logs/primitive-0.5.1.0.log ):</p><p>cabal: Error: some packages failed to install:</p><p>primitive-0.5.1.0 failed during the configure step. The exception was:</p>











<p>ExitFailure 127</p><p>vector-0.10.9.1 depends on primitive-0.5.1.0 which failed to install.</p><p>The build log is empty.</p></div></div><div>Furthermore, for a while I was trying to use cabal like `arm-apple-darwin10-cabal --config-file=arm.config install vector`, pointing it to a custom cabal file (one that was just autogenerated the first time I issued the command). This looked like it was working, but it says that the package is already installed. If I don't include the --config-file option it errs like above. </div>











<div><br></div><div>Using arm-apple-darwin10-ghc to build my project is failing because it can't find Data.Vector.Storable but I can't seem to get cabal to install it in the correct location.<br clear="all"><div>










<br>
</div>-- <br>Schell Scivally<br><a href="http://blog.efnx.com" target="_blank">http://blog.efnx.com</a><br><a href="http://github.com/schell" target="_blank">http://github.com/schell</a><br><a href="http://twitter.com/schellsan" target="_blank">http://twitter.com/schellsan</a>
</div></div></div>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Schell Scivally<br><a href="http://blog.efnx.com" target="_blank">http://blog.efnx.com</a><br><a href="http://github.com/schell" target="_blank">http://github.com/schell</a><br>









<a href="http://twitter.com/schellsan" target="_blank">http://twitter.com/schellsan</a>
</div>
</blockquote></div>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Schell Scivally<br><a href="http://blog.efnx.com" target="_blank">http://blog.efnx.com</a><br><a href="http://github.com/schell" target="_blank">http://github.com/schell</a><br>






<a href="http://twitter.com/schellsan" target="_blank">http://twitter.com/schellsan</a>
</div>
</div></div><br></div></div>_______________________________________________<br>
iPhone mailing list<br>
<a href="mailto:iPhone@haskell.org" target="_blank">iPhone@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/iphone" target="_blank">http://www.haskell.org/mailman/listinfo/iphone</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Schell Scivally<br><a href="http://blog.efnx.com" target="_blank">http://blog.efnx.com</a><br><a href="http://github.com/schell" target="_blank">http://github.com/schell</a><br>



<a href="http://twitter.com/schellsan" target="_blank">http://twitter.com/schellsan</a>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Schell Scivally<br><a href="http://blog.efnx.com" target="_blank">http://blog.efnx.com</a><br><a href="http://github.com/schell" target="_blank">http://github.com/schell</a><br>
<a href="http://twitter.com/schellsan" target="_blank">http://twitter.com/schellsan</a>
</div>