gcc在i686上找不到bits / predefs.h [英] gcc cannot find bits/predefs.h on i686

查看:204
本文介绍了gcc在i686上找不到bits / predefs.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我从Ubuntu 12.04 64位切换到32位并安装了 build-essential。



然后我编译并安装了GMP-5.0.5,MPFR-3.1.1,MPC-1.0,ISL-0.10和CLOOG-0.17.0。我检出了一份主要的gcc主干,并尝试用下面的配置行(从一个单独的目录)构建它:

  ../ svnsrc / configure --prefix = / usr / GCC / svn --enable -__ cxa_atexit --with-plugin-ld = / usr / bin / ld.gold --enable-threads = posix --enable-werror --enable-build-with-cxx --with-gmp = / usr / GCC / prereq / svn --with-mpfr = / usr / GCC / prereq / svn --with-mpc = / usr / GCC / prereq / svn --with-isl = / usr / GCC / prereq / svn --with-cloog = / usr / GCC / prereq / svn --enable-languages = c,c ++ 

配置运行良好,因此我运行了 make&&进行检查。这运行良好一段时间,但然后失败,出现以下错误:

  / home / matt / GCC / svnbuild /。 / gcc / xgcc -B / home / matt / GCC / svnbuild /./ gcc / -B / usr / GCC / svn / i686-pc-linux-gnu / bin / -B / usr / GCC / svn / i686-pc -linux-gnu / lib / -isystem / usr / GCC / svn / i686-pc-linux-gnu / include -isystem / usr / GCC / svn / i686-pc-linux-gnu / sys-include -g -O2  - O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong -double -80 -I。 -一世。 -I ../.././ gcc -I ../../../ svnsrc / libgcc -I ../../../ svnsrc / libgcc /。 -I ../../../ svnsrc / libgcc /../ gcc -I ../../../ svnsrc / libgcc /../ include -I ../../../ svnsrc / libgcc / config / libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../svnsrc/libgcc/libgcc2。 c -fvisibility = hidden -DHIDE_EXPORTS 
在/usr/include/stdio.h:28:0包含的文件中,从../../../svnsrc/libgcc/../gcc获得
/tsystem.h:88,
来自../../../svnsrc/libgcc/libgcc2.c:29:
/usr/include/features.h:324:26:致命错误:bits / predefs.h:没有这样的文件或目录
#include< bits / predefs.h>
^
编译终止。
make [3]:*** [_muldi3.o]错误1
make [3]:离开目录`/ home / matt / GCC / svnbuild / i686-pc-linux-gnu / libgcc

我环顾四周,但我似乎发现的一切都是这个错误是由x86_64引起的, gcc-multilib ,因为Ubuntu和Debian使用mutiarch系统,将库分开。好的,没问题,但是我使用i686,那么为什么我需要64位库?任何帮助,将不胜感激。谢谢。

解决方案

尝试做一个

  sudo apt-get install gcc-multilib 

我不认为安装32位系统会更改计算机的体系结构,因为您的计算机始终是64位计算机。安装64位版本的Ubuntu应该只会提供更好的多核性能。由于您的计算机仍然是64位计算机,因此您可能需要一个可在64位计算机上编译的C编译器。因此gcc-multilib。我想。


Okay, so, I switched from ubuntu 12.04 64-bit to 32-bit and installed build-essential.

I then compiled and installed GMP-5.0.5, MPFR-3.1.1, MPC-1.0, ISL-0.10 and CLOOG-0.17.0. I checked out a copy of the main gcc trunk and attempted to build it with the following configure line (from a separate directory):

../svnsrc/configure --prefix=/usr/GCC/svn --enable-__cxa_atexit --with-plugin-ld=/usr/bin/ld.gold --enable-threads=posix --enable-werror --enable-build-with-cxx --with-gmp=/usr/GCC/prereq/svn --with-mpfr=/usr/GCC/prereq/svn --with-mpc=/usr/GCC/prereq/svn --with-isl=/usr/GCC/prereq/svn --with-cloog=/usr/GCC/prereq/svn --enable-languages=c,c++

Configure ran fine and so I ran make && make check. This ran fine for a while, but then it failed with the following error:

/home/matt/GCC/svnbuild/./gcc/xgcc -B/home/matt/GCC/svnbuild/./gcc/ -B/usr/GCC/svn/i686-pc-linux-gnu/bin/ -B/usr/GCC/svn/i686-pc-linux-gnu/lib/ -isystem /usr/GCC/svn/i686-pc-linux-gnu/include -isystem /usr/GCC/svn/i686-pc-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../svnsrc/libgcc -I../../../svnsrc/libgcc/. -I../../../svnsrc/libgcc/../gcc -I../../../svnsrc/libgcc/../include -I../../../svnsrc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../svnsrc/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/stdio.h:28:0,
                 from ../../../svnsrc/libgcc/../gcc/tsystem.h:88,
                 from ../../../svnsrc/libgcc/libgcc2.c:29:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
 #include <bits/predefs.h>
                          ^
compilation terminated.
make[3]: *** [_muldi3.o] Error 1
make[3]: Leaving directory `/home/matt/GCC/svnbuild/i686-pc-linux-gnu/libgcc

I looked around, but everything I seemed to find was that this error was caused on x86_64, by not installing gcc-multilib, because Ubuntu and Debian use the mutiarch system, separating the libraries. Okay, fine...but I'm using i686, so why would I need the 64-bit libraries? Any help would be appreciated. Thanks.

解决方案

Try doing a

sudo apt-get install gcc-multilib

I don't think that installing a 32-bit system changes the architecture of your computer, because your computer will always be a 64-bit machine. Installing the 64-bit version of Ubuntu should only give better multi-core performance. Since your computer is still a 64-bit computer, you probably need a C compiler that will compile on 64-bit machines. Hence the gcc-multilib. I think.

这篇关于gcc在i686上找不到bits / predefs.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆