Here's exactly how to build the master-merge-ios branch
Stefan, Here is the exact procedure I just did to successfully build the GHC-iOS cross compiler: git clone git@github.com:ghc-ios/ghc.git ghc-ios cd ghc-ios git checkout master-merge-ios cp arm-apple-darwin10-bin/* ~/bin/ (<-- ~/bin is in my PATH) I edited ~/bin/arm-apple-darwin10-gcc to change the -march option to armv7, like this, because that's what my iPod touch has: TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -march=armv7 -mcpu=cortex-a8 -mfpu=neon" git checkout master git remote set-url origin http://darcs.haskell.org/ghc.git/ ./sync-all --no-dph get wget http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7759/ios-patch-14a... wget http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7760/ios-patch-15a... cd libraries/base cat ../../ios-patch-14a-libraries-base.patch | patch -p1 cd ../../utils/hsc2hs/ cat ../../ios-patch-15a-against-hsc2hs-remove-HSC2HS_EXTRA-from-stage0-wrapper.patch | patch -p1 cd ../.. git remote set-url origin git@github.com:ghc-ios/ghc.git git checkout master-merge-ios cat > mk/build.mk HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO SPLIT_OBJS = NO INTEGER_LIBRARY = integer-simple Stage1Only = YES DYNAMIC_GHC_PROGRAMS = NO GhcLibWays = v <ctrl-D> perl boot ./configure --target=arm-apple-darwin10 --prefix=/usr/local/ghc-ios-steve make When you get this: ghc-stage1: panic! (the 'impossible' happened) (GHC version 7.7.20130328 for arm-apple-ios): expectJust initTcInteractive just type 'make' again I am using: ghc-7.4.2 as my bootstrap ghc compiler thopminkringscrape:ghc-ios stephenblackheath$ llc --version Low Level Virtual Machine (http://llvm.org/): llvm version 3.0 Optimized build. Built Aug 10 2012 (18:51:37). Host: x86_64-apple-darwin12.3.0 Host CPU: i686 This is the head for master-merge-ios branch: commit 942b130ada7be3f608286da934026e2c162d9527 Merge: 97274b1 81d55a9 Author: Stephen Blackheath <..> Date: Thu Mar 28 23:51:02 2013 +1300 Merge branch 'master' into master-merge-ios
would you mind uploading somewhere a source tree that builds for you? Sorry - I'm not really able to do that at the moment.
you mean the architecture compiled for? armv7 vs armv7s? That's right.
I have not actually run this version yet. Steve On 28/03/13 23:21, Stefan Kersten wrote:
hi steve,
On 26 Mar 2013, at 20:36, "Stephen Blackheath [to GHC-iPhone]"
wrote: The rev you mentioned _definitely_ works.
Check that you're using llvm version 3.0 or >= 3.2. Llvm version 3.1 is broken.
i'm using llvm version 3.2, 3.0 doesn't compile anymore with the newest toolchain. still no joy, started from scratch and now having trouble getting as far as i already got. if you have the time and resources, would you mind uploading somewhere a source tree that builds for you? which osx+xcode+llvm are you using?
If it's not that, then it could be something to do with ARM variants.
you mean the architecture compiled for? armv7 vs armv7s?
many thanks + best, sk
All, I have tested it, and it works. During installation it failed saying that some file libffi-6.dll doesn't exist. I fixed it with a touch command: touch /Users/stephenblackheath/install/usr/local/ghc-ios-steve/lib/ghc-7.7.20130328/rts-1.0/libffi-6.dll Then re-did 'sudo make install' Looks like the makefiles are a bit poked on mainline at the moment. Steve On 29/03/13 01:55, Stephen Blackheath [to GHC-iPhone] wrote:
Stefan,
Here is the exact procedure I just did to successfully build the GHC-iOS cross compiler:
git clone git@github.com:ghc-ios/ghc.git ghc-ios cd ghc-ios git checkout master-merge-ios cp arm-apple-darwin10-bin/* ~/bin/ (<-- ~/bin is in my PATH)
I edited ~/bin/arm-apple-darwin10-gcc to change the -march option to armv7, like this, because that's what my iPod touch has:
TARGET_CFLAGS="-isysroot $TARGET_PLATFORM -march=armv7 -mcpu=cortex-a8 -mfpu=neon"
git checkout master git remote set-url origin http://darcs.haskell.org/ghc.git/ ./sync-all --no-dph get wget http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7759/ios-patch-14a...
wget http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7760/ios-patch-15a...
cd libraries/base cat ../../ios-patch-14a-libraries-base.patch | patch -p1 cd ../../utils/hsc2hs/ cat ../../ios-patch-15a-against-hsc2hs-remove-HSC2HS_EXTRA-from-stage0-wrapper.patch | patch -p1 cd ../.. git remote set-url origin git@github.com:ghc-ios/ghc.git git checkout master-merge-ios cat > mk/build.mk HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO SPLIT_OBJS = NO INTEGER_LIBRARY = integer-simple Stage1Only = YES DYNAMIC_GHC_PROGRAMS = NO GhcLibWays = v <ctrl-D> perl boot ./configure --target=arm-apple-darwin10 --prefix=/usr/local/ghc-ios-steve make
When you get this: ghc-stage1: panic! (the 'impossible' happened) (GHC version 7.7.20130328 for arm-apple-ios): expectJust initTcInteractive just type 'make' again
I am using: ghc-7.4.2 as my bootstrap ghc compiler
thopminkringscrape:ghc-ios stephenblackheath$ llc --version Low Level Virtual Machine (http://llvm.org/): llvm version 3.0 Optimized build. Built Aug 10 2012 (18:51:37). Host: x86_64-apple-darwin12.3.0 Host CPU: i686
This is the head for master-merge-ios branch: commit 942b130ada7be3f608286da934026e2c162d9527 Merge: 97274b1 81d55a9 Author: Stephen Blackheath <..> Date: Thu Mar 28 23:51:02 2013 +1300
Merge branch 'master' into master-merge-ios
would you mind uploading somewhere a source tree that builds for you? Sorry - I'm not really able to do that at the moment.
you mean the architecture compiled for? armv7 vs armv7s? That's right.
I have not actually run this version yet.
Steve
On 28/03/13 23:21, Stefan Kersten wrote:
hi steve,
On 26 Mar 2013, at 20:36, "Stephen Blackheath [to GHC-iPhone]"
wrote: The rev you mentioned _definitely_ works.
Check that you're using llvm version 3.0 or >= 3.2. Llvm version 3.1 is broken.
i'm using llvm version 3.2, 3.0 doesn't compile anymore with the newest toolchain. still no joy, started from scratch and now having trouble getting as far as i already got. if you have the time and resources, would you mind uploading somewhere a source tree that builds for you? which osx+xcode+llvm are you using?
If it's not that, then it could be something to do with ARM variants.
you mean the architecture compiled for? armv7 vs armv7s?
many thanks + best, sk
hi steve,
On 28 Mar 2013, at 15:14, Stephen Blackheath [to GHC-iPhone]
I have tested it, and it works. During installation it failed saying that some file libffi-6.dll doesn't exist. I fixed it with a touch command:
touch /Users/stephenblackheath/install/usr/local/ghc-ios-steve/lib/ghc-7.7.20130328/rts-1.0/libffi-6.dll
Then re-did 'sudo make install'
Looks like the makefiles are a bit poked on mainline at the moment.
thanks for spelling this out! i can confirm ghc-ios compiles now with LLVM 3.0 and GHC 7.6.2 (it appears that the culprit was LLVM 3.2). i've pasted a build script here [1], might be useful for others. sk [1] http://hpaste.org/84779
Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator. You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project. Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ). Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
"Stephen Blackheath [to GHC-iPhone]"
Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
Fantastic news! Thank you for all the hard work. -- Peter Jones, Founder, Devalot.com Defending the honor of good code
You are fucking awesome! - if I may say this with these profane words.
Highest regards
Nikolas Mayr
Am 2013-08-29 um 22:29 schrieb "Stephen Blackheath [to GHC-iPhone]"
Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
Awesome! Way to go.
On Thu, Aug 29, 2013 at 2:21 PM, Nikolas Mayr
You are fucking awesome! - if I may say this with these profane words.
Highest regards Nikolas Mayr
Am 2013-08-29 um 22:29 schrieb "Stephen Blackheath [to GHC-iPhone]" < likeliest.complexions.stephen@blacksapphire.com>:
Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
-- Schell Scivally http://blog.efnx.com http://github.com/schell http://twitter.com/schellsan
Nikolas, You may! Here's the Reddit discussion: http://www.reddit.com/r/haskell/comments/1lboh4/announcing_ghc_ios/ Steve On 30/08/13 09:21, Nikolas Mayr wrote:
You are fucking awesome! - if I may say this with these profane words.
Highest regards Nikolas Mayr
Am 2013-08-29 um 22:29 schrieb "Stephen Blackheath [to GHC-iPhone]"
: Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
You guys are absolutely awesome! Are any of you guys coming to ICFP in Boston? The deadline for talk proposals for the Haskell Implementors Workshop has already passed, but they have shorter lightning talks for which you still could get in: http://www.haskell.org/haskellwiki/HaskellImplementorsWorkshop/2013 Manuel
"Stephen Blackheath [to GHC-iPhone]"
: Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project ― it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
I'm considering it! If I do, I'd definitely be happy to give a lightning talk/demo of GHC iOS. And aw thanks : ) — I'm so excited for inline-objc!! Cheers Luke On Thu, Aug 29, 2013 at 6:33 PM, Manuel M T Chakravarty < chak@cse.unsw.edu.au> wrote:
You guys are absolutely awesome!
Are any of you guys coming to ICFP in Boston? The deadline for talk proposals for the Haskell Implementors Workshop has already passed, but they have shorter lightning talks for which you still could get in:
http://www.haskell.org/haskellwiki/HaskellImplementorsWorkshop/2013
Manuel
"Stephen Blackheath [to GHC-iPhone]" < likeliest.complexions.stephen@blacksapphire.com>:
Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
Manuel, "The tyranny of distance didn't stop the cavalier, so why should it stop me?" as the famous New Zealand song goes. ...It's so far! ...I'll have to admit defeat this year. Luke, you're it! I'm so happy we've got work completed, and I will be sure to celebrate with a beer from the local shops. Steve On 30/08/13 14:13, Luke Iannini wrote:
I'm considering it! If I do, I'd definitely be happy to give a lightning talk/demo of GHC iOS.
And aw thanks : ) — I'm so excited for inline-objc!!
Cheers Luke
On Thu, Aug 29, 2013 at 6:33 PM, Manuel M T Chakravarty
mailto:chak@cse.unsw.edu.au> wrote: You guys are absolutely awesome!
Are any of you guys coming to ICFP in Boston? The deadline for talk proposals for the Haskell Implementors Workshop has already passed, but they have shorter lightning talks for which you still could get in:
http://www.haskell.org/haskellwiki/HaskellImplementorsWorkshop/2013
Manuel
"Stephen Blackheath [to GHC-iPhone]"
mailto:likeliest.complexions.stephen@blacksapphire.com>: Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ 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
I"ll (hopefully) be at ICFP too, though despite my allegedly helping Luke,
I have absolutely no familiarity with the patches Stephen and Luke have
prodigiously generated for supporting ios :)
but yes, all who make it there, a beer or analogue thereof should be had!
On Thu, Aug 29, 2013 at 10:13 PM, Luke Iannini
I'm considering it! If I do, I'd definitely be happy to give a lightning talk/demo of GHC iOS.
And aw thanks : ) — I'm so excited for inline-objc!!
Cheers Luke
On Thu, Aug 29, 2013 at 6:33 PM, Manuel M T Chakravarty < chak@cse.unsw.edu.au> wrote:
You guys are absolutely awesome!
Are any of you guys coming to ICFP in Boston? The deadline for talk proposals for the Haskell Implementors Workshop has already passed, but they have shorter lightning talks for which you still could get in:
http://www.haskell.org/haskellwiki/HaskellImplementorsWorkshop/2013
Manuel
"Stephen Blackheath [to GHC-iPhone]" < likeliest.complexions.stephen@blacksapphire.com>:
Stephen Blackheath and Luke Iannini are extremely happy to report that as of today, GHC can natively build binaries for iOS devices and the iOS Simulator.
You'll find everything you need here: http://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS
The short of it is you can use "ghc-ios myFiles.hs" to get a universal ARMv7/ARMv7s/i386 static library to drop straight into an Xcode project.
Stephen's already working on some wonderful FRP-powered games, I'm working on a project called SpaceTime that I'll announce shortly, and you may now all begin creating insanely great iOS software using the finest language in the world : ).
Stephen deserves the lion's share of the credit for this project — it's been over 3 years in the making! Many thanks to Maxwell Swadling for generalizing static library builds into a -staticlib flag for GHC, Carter Schonwald for compilation guidance, and the venerable Austin Seipp for reviewing and merging our patches.
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone
participants (8)
-
Carter Schonwald -
Luke Iannini -
Manuel M T Chakravarty -
Nikolas Mayr -
Peter Jones -
Schell Scivally -
Stefan Kersten -
Stephen Blackheath [to GHC-iPhone]