找不到交叉编译ghc curses

视觉之星

我试图从linux i386交叉编译到arm-linux-gnueabihf,但是我无法实现,因为它在运行“ 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

我做了什么:

-)从github编译7.8.0(日志说“应该是7.8.0”,我选择7.8,因为我认为交叉编译会更稳定)到我的i386(正常启动,配置,制作,安装) 。这很好

-)从svn(LLVM版本3.5svn)安装了最新的llvm

-)用libffi-3.0.13替换了ghc / libffi-tarballs中的libffi-3.0.11.tar.gz

-)添加了此版本的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

-)从ftp.de.debian.org/debian/pool/main/n/ncurses/ncurses_5.9.orig.tar.gz下载了ncurses的源代码,并使用“ ./configure arm-linux-gnueabihf- -with-gcc = arm-linux-gnueabihf-gcc --target = arm-linux-gnueabihf --prefix = / usr / arm-linux-gnueabihf“ +” make“。之后,我将该文件夹添加到我的$ PATH中

-)“ perl boot”,“ ./ configure --target = arm-linux-gnueabihf --with-gcc = arm-linux-gnueabihf-gcc --prefix = / usr / arm-linux-gnueabihf”和“ make ”。./configure起作用了,但是make给了我这个奇怪的错误。

我还尝试将所有包含的文件从ncurses复制到library / terminfo文件夹,但这也没有用。我认为错误是在构建过程中的某个地方,但是我不确定,所以这就是我发布此错误的原因。

我还尝试通过“ apt-get download libncurses5-dev”和“ apt-get download libncurses5-dev”从我的Raspberry pi中获取libncurses5-dev.deb和libtinfo-dev,并将它们复制到我的i386中,将其提取并添加到我的$ PATH

有谁知道我如何用诅咒解决这个问题?

PS:我还确保我满足ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux和ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling中提到的先决条件

编辑:这是我的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

`

问候,埃迪

视觉之星

因此,我已经找到了解决方案。

我所做的是以下内容:

使用以下命令使用arm-gcc编译ncurses库:

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

之后,我做了并用以下配置了我的ghc:

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

然后它通过了,不再向我要诅咒图书馆了。

所以,我希望这对您有帮助

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

找不到交叉编译ghc curses

来自分类Dev

在curses支持下编译Python

来自分类Dev

找不到CMAKE交叉编译库

来自分类Dev

找不到ARM交叉编译包

来自分类Dev

NVCC CUDA交叉编译找不到“ -lcudart”

来自分类Dev

使找不到当前交叉编译器

来自分类Dev

交叉编译systemd:找不到cap_init

来自分类Dev

构建交叉编译器-错误:找不到libmpfr

来自分类Dev

是什么提供了名为curses.h的curses头文件?

来自分类Dev

类型错误:“_curses.curses 窗口”对象不可调用

来自分类Dev

在为NetBurner交叉编译时,为什么GCC找不到openssl标头?

来自分类Dev

自动工具,如果找不到交叉编译器将如何失败

来自分类Dev

交叉编译适用于ARM的MongoDB C ++驱动程序。找不到Boost库

来自分类Dev

在为NetBurner交叉编译时,为什么GCC找不到openssl标头?

来自分类Dev

在 Qt 自定义构建中找不到 Qt 模块 (QtSerialPort)(为 ARM 交叉编译)

来自分类Dev

Python curses程序。什么字符是^?

来自分类Dev

python curses tty屏幕闪烁

来自分类Dev

python:curses在IDLE中冻结

来自分类Dev

Python curses getmouse返回负数

来自分类Dev

GHC找不到已安装的模块

来自分类Dev

GHC导致“ ld:找不到-lgmp库”

来自分类Dev

EclipseFP正在搜索GHC,但找不到它

来自分类Dev

GHC在阴谋沙箱中找不到模块

来自分类Dev

GHC找不到已安装的模块

来自分类Dev

UNIX:交叉编译使用共享对象文件的二进制文件后,找不到文件或目录

来自分类Dev

交叉编译为什么ld找不到共享库/如何进一步调试?

来自分类Dev

Ruby Curses:如何获得纯白色

来自分类Dev

Perl / Curses事件处理和I / O

来自分类Dev

捕获了Curses :: UI :: Grid选项卡

Related 相关文章

热门标签

归档