[Haskell-iPhone] Fat binaries on iOS Target

Joe joe at interare.com
Wed Dec 25 14:37:37 UTC 2013


Hi Carter,

When I have added “split-objs: True” in .cabal/config file, but when running cabal I got this message:

Preprocessing library pandoc-1.12.2.1...
unused terminals: 1

on the commandline: Warning: ignoring -fsplit-objs

And if I ignore that, at the end of build, I get another error message that stop the build.

cabal: dist-i386/build/Text/Pandoc_o_split: does not exist

It seems that split-objs cannot work with cross-compilation ghc.

What do you think?

Best regards,
Joe

On Dec 25, 2013, at 8:46 PM, Carter Schonwald <carter.schonwald at gmail.com> wrote:

> You need to make sure every lib is built with split objs, not just the final application.  Did you try it that way?   You could also try to limit the amount of Inlining in your application too
> 
> On Wednesday, December 25, 2013, Joe wrote:
> Hi,
> 
> I’m asking similar question on haskell-cafe group, but I think it’s more appropriate to ask here since it’s iPhone related. Please forgive my double post.
> 
> I have been trying to statically link Pandoc packages to iOS application and I want to say that what have been done so far as explained in https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS is great! I have finally successfully use Pandoc library in iOS app, but there’s an issue that the final app binary is more than 50MB when using Pandoc library. It’s around 5MB for simple haskell library. And without using Haskell, it’s around 100kb.
> 
> Is it possible to strip the executable binary? I read that stripping is not possible using xcode strip. I also try to add -split-objs flag, but it’s not working either.
> 
> Any idea? Is this a known issue?
> 
> Thanks for making Haskell work on iOS!
> 
> Best regards and merry christmas,
> Joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/iphone/attachments/20131225/b1208267/attachment.html>


More information about the iPhone mailing list