在 Windows 上编译 GDC — 从哪里获取 GMP 和 MPFR 依赖项?

发布于 2024-10-20 00:36:25 字数 3020 浏览 1 评论 0原文

我正在尝试使用 MinGW 的 MSYS 在 Windows 7 上编译 GDC (v2)

当我到达这一步时:

$ ../configure --enable-languages=d --disable-shared --disable-bootstrap

我得到:

checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

尝试使用 --with-gmp 和/或 --with-mpfr 选项来指定它们的位置。

这些库的源代码副本可以在各自的位置找到 托管站点以及 ftp://gcc.gnu.org/pub/gcc/infrastruct/ 。 另请参阅 http://gcc.gnu.org/install/precessions.html 了解更多信息信息。 如果您从供应商分发包中获得了 GMP 和/或 MPFR,请 确保您已安装库和头文件。 它们可能位于单独的包中。

这让我回顾了说明,其中指出它需要这些库:

  • libgmp3- dev
  • libmpfr-dev
  • libmpc-dev

现在的问题是,我在哪里可以找到这些头文件和/或库?我已经搜索了 libgmp3-dev,但找不到任何适用于 Windows 的内容。 (我还在*nix的学习过程中,所以我对任何东西都不太熟悉。)

谢谢!


更新

所以我尝试制作 MPFR(我什至不知道它是否是正确的版本),但我得到了这个错误:

$ make install
Making install in tests
[...]
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /bin/install -c   libmpfr.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libmpfr.lai /usr/local/lib/libmpfr.la
libtool: install: /bin/install -c .libs/libmpfr.a /usr/local/lib/libmpfr.a
libtool: install: chmod 644 /usr/local/lib/libmpfr.a
libtool: install: ranlib /usr/local/lib/libmpfr.a
/bin/sh: /home/Home: No such file or directory
make[2]: *** [install-libLTLIBRARIES] Error 127
make[2]: Leaving directory `/home/Home User/mpfr-2.4.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/Home User/mpfr-2.4.2'
make: *** [install-recursive] Error 1

有什么想法吗?

I'm trying to compile GDC (v2) on Windows 7, using MinGW's MSYS.

When I get to this step:

$ ../configure --enable-languages=d --disable-shared --disable-bootstrap

I get:

checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $f1 $f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

Try the --with-gmp and/or --with-mpfr options to specify their locations.

Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

This made me look back at the instructions, which noted that it needs these libraries:

  • libgmp3-dev
  • libmpfr-dev
  • libmpc-dev

So now the question is, where do I find these headers and/or libraries? I've searched all over for libgmp3-dev, but I can't find anything for Windows. (I'm still in the learning process for *nix, so I'm not too familiar with anything.)

Thanks!


Update:

So I tried to make MPFR (I don't even know if it was the right version), and I got this error:

$ make install
Making install in tests
[...]
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /bin/install -c   libmpfr.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libmpfr.lai /usr/local/lib/libmpfr.la
libtool: install: /bin/install -c .libs/libmpfr.a /usr/local/lib/libmpfr.a
libtool: install: chmod 644 /usr/local/lib/libmpfr.a
libtool: install: ranlib /usr/local/lib/libmpfr.a
/bin/sh: /home/Home: No such file or directory
make[2]: *** [install-libLTLIBRARIES] Error 127
make[2]: Leaving directory `/home/Home User/mpfr-2.4.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/Home User/mpfr-2.4.2'
make: *** [install-recursive] Error 1

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

笑看君怀她人 2024-10-27 00:36:25

http://gmplib.org/

http://www.mpfr.org/

只需下载源 tarball 即可。至于构建这些,我不记得细节(说明应该很清楚),但我知道你可以将这些 GMP 和 MPFR 放在 GCC 的源代码树中,GCC 构建过程将自动负责构建这些。这可能比作为一个单独的步骤为它们构建/安装/设置环境变量更容易。

http://gmplib.org/

http://www.mpfr.org/

Just download the source tarballs. As for building these, I don't remember the details (the instructions should be clear on this) but I know you can put these GMP and MPFR in the source tree with GCC and the GCC build process will automatically take care of building these. This may be easier than building/installing/setting environment variables for them as a discrete step.

删除→记忆 2024-10-27 00:36:25

我总是使用它在 Windows 上构建 gdc: http://gladman.plushost.co .uk/oldsite/computing/gmp4win.php

I always use this for building gdc on Windows: http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php

败给现实 2024-10-27 00:36:25

您发布的错误消息包含查找库的链接。您可能需要下载它们的源代码并编译它们,但它们都很容易构建。

The error message you posted has the links to find the libraries. You might need to download their source code and compile them, but they are both easy to build.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文