构建GCC失败(/ bin / sh gcc-4.9.2 / config.sub gmp)

时间:2015-07-04 17:26:48

标签: c gcc configure

我已经安装了软件包,并且在gcc-4.9.2的父级直接中,当我指定库的位置时,例如--with-gmp,它说:

configure: WARNING: you should use --build, --host, --target
checking build system type... Invalid configuration `gmp': machine `gmp' not recognized
configure: error: /bin/sh gcc-4.9.2/config.sub gmp failed

命令:

gcc-4.9.2/configure --with-gmp gmp  --enable-languages=c,c++

1 个答案:

答案 0 :(得分:1)

使用--with-gmp的正确方法是--with-gmp=the/path/to/gmp,请注意=之间的空格。正在发生的事情是configure将--with-gmp gmp视为两个不相关的参数,并将gmp视为构建,通常通过--build=your-build-target指定,但似乎只是指定一个不带{的参数{1}}或-它将其视为构建选项。