我试图在运行Linux 2.6的Buffalo LinkStation Pro Duo(unlocking it之后)编译GCC 4.7.2。 31.8 armv5tel。GCC编译产生“real.h:53:错误:'SIZEOF_LONG'这里未声明(不在函数中)”
不幸的是,make
抛出相当一些错误,与
gcc -c -DIN_GCC_FRONTEND -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-formIn file included from ../../gcc-4.7.2/gcc/tree.h:32,
from ../../gcc-4.7.2/gcc/c-lang.c:27:
../../gcc-4.7.2/gcc/real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)
In file included from ../../gcc-4.7.2/gcc/tree.h:32,
from ../../gcc-4.7.2/gcc/c-lang.c:27:
../../gcc-4.7.2/gcc/real.h:87:5: error: division by zero in #if
../../gcc-4.7.2/gcc/real.h:87:5: error: division by zero in #if
../../gcc-4.7.2/gcc/real.h:90:6: error: division by zero in #if
开始53线的real.h
读取unsigned long sig[SIGSZ];
,其中SIGSZ
在管线40作为
#define SIGSZ (SIGNIFICAND_BITS/HOST_BITS_PER_LONG)
限定,而线87是#if REAL_WIDTH == 1
与REAL_WIDTH
限定的起始在作为
#define REAL_WIDTH \
(REAL_VALUE_TYPE_SIZE/HOST_BITS_PER_WIDE_INT \
+ (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */
这似乎归结为HOST_BITS_PER_*
为零。我是否必须用一些configure
参数手动定义这些参数,或者如何解决这个问题?
更新
config.log
包含以下错误:
conftest.c:10:19: error: ppl_c.h: No such file or directory
conftest.c: In function 'main':
conftest.c:16: error: 'choke' undeclared (first use in this function)
conftest.c:16: error: (Each undeclared identifier is reported only once
conftest.c:16: error: for each function it appears in.)
conftest.c:16: error: expected ';' before 'me'
configure:5708: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h. */
| #include "ppl_c.h"
| int
| main()
| {
|.
| #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11
| choke me
| #endif
|.
| ;
| r
继this post我似乎已经忘记了安装ppl,我会尽力现在
该条目在那里,虽然它是'#define SIZEOF_LONG 4'这里。在config.log中还有其他的错误,我把它们追加到我的问题 –
我接受你的答案,因为检查'config.log'指出我缺少'ppl'。但实际的解决方案[涉及更多的麻烦](http://stackoverflow.com/a/13874779/321973) - 如果是解决方案,编译仍在运行...... –