raspberry-pi ghc curses cross-compiling

raspberry pi - compilación cruzada, maldiciones ghc no encontradas



raspberry-pi curses (1)

Traté de crosscompile de linux i386 a arm-linux-gnueabihf, pero no puedo hacerlo, porque me da este extraño error al ejecutar ''make'':

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/edi/ghc_cross/ghc/libraries/terminfo'': configure: error: curses library not found, so this package cannot be built See ''config.log'' for more details make[2]: *** [libraries/terminfo/dist-install/package-data.mk] Error 1 make[1]: *** [all_libraries/terminfo] Error 2 make[1]: Leave Directory ''/home/edi/ghc_cross/ghc'' make: *** [all] Error 2

Qué he hecho:

-) Compilado 7.8.0 desde github (El registro dice ''Eso debería haber sido 7.8.0'', elegí 7.8 porque pensé que sería más estable para la compilación cruzada) a mi i386 (arranque normal, configurar, hacer, hacer instalar) . Esto funcionó bien

-) instaló el nuevo llvm de svn (LLVM versión 3.5svn)

-) reemplazó el libffi-3.0.11.tar.gz en ghc / libffi-tarballs con libffi-3.0.13

-) agregó esta versión de mk / build.mk:

SRC_HC_OPTS = -H32m _o -fasm -Rghc-timing GhcStage1HcOpts = -O -fasm GhcStage2HcOpts = -O0 -DDEBUG -Wall GhcLibHcOpts = -O -fasm -XGenerics GhcLibWays = v dyn SplitObjs = NO Stage1Only = YES

-) descargó el código fuente de ncurses de ftp.de.debian.org/debian/pool/main/n/ncurses/ncurses_5.9.orig.tar.gz y lo compiló con "./configure arm-linux-gnueabihf - -with-gcc = arm-linux-gnueabihf-gcc --target = arm-linux-gnueabihf --prefix = / usr / arm-linux-gnueabihf "+" make ". luego agregué la carpeta a mi $ PATH

-) hizo "perl boot", "./configure --target = arm-linux-gnueabihf --with-gcc = arm-linux-gnueabihf-gcc --prefix = / usr / arm-linux-gnueabihf" y "make" ". ./configure funcionó, pero make me da este extraño error.

También intenté copiar todos los archivos incluidos de ncurses a la carpeta libraries / terminfo, pero eso tampoco funcionó. Creo que el error está en algún lugar del proceso de construcción, pero no estoy exactamente seguro, así que es por eso que estoy publicando este error.

También traté de obtener libncurses5-dev.deb y libtinfo-dev de mi Raspberry pi con "apt-get download libncurses5-dev" y "apt-get descargar libncurses5-dev" y los copié en mi i386, los extraje y los agregué a mi $ PATH

¿Alguien tiene una idea sobre cómo puedo solucionar ese problema con maldiciones?

PD: también me aseguré de cumplir los prerrequisitos mencionados en ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux y ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling

Editar: este es el registro de mi config.log:

`

configure:3400: checking for setupterm in -lcurses configure:3425: arm-linux-gnueabihf-gcc -o conftest -fno-stack-protector conftest.c -lcurses >&5 /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /usr/lib/../lib/libcurses.a when searching for -lcurses /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /usr/lib/libcurses.a when searching for -lcurses /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcurses collect2: error: ld returned 1 exit status configure:3425: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "Haskell terminfo package" | #define PACKAGE_TARNAME "terminfo" | #define PACKAGE_VERSION "0.2" | #define PACKAGE_STRING "Haskell terminfo package 0.2" | #define PACKAGE_BUGREPORT "judah dot jacobson at gmail dot com" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char setupterm (); | int | main () | { | return setupterm (); | ; | return 0; | } configure:3434: result: no configure:3450: error: in `/home/edi/ghc_cross/ghc/libraries/terminfo'': configure:3452: error: curses library not found, so this package cannot be built See "config.log" for more details

`

Saludos, Edi


Entonces, he encontrado la solución.

Lo que hice fue lo siguiente:

compiló la biblioteca de ncurses con el brazo-gcc con el siguiente comando:

./configure --target=arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc --with-shared --host=arm-linux-gnueabihf --with-build-cpp=arm-linux-gnueabihf-g++

después hice y configuré mi ghc con lo siguiente:

./configure --target=arm-linux-gnueabihf --with-gcc=arm-linux-gnueabihf-gcc --prefix=/usr/arm-linux-gnueabihf --with-shared --with-sysroot=/path/to/cursescompiled/libs

Luego pasó y ya no me pidió la biblioteca de maldiciones.

así que chicos, espero que esto sea útil para ustedes