Howdy, Does hsc2hs need to be run as a separate manual phase or can it be run from the iphone-cabal thing? When I try to run it via iphone-cabal, I get link errors because the generated C program is being linked against the iphone stuff, rather than the native libraries. Any hints or pointers would be appreciated. Also, if there's any hints on running c2hs, they'd be appreciated, too, but I haven't spent a lot of time in c2hs land. Thanks, David
David, iphone-hsc2hs and iphone-simulator-hsc2hs are automatic, and iphone-cabal can run them for you automatically. The native hsc2hs (meaning, the stock standard version without a prefix for compiling programs on the PC) definitely won't work. I haven't used c2hs. I don't know what is going wrong for you. Steve On 12/11/11 12:19, David Pollak wrote:
Howdy,
Does hsc2hs need to be run as a separate manual phase or can it be run from the iphone-cabal thing?
When I try to run it via iphone-cabal, I get link errors because the generated C program is being linked against the iphone stuff, rather than the native libraries.
Any hints or pointers would be appreciated.
Also, if there's any hints on running c2hs, they'd be appreciated, too, but I haven't spent a lot of time in c2hs land.
Thanks,
David
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
Hmmm… iphone-hsc2hs doesn't seem to be part of the ghc-iphone distribution: dpp@snowraptor:/opt/iphone$ find . -name "iphone*" ./bin/iphone-cabal ./bin/iphone-ghc ./bin/iphone-ghc-pkg ./bin/iphone-simulator-cabal ./bin/iphone-simulator-ghc ./bin/iphone-simulator-ghc-pkg dpp@snowraptor:/opt/iphone$ Should I do a build from source? Thanks, David -- @dpp On Friday, November 11, 2011 at 8:26 PM, Stephen Blackheath [to GHC-iPhone] wrote:
David,
iphone-hsc2hs and iphone-simulator-hsc2hs are automatic, and iphone-cabal can run them for you automatically. The native hsc2hs (meaning, the stock standard version without a prefix for compiling programs on the PC) definitely won't work. I haven't used c2hs.
I don't know what is going wrong for you.
Steve
On 12/11/11 12:19, David Pollak wrote:
Howdy,
Does hsc2hs need to be run as a separate manual phase or can it be run from the iphone-cabal thing?
When I try to run it via iphone-cabal, I get link errors because the generated C program is being linked against the iphone stuff, rather than the native libraries.
Any hints or pointers would be appreciated.
Also, if there's any hints on running c2hs, they'd be appreciated, too, but I haven't spent a lot of time in c2hs land.
Thanks,
David
_______________________________________________ iPhone mailing list iPhone@haskell.org (mailto:iPhone@haskell.org) http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org (mailto:iPhone@haskell.org) http://www.haskell.org/mailman/listinfo/iphone
David, It's all coming back to me. It uses the standard hsc2hs, but it gets it to compile using the iphone simulator gcc (even if it's compiling for iphone). It turned out that the answers are close enough to the real iphone that it works. When I was developing it, there were no link errors. You could compile with the iphone simulator gcc, and the resulting binary would just work. Perhaps this has changed. You could try iphone-cabal -v install <package>. That ought to tell you what arguments it is passing to hsc2hs, and debug from there. Steve On 12/11/11 17:32, David Pollak wrote:
Hmmm…
iphone-hsc2hs doesn't seem to be part of the ghc-iphone distribution: dpp@snowraptor:/opt/iphone$ find . -name "iphone*" ./bin/iphone-cabal ./bin/iphone-ghc ./bin/iphone-ghc-pkg ./bin/iphone-simulator-cabal ./bin/iphone-simulator-ghc ./bin/iphone-simulator-ghc-pkg dpp@snowraptor:/opt/iphone$
Should I do a build from source?
Thanks,
David -- @dpp
On Friday, November 11, 2011 at 8:26 PM, Stephen Blackheath [to GHC-iPhone] wrote:
David,
iphone-hsc2hs and iphone-simulator-hsc2hs are automatic, and iphone-cabal can run them for you automatically. The native hsc2hs (meaning, the stock standard version without a prefix for compiling programs on the PC) definitely won't work. I haven't used c2hs.
I don't know what is going wrong for you.
Steve
On 12/11/11 12:19, David Pollak wrote:
Howdy,
Does hsc2hs need to be run as a separate manual phase or can it be run from the iphone-cabal thing?
When I try to run it via iphone-cabal, I get link errors because the generated C program is being linked against the iphone stuff, rather than the native libraries.
Any hints or pointers would be appreciated.
Also, if there's any hints on running c2hs, they'd be appreciated, too, but I haven't spent a lot of time in c2hs land.
Thanks,
David
_______________________________________________ iPhone mailing list iPhone@haskell.org mailto:iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org mailto:iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
[2nd attempt — sent the first from the wrong sender address.] David,
Also, if there's any hints on running c2hs, they'd be appreciated, too, but I haven't spent a lot of time in c2hs land.
By default c2hs queries the platform it is running on for architecture-specific parameters. However, it also contains a hardcoded set of parameters for a fixed set of platforms (in 'C2HS.Config') that can be selected with the "-p" (or '--platform=') flag. By simply extending that set of platforms to include arm/iOS, you can use c2hs to cross-compile. Manuel
participants (3)
-
David Pollak -
Manuel M T Chakravarty -
Stephen Blackheath [to GHC-iPhone]