neurocyte / ghc-android

Build scripts for building ghc cross compilers targeting Android
182 stars 29 forks source link

compiling on x86_64 #12

Closed TrinCZ closed 11 years ago

TrinCZ commented 11 years ago

Hi, after a long pause, I got excited about haskell on android again and found your github. I'm trying to use this on ubuntu-12.04, x86_64. With some build script modifications, I have reached the actual ghc compilation:

./configure --prefix=/home/trin/handroid/ghc --target=arm-linux-androideabi

... lots of output ... every header.h check looks like this:

configure: WARNING: sys/eventfd.h: present but cannot be compiled configure: WARNING: sys/eventfd.h: check for missing prerequisite headers? configure: WARNING: sys/eventfd.h: see the Autoconf documentation configure: WARNING: sys/eventfd.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/eventfd.h: proceeding with the compiler's result configure: WARNING: ## ----------------------------------------------- ## configure: WARNING: ## Report this to glasgow-haskell-bugs@haskell.org ## configure: WARNING: ## ----------------------------------------------- ##

... lots of output

Configure completed successfully.

Building GHC version : 7.7.20130428

Build platform : x86_64-unknown-linux Host platform : x86_64-unknown-linux Target platform : arm-unknown-linux-android

Bootstrapping using : /usr/bin/ghc which is version : 7.4.1

Using gcc : /home/trin/handroid/ghc-android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc which is version : 4.7 Building a cross compiler : YES

ld : /home/trin/handroid/ghc-android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld Happy : /usr/bin/happy (1.18.9) Alex : /usr/bin/alex (3.0.1) Perl : /usr/bin/perl dblatex : xsltproc :

Using LLVM tools llc : /home/trin/handroid/llvm-3.2/bin/llc opt : /home/trin/handroid/llvm-3.2/bin/opt

HsColour was not found; documentation will not contain source links

Building DocBook HTML documentation : NO Building DocBook PS documentation : NO

Building DocBook PDF documentation : NO

... but then during make, there is:

inplace/bin/deriveConstants --gen-header -o includes/dist-derivedconstants/header/DerivedConstants.h --tmpdir includes/dist-derivedconstants/header/ --gcc-program "/home/trin/handroid/ghc-android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc" --gcc-flag -fno-stack-protector --gcc-flag -Iincludes --gcc-flag -Iincludes/dist --gcc-flag -Iincludes/dist-derivedconstants/header --gcc-flag -Iincludes/dist-ghcconstants/header --gcc-flag -Irts --gcc-flag -fcommon --nm-program "/home/trin/handroid/ghc-android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm" In file included from includes/Rts.h:30:0, from includes/dist-derivedconstants/header/tmp.c:13: includes/Stg.h:65:18: fatal error: math.h: No such file or directory compilation terminated.

Does the config result look sane? Any idea what can be wrong? I will try tomorrow again with x86, because I ran out of ideas.

Thanks for any help, Martin

TrinCZ commented 11 years ago

Finaly figured that out. Please, consider this issue invalid.

xcrimson commented 10 years ago

Could you contribute your build script & commentaries for the rest of ubuntu-12.04 x86_64 users?