Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem building GHC #1

Open
aluink opened this issue Sep 2, 2013 · 11 comments
Open

Problem building GHC #1

aluink opened this issue Sep 2, 2013 · 11 comments

Comments

@aluink
Copy link

aluink commented Sep 2, 2013

Here's the summary after the GHC configure. http://pastebin.com/dWvgrd4B

Then well into the compile it fails when trying to build Type.o. http://pastebin.com/p8QdBeqt

I'm running:
GHC 7.6.3
XCode 4.6
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/e33566p/Library/Haskell/bin:/Users/e33566p/programs/haskell/ios/ghc-ios-scripts:/usr/local/llvm/bin

Not sure what else is pertinent, let me know and I'll post up.

@lukexi
Copy link
Contributor

lukexi commented Sep 2, 2013

Hi there — can you tell me what version your LLVM install is? We're pretty sure at this point that 3.0 is required and nothing else works (I'm updating the wiki now : ))

@aluink
Copy link
Author

aluink commented Sep 2, 2013

I'm running 3.3. Should I wipe and reinstall with 3.0?

@lukexi
Copy link
Contributor

lukexi commented Sep 2, 2013

That oughta be it — yeah, for sure!

On Sep 2, 2013, at 3:56 PM, Eric Polino [email protected] wrote:

I'm running 3.3. Should I wipe and reinstall with 3.0?


Reply to this email directly or view it on GitHub.

@aluink
Copy link
Author

aluink commented Sep 2, 2013

Ok, giving that a shot. Just to be sure, the following should be sufficient right for the LLVM config? I tried enabling/disabling optimizations previously.

./configure --enable-targets=arm --prefix=/my/prefix

@aluink
Copy link
Author

aluink commented Sep 2, 2013

Hmm, seems 3.0 has a compile error. Now I need to figure out how to compile with GCC.

http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-May/049806.html

@the-real-blackh
Copy link
Member

I built llvm 3.0 from source using just ./configure --prefix=/my/prefix and it gave me all the targets. Make sure you have x86 as well as arm.

@the-real-blackh
Copy link
Member

...actually I would have used gcc because I'm on Mountain Lion and the default system compiler is still gcc.

stephen-blackheaths-mac-mini:~ blackh$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

@aluink
Copy link
Author

aluink commented Sep 3, 2013

Hmm, setting CC=gcc and CXX=g++ "fixed" it.

@aluink
Copy link
Author

aluink commented Sep 3, 2013

Well, guess it wasn't fixed. GHC compilation failed after about 2hrs with a whole bunch of "ARM function not 4-byte aligned" warnings. I'm rebuilding LLVM with x86,arm targets. Then I'll try it again.

@lukexi
Copy link
Contributor

lukexi commented Sep 3, 2013

Hi Eric,
2 things — you can just download LLVM 3.0 binaries here and drop them in your path:
http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz

Also those “not 4-byte aligned” warnings are normal and usually don’t affect anything (so there is probably another error)

Cheers
Luke

On Sep 2, 2013, at 6:34 PM, Eric Polino [email protected] wrote:

Well, guess it wasn't fixed. GHC compilation failed after about 2hrs with a whole bunch of "ARM function not 4-byte aligned" warnings. I'm rebuilding LLVM with x86,arm targets. Then I'll try it again.


Reply to this email directly or view it on GitHub.

@aluink
Copy link
Author

aluink commented Sep 4, 2013

Alright, I got it working and verified in the simulator. I'll be posting a blog post outlining my steps in detail for the community to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants