gpt4 book ai didi

c++ - 在 64 位 Windows 7 (msys2/mingw64) 上构建 GMP 6.1.0 : configure fails due to mp_limb_t is not 64 bits

转载 作者:可可西里 更新时间:2023-11-01 14:13:34 24 4
gpt4 key购买 nike

我尝试在我的 Windows 7 64 位计算机上构建 GMP,因此我运行 config.guess 并获取 k10-pc-msys。 (我用的是msys2和mingw64)

然后我跑了

./configure --prefix=/c/gmp-6.1.0 --build=k10-pc-msys --enable-cxx

但是这个错误退出了

checking size of mp_limb_t... 4
configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
in this configuration expects 64 bits.

因此,我再次使用附加的 ABI=64 运行配置(想强制 mp_limb_t 为 64 位),但这以相同的错误结束。在此之后,我尝试添加 CC="g++"(认为 --enable-cxx 需要 g++),但我又一次收到此错误.

我在谷歌上搜索了很多,发现一个问题报告给了 juliaLang on GitHub这看起来很接近我的问题,但该解决方案似乎对我不起作用,因为我没有使用 Julia。

有没有人知道这个错误并找到了解决方法?

注意:我看到msys2已经安装好了,可以使用了。但是我的程序的运行时间仅通过使用从 msys2 安装的 GMP 构建 NTL 就增加了大约 70%。我认为这是因为它不是为我的计算机构建的,所以根本没有优化。

编辑:即使没有任何设置(只是./configure --prefix=/c/gmp-6.1.0)也会退出并出现同样的错误。

背景:我想使用 NTL 的线程安全构建.但是要构建 NTL 线程安全,我必须使用 GMP。

最佳答案

这可以通过在配置命令中添加 --host=x86_64-w64-mingw32 来解决。通常建议构建使用 Autotools 或某种形式的 Windows 64 位配置脚本的软件。

您可以阅读 this page on the MinGW-w64 wiki了解更多关于这些事情的信息。

关于c++ - 在 64 位 Windows 7 (msys2/mingw64) 上构建 GMP 6.1.0 : configure fails due to mp_limb_t is not 64 bits,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33872434/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com