错误1& 2 在 OpenSolaris 2009.06 上编译 GCC 4.4.2 时

发布于 2024-08-08 07:38:58 字数 1749 浏览 6 评论 0原文

我的问题

我一直在尝试在 VirtualBox 3 i386 计算机上安装 OpenSolaris 2009.06 时编译、构建和安装 GCC 4.4.2。但是在运行 make 时我不断遇到同样的错误:

> checking whether ln -s works... yes
checking for i386-pc-solaris2.11-gcc... /src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/xgcc -B/src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/ -B/usr/gnu/i386-pc-solaris2.11/bin/ -B/usr/gnu/i386-pc-solaris2.11/lib/ -isystem /usr/gnu/i386-pc-solaris2.11/include -isystem /usr/gnu/i386-pc-solaris2.11/sys-include
checking for suffix of object files... configure: error: in `/src/gcc-4.4.2/i386-pc-solaris2.11/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/src/gcc-4.4.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/src/gcc-4.4.2'
make: *** [all] Error 2

尝试的解决方案:

  1. 我尝试了这个问题的答案: 在 OpenSolaris 2009.6 上编译 gcc 4.4.0 时出现问题

    <块引用>

    ./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas -- with-gnu-as --with-gnu-ld

  2. 我尝试了 GNU GCC 的平台特定解决方案: GNU Solaris 特定构建说明

    <块引用>

    ./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas -- with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared

尽管使用上面的两个解决方案运行 ./configure ,但我仍然遇到相同的错误

帮助将不胜感激! 谢谢!

My problem:

I've been trying to compile, build, and install GCC 4.4.2 in my installation of OpenSolaris 2009.06 on my VirtualBox 3 i386 machine. But I keep getting this same error when running make:

> checking whether ln -s works... yes
checking for i386-pc-solaris2.11-gcc... /src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/xgcc -B/src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/ -B/usr/gnu/i386-pc-solaris2.11/bin/ -B/usr/gnu/i386-pc-solaris2.11/lib/ -isystem /usr/gnu/i386-pc-solaris2.11/include -isystem /usr/gnu/i386-pc-solaris2.11/sys-include
checking for suffix of object files... configure: error: in `/src/gcc-4.4.2/i386-pc-solaris2.11/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/src/gcc-4.4.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/src/gcc-4.4.2'
make: *** [all] Error 2

Attempted solutions:

  1. I tried the answer to this question:
    Problem compiling gcc 4.4.0 on OpenSolaris 2009.6 i.e.

    ./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas --with-gnu-as --with-gnu-ld

  2. I tried GNU GCC's platform specific solution:
    GNU Solaris specific build instructions
    i.e.

    ./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared

I am still getting the same errors despite running ./configure with the two solutions above

Any help would be appreciated!
Thanks!

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

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

发布评论

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

评论(1

小…楫夜泊 2024-08-15 07:38:58
  • 你能用现有的GCC编译程序吗?

    <块引用>

    如果没有,您需要解决这个问题。

    如果可以的话,那么您需要查看那个可怕的 7 个参数命令(其中显示“检查 i386-pc-solaris2.11-gcc”的命令 - 为什么是这 7 个参数?)。

  • 您是否正在运行“make bootstrap”?

    <块引用>

    如果没有,那么当你这样做时会发生什么?

    如果有,处理过程中在哪里? (这是第一阶段,还是第二阶段,还是什么?)

  • 您是否使用推荐的设置,GCC 的源代码位于 /src/gcc-4.4.2 中,目标文件位于 / src/gcc-4.4.2-obj?

    <块引用>

    如果没有,就这样做。使用:cd /src/gcc-4.4.2-obj; ../gcc-4.4.2/配置...

  • 您使用哪个 shell?

    <块引用>

    在常规 Solaris 10(不是 OpenSolaris - 和 SPARC,不是 Intel)上,我必须在环境中设置 CONFIG_SHELL=/bin/ksh 才能编译(默认情况下,它使用 /bin/sh,但 /bin Solaris 10 上的 /sh 是 Bourne shell,并且在 Java 部分 (IIRC) 深处有一个脚本,它使用 Bash/Korn/POSIX shell 符号,例如 $(cmd ...))。然而,这通常会影响处理的后期阶段。

但是,我在 Solaris 10 上安装了 GCC 4.4.2,没有任何问题(使用 GCC 4.4.1 作为引导编译器)。

  • Can you compile programs with the existing GCC?

    If not, you need to resolve that.

    If you can, then you need to look at that monstrous 7-argument command (the one where it says 'checking for i386-pc-solaris2.11-gcc' - why those 7 arguments?).

  • Are you running 'make bootstrap'?

    If not, what happens when you do?

    If so, whereabouts in the processing is it? (Is this stage 1, or stage 2, or what?)

  • Are you using the recommended setup, with the source for GCC in, say, /src/gcc-4.4.2 and the object files in, say, /src/gcc-4.4.2-obj?

    If not, do so. Use: cd /src/gcc-4.4.2-obj; ../gcc-4.4.2/configure ...

  • Which shell do you use?

    On regular Solaris 10 (not OpenSolaris - and SPARC, not Intel), I have to set CONFIG_SHELL=/bin/ksh in the environment to make things compile (by default, it uses /bin/sh, but the /bin/sh on Solaris 10 is Bourne shell and there's a script deep down in the Java section (IIRC) that uses Bash/Korn/POSIX shell notations like $(cmd ...)). However, that normally affects a much later stage in the processing.

However, I have got GCC 4.4.2 on Solaris 10 without problem (using GCC 4.4.1 as the bootstrap compiler).

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