【问题标题】:Compiling GMP for cross compiler problem为交叉编译器问题编译 GMP
【发布时间】:2011-02-24 12:30:29
【问题描述】:

我正在为我的 mac/linux 交叉编译器编译 gnu gmp,但是我收到了这个错误:

In file included from ../gmp-impl.h:102,
                 from fib_table.c:4:
../fib_table.h:4: warning: data definition has no type or storage class
../fib_table.h:4: warning: type defaults to ‘int’ in declaration of ‘Error’
../fib_table.h:4: warning: type defaults to ‘int’ in declaration of ‘error’
../fib_table.h:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘data’
fib_table.c:7: warning: data definition has no type or storage class
fib_table.c:7: warning: type defaults to ‘int’ in declaration of ‘Error’
fib_table.c:7: warning: type defaults to ‘int’ in declaration of ‘error’
fib_table.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘data’
fib_table.c:107: warning: ISO C does not allow extra ‘;’ outside of a function
make[2]: *** [fib_table.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

运行“make”时

我的配置命令是“./configure --prefix=/Users/daniel/gmp --build=i386-linux”

【问题讨论】:

  • 丹尼尔,你有没有运行过make clean?你的配置成功了吗?你的意思是什么(什么是主机 - 启动编译器的机器和目标 - 将运行这个 gmp 的机器)?
  • 我正在编译这个 gmp,所以我可以为 linux 编译一个交叉编译器。我正在 Mac 上编译这个 gmp
  • 再次 - 你必须告诉交叉编译器配置脚本
  • :S 根本没有人回答:S
  • 如果没有--build 选项,它可以工作吗?您的问题可能与此无关 - 您可能只是询问如何在 Mac 上编译 GMP。另外,这是什么版本的GMP?当前的稳定版本?

标签: linux gnu gmp


【解决方案1】:

make distclean 帮我解决了

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-05
    • 1970-01-01
    • 1970-01-01
    • 2020-02-05
    相关资源
    最近更新 更多