[Haskell-iPhone] Link Errors on import of Data.Sequence

Stephen Blackheath [to GHC-iPhone] likeliest.complexions.stephen at blacksapphire.com
Thu Apr 7 23:10:32 CEST 2011


Thomas,

We (iPwn Studios) have a big project that compiles using our
ghc-iphone-binary-1.6-sdk-4.2.tar.bz2 release and uses Data.Sequence,
though not extensively.  We are not using Sequence.singleton.

It is very picky about SDK versions, so you have to make sure Xcode is
set to use sdk-4.2 if you're using our binary.  All the problems I've
had with linking before have been in Apple stuff, not GHC stuff, and the
answer ended up being that Xcode only works with the latest SDK.  The
older ones, provided for compatibility, are basically broken, but you
can compile to the newest SDK and, as long as you avoid newer APIs and
you actually test on older OS versions on the OS, it can be made to work.

I hope that helps.

Are you using our binary or did you compile GHC-iPhone from source?  If
you are trying one of those two, perhaps you could try the other.


Steve

On 08/04/11 08:21, thomas burt wrote:
> Hi all,
> 
> I've been using ghc-iphone successfully by calling 
> 
> /opt/iphone/ghc-6.10.4-iphone $(SOURCES) -o mylib
> 
> from a makefile enabled in a custom target in XCode and adding
> "libmylib.a" into the project. However I recently imported Data.Sequence
> into the Haskell modules and now I get some build errors during linking:
> 
>   "_containerszm0zi2zi0zi1_DataziSequence_singleton_closure", referenced
> from:
> 
> 
> 
>       _FuncModel_deriveLR_srt in liblhsci.a(FuncModel.o)
> 
> 
> 
>      
> _containerszm0zi2zi0zi1_DataziSequence_singleton_closure$non_lazy_ptr in
> liblhsci.a(FuncModel.o)
> 
> 
> 
>      (maybe you meant:
> _containerszm0zi2zi0zi1_DataziSequence_singleton_closure$non_lazy_ptr)
> 
> 
> 
> 
> I had simliar link issues using the method described in the
> documentation so I went with the direct executable ghc-6.10.4, and I
> fear this approach has finally been compromised. 
> 
> I was just wondering if anyone else has come across the problem or has a
> suggestion to get those symbol names to match up correctly. I'm still
> using XCode 3.2.5 with gcc.
> 
> Let me know if I can provide any more info or if there is anything I can
> read up on to better understand what's happening.
> 
> Thanks,
> Thomas
> 
> 
> 
> 
> _______________________________________________
> iPhone mailing list
> iPhone at haskell.org
> http://www.haskell.org/mailman/listinfo/iphone



More information about the iPhone mailing list