Cannot have GHC in ARMv6 architecture
Karel Gardas
karel.gardas at centrum.cz
Mon Sep 7 19:37:21 UTC 2015
Hi,
I think sysroot option may help you. I wrote something about it for
ARMv8 in the past here:
https://ghcarm.wordpress.com/2014/01/18/unregisterised-ghc-head-build-for-arm64-platform/
Cheers,
Karel
On 09/ 7/15 08:18 PM, jmcf125 at openmailbox.org wrote:
> Hi,
>
> I have tried to have GHC in my Raspberry Pi, got stuck in the issue 7754
> (https://ghc.haskell.org/trac/ghc/ticket/7754), since I didn't know
> where to pass options to terminfo's configure file, although I did copy
> the headers from my Raspberry Pi. I've been using HUGS ever since, as
> Arch Linux doesn't have GHC for ARMv6, and deb2targz would not work.
>
> I'm aware I have a phase 0 compiler installed, need to build a phase 1
> compiler, and use that to cross-compile GHC itself (I wasn't the 1st
> time I tried, couldn't find as much information as now).
>
> I've read the following pages:
> https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/RaspberryPi
> https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling
> https://ghc.haskell.org/trac/ghc/wiki/CrossCompilation
> along with quite a few bug reports, and questions on Stack Overflow that
> seemed related but really aren't, or that are already exposed in the
> tickets mentioned below.
>
> Below,
> /home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo/include-curses and
> /home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo/lib-curses are
> directories to which I copied any headers and libraries, respectively,
> from my Raspberry Pi.
>
> I'm not sure which libraries I am supposed to point configure at. These
> are the headers-libraries combinations I tried:
>
> $ ./configure --target=arm-linux-gnueabihf --with-curses-includes=/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo/include-curses --with-curses-libraries=/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo/lib-curses && make -j5
> (...)
> checking for unistd.h... yes
> checking ncurses.h usability... no
> checking ncurses.h presence... no
> checking for ncurses.h... no
> checking curses.h usability... no
> checking curses.h presence... no
> checking for curses.h... no
> configure: error: in `/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo':
> configure: error: curses headers could not be found, so this package cannot be built
> See `config.log' for more details
> libraries/terminfo/ghc.mk:4: recipe for target 'libraries/terminfo/dist-install/package-data.mk' failed
> make[1]: *** [libraries/terminfo/dist-install/package-data.mk] Error 1
> Makefile:71: recipe for target 'all' failed
> make: *** [all] Error 2
> (https://ghc.haskell.org/trac/ghc/ticket/7754)
>
> $ ./configure --target=arm-linux-gnueabihf --with-curses-includes=/usr/include --with-curses-libraries=/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo/lib-curses && make -j5
> (...)
> checking for unistd.h... yes
> checking ncurses.h usability... yes
> checking ncurses.h presence... yes
> checking for ncurses.h... yes
> checking for setupterm in -ltinfo... no
> checking for setupterm in -lncursesw... no
> checking for setupterm in -lncurses... no
> checking for setupterm in -lcurses... no
> configure: error: in `/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo':
> configure: error: curses library not found, so this package cannot be built
> See `config.log' for more details
> libraries/terminfo/ghc.mk:4: recipe for target 'libraries/terminfo/dist-install/package-data.mk' failed
> make[1]: *** [libraries/terminfo/dist-install/package-data.mk] Error 1
> Makefile:71: recipe for target 'all' failed
> make: *** [all] Error 2
> (https://ghc.haskell.org/trac/ghc/ticket/7281)
>
> $ ./configure --target=arm-linux-gnueabihf --with-curses-includes=/usr/include --with-curses-libraries=/usr/lib && make -j5
> <OR>
> $ ./configure --target=arm-linux-gnueabihf --with-curses-includes=/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo/include-curses --with-curses-libraries=/usr/lib && make -j5
> (...)
> Configuring terminfo-0.4.0.1...
> configure: WARNING: unrecognized options: --with-compiler, --with-gcc
> checking for arm-unknown-linux-gnueabihf-gcc...
> /home/jmcf125/ghc-raspberry-pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc
> checking whether the C compiler works... no
> configure: error: in `/home/jmcf125/ghc-raspberry-pi/ghc/libraries/terminfo':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> libraries/terminfo/ghc.mk:4: recipe for target 'libraries/terminfo/dist-install/package-data.mk' failed
> make[1]: *** [libraries/terminfo/dist-install/package-data.mk] Error 77
> Makefile:71: recipe for target 'all' failed
> make: *** [all] Error 2
>
> Concerning the last 2, it'd be odd if they worked, how could, say, the
> GCC cross-compiler for ARM use x86_64 libraries? I tried them anyway,
> since the 1st 2 errors didn't seem to make sense...
>
> Also, options --includedir and --oldincludedir seem to have no effect
> (always get issue 7754), and it doesn't matter if I build registarised
> or not, the results are the same (registarised, I'm using LLVM 3.6.2-3).
>
> I'm sorry if I'm wasting your time with what to you might seem such a
> simple thing, and not real development on GHC, but I don't know where
> else to turn to. I'm still learning Haskell, and have never had to
> compile compilers before.
>
> Thank you in advance,
> João Miguel
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
More information about the ghc-devs
mailing list