网站建设实践课程报告,seo网站优化工具,wordpress多媒体权限,苏宁网站建设我在RHEL X86_64上安装GCC i686时遇到一些麻烦.确实,我必须在此平台上构建一些32位软件和共享库.我可以在32位平台(Linux或Windows)上构建这些软件和库.我的问题在这篇文章的结尾.我的第一个问题是这个错误#xff1a;(在buil期间,在Eclipse -helios下)In file included from …我在RHEL X86_64上安装GCC i686时遇到一些麻烦.确实,我必须在此平台上构建一些32位软件和共享库.我可以在32位平台(Linux或Windows)上构建这些软件和库.我的问题在这篇文章的结尾.我的第一个问题是这个错误(在buil期间,在Eclipse -helios下)In file included from /usr/include/stdlib.h:314,from ../../../../../XXXX.h:19,from /XXXX.c:33:/usr/include/sys/types.h:150: error: duplicate unsigned/usr/include/sys/types.h:151: error: duplicate unsigned/usr/include/sys/types.h:151: error: duplicate short/usr/include/sys/types.h:152: error: duplicate unsigned/usr/include/sys/types.h:152: error: two or more data types in declaration specifiersmake: *** [XXXX.o] Error 1要更正此错误,我必须将stdlib.h include放在所有其他文件之前,但是我有很多文件,有时此技巧还是不管用.而且,我不应该修改源文件.使用朋友提供的makefile构建共享库时,我遇到完全相同的问题.这个makefile在他的平台上运行良好(与我相同,RHEL 4.4.6 x86_64).他告诉我出现错误是因为我使用X86_64 lib来构建32位软件(或共享库).这是我的GCC版本GCC version[rootlocalhost bin]# gcc -vTarget: x86_64-redhat-linuxConfigured with: ../configure --prefix/usr--mandir/usr/share/man--infodir/usr/share/info--with-bugurlhttp://bugzilla.redhat.com/bugzilla--enable-bootstrap--enable-shared--enable-threadsposix--enable-checkingrelease--with-system-zlib--enable-__cxa_atexit--disable-libunwind-exceptions--enable-gnu-unique-object--enable-languagesc,c,objc,obj-c,java,fortran,ada--enable-java-awtgtk--disable-dssi--with-java-home/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre--enable-libgcj-multifile--enable-java-maintainer-mode--with-ecj-jar/usr/share/java/eclipse-ecj.jar--disable-libjava-multilib--with-ppl--with-cloog--with-tunegeneric--with-arch_32i686--buildx86_64-redhat-linuxthread: posixgcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)[rootlocalhost bin]# rpm -qa |grep gccgcc-c-4.4.6-3.el6.x86_64gcc-4.4.6-3.el6.x86_64gcc-gfortran-4.4.6-3.el6.x86_64因此,首先,我从RHEL DVD安装程序安装了glibc.i686和libgcc.i686软件包.我现在有Installed packages (from redhat DVD)[rootlocalhost bin]# rpm -qa |grep glibcglibc-common-2.12-1.47.el6.x86_64glibc-2.12-1.47.el6.x86_64glibc-devel-2.12-1.47.el6.x86_64glibc-devel-2.12-1.47.el6.i686glibc-headers-2.12-1.47.el6.x86_64glibc-2.12-1.47.el6.i686[rootlocalhost bin]# rpm -qa |grep libgcclibgcc-4.4.6-3.el6.x86_64libgcc-4.4.6-3.el6.i686由于GCC是x86_64,因此我阅读了一些有关交叉编译的文档,尤其是以下文档wiki.osdev.org/GCC_Criss-Compiler所以我下载了gcc-4.4.6.tar.gz,binutils-2.23.tar.gz,gmp-5.0.2.tar.gz和mpfr-3.1.1.tar.gz.我将目录gmp-5.0.2和mpfr-3.1.1放在gcc-4.4.6目录中(并将gmp-5.0.2重命名为gmp,将mpfr-3.1.1重命名为mpfr).我遵循了wiki.osdev的说明,即export PREFIX/usr/local/crossexport TARGETi686-elfcd /usr/srcmkdir build-binutils build-gcccd /usr/src/build-binutils../binutils-x.xx/configure --target$TARGET --prefix$PREFIX --disable-nlsmake allmake installcd /usr/src/build-gccexport PATH$PATH:$PREFIX/bin../gcc-x.x.x/configure --target$TARGET --prefix$PREFIX --disable-nls \n --enable-languagesc,c --without-headersmake all-gccmake install-gcc binutils的’make all’和’make install’好“制作全gcc”-第一个错误“ real.h”中缺少“ mpfr.h”.所以我在gcc-4.4.6 / gcc中添加了mpfr.h,这样就可以了(也许实际上不是…)-第2个错误(目前唯一的错误)[...]gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall-Wwrite-strings-Wstrict-prototypes-Wmissing-prototypes-Wcast-qual-Wold-style-definition-Wc-compat-Wmissing-format-attribute-pedantic-Wno-long-long-Wno-variadic-macros-Wno-overlength-strings-DHAVE_CONFIG_H-o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.oc-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.oc-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o c-parser.o i386-c.oc-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \n main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a-L/usr/src/build-gcc/./gmp/.libs -L/usr/src/build-gcc/./gmp/_libs-L/usr/src/build-gcc/./mpfr/.libs -L/usr/src/build-gcc/./mpfr/_libs-lmpfr -lgmp**/usr/bin/ld: cannot find -lmpfrcollect2: ld returned 1 exit statusmake[1]: *** [cc1-dummy] Error 1make[1]: Leaving directory /usr/src/build-gcc/gccmake: *** [all-gcc] Error 2****最后,我的问题是这种交叉编译是否可以解决我的问题解决ld mpfr丢失问题的好方法是什么**发布前,我做了很多研究.我的Linux知识目前还不是很好.预先感谢您的帮助.?编辑#1我已经尝试过-m32标志,但是问题仍然存在.例如,如果我运行一个makefile[rootlocalhost makefile]# make -f sharedLib.makgcc -m32 -marchi686 -O2 -Wall -I ../../sharedLib/inc/ -o XXX.o -c ../src/XXX.cIn file included from /usr/include/stdlib.h:314,from ../src/XXX.c:51:/usr/include/sys/types.h:150: error: duplicate unsigned/usr/include/sys/types.h:151: error: duplicate unsigned/usr/include/sys/types.h:151: error: duplicate short/usr/include/sys/types.h:152: error: duplicate unsigned/usr/include/sys/types.h:152: error: two or more data types in declaration specifiersmake: *** [XXX.o] Error 1这是XXX.c#include alphabet.h#include outils.h#include erreur.h#include #include (line 51 error)如果以这种方式修改#include #include alphabet.h#include outils.h#include erreur.h#include XXX.c一切正常,但下一个源文件出现错误…