【问题标题】:Error building glibc2.23构建 glibc2.23 时出错
【发布时间】:2016-11-20 06:10:33
【问题描述】:

我正在尝试在旧版本上构建 glibc 的最新版本 (2.23) 的Linux。为此,我重建了最新版本的gccbinutils

~/software/include >uname -a
Linux 2.6.32-573.3.1.el6.x86_64 #1 SMP Mon Aug 10 09:44:54 EDT 2015 x86_64
x86_64 x86_64 GNU/Linux

~/software/include >gcc --version
gcc (GCC) 5.3.0

~/software/include >make --version
GNU Make 3.81

~/software/include >ld --version
GNU ld (GNU Binutils) 2.26.20160125

然后我配置glibc如下:

~/software/tmp/glibc-build >../glibc-2.23/configure --prefix=$HOME/software --enable-add-ons=linuxthreads

但是,make 失败并出现以下(以及更多)错误。任何建议将不胜感激。

~/software/tmp/glibc-build >make

...
...

    ./../include/libc-symbols.h:24:21: note: in expansion of macro ‘IN_MODULE’
 #define IS_IN(lib) (IN_MODULE == MODULE_##lib)
                     ^
./../include/libc-symbols.h:651:5: note: in expansion of macro ‘IS_IN’
 #if IS_IN (libnss_nisplus)
     ^
/users/PAS0272/osu5388/software/tmp/glibc-build/libc-modules.h:15:16: error: token "." is not valid in preprocessor expressions
 #define MODULE_.*-.*-linux.* 19
                ^
./../include/libc-symbols.h:32:30: note: in definition of macro ‘PASTE_NAME1’
 #define PASTE_NAME1(a,b)     a##b
                              ^
./../include/libc-symbols.h:23:19: note: in expansion of macro ‘PASTE_NAME’
 #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
                   ^
./../include/libc-symbols.h:23:31: note: in expansion of macro ‘MODULE_’
 #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
                               ^
./../include/libc-symbols.h:24:21: note: in expansion of macro ‘IN_MODULE’
 #define IS_IN(lib) (IN_MODULE == MODULE_##lib)
                     ^
./../include/libc-symbols.h:680:5: note: in expansion of macro ‘IS_IN’
 #if IS_IN (libutil)
     ^
/users/PAS0272/osu5388/software/tmp/glibc-build/libc-modules.h:15:16: error: token "." is not valid in preprocessor expressions
 #define MODULE_.*-.*-linux.* 19
                ^
./../include/libc-symbols.h:32:30: note: in definition of macro ‘PASTE_NAME1’
 #define PASTE_NAME1(a,b)     a##b
                              ^
./../include/libc-symbols.h:23:19: note: in expansion of macro ‘PASTE_NAME’
 #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
                   ^
./../include/libc-symbols.h:23:31: note: in expansion of macro ‘MODULE_’
 #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
                               ^
./../include/libc-symbols.h:24:21: note: in expansion of macro ‘IN_MODULE’
 #define IS_IN(lib) (IN_MODULE == MODULE_##lib)
                     ^
../sysdeps/generic/symbol-hacks.h:3:31: note: in expansion of macro ‘IS_IN’
 #if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED
                               ^
In file included from ../signal/signal.h:361:0,
                 from ../include/signal.h:5,
                 from <stdin>:2:
../linuxthreads/sysdeps/pthread/bits/pthreadtypes.h:52:3: error: conflicting types for ‘pthread_attr_t’
 } pthread_attr_t;
   ^
In file included from ../signal/signal.h:80:0,
                 from ../include/signal.h:5,
                 from <stdin>:2:
../sysdeps/unix/sysv/linux/x86/bits/siginfo.h:316:30: note: previous declaration of ‘pthread_attr_t’ was here
 typedef union pthread_attr_t pthread_attr_t;
                              ^
In file included from <command-line>:0:0:
/users/PAS0272/osu5388/software/tmp/glibc-build/libc-modules.h:15:16: error: token "." is not valid in preprocessor expressions
 #define MODULE_.*-.*-linux.* 19
                ^
./../include/libc-symbols.h:32:30: note: in definition of macro ‘PASTE_NAME1’
 #define PASTE_NAME1(a,b)     a##b
                              ^
./../include/libc-symbols.h:23:19: note: in expansion of macro ‘PASTE_NAME’
 #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
                   ^
./../include/libc-symbols.h:23:31: note: in expansion of macro ‘MODULE_’
 #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
                               ^
./../include/libc-symbols.h:24:21: note: in expansion of macro ‘IN_MODULE’
 #define IS_IN(lib) (IN_MODULE == MODULE_##lib)
                     ^
../include/signal.h:65:7: note: in expansion of macro ‘IS_IN’
 #  if IS_IN (rtld)
       ^
cc1: all warnings being treated as errors
make[2]: *** [/users/PAS0272/osu5388/software/tmp/glibc-build/ucontext_i.h] Error 1
make[2]: Leaving directory `/users/PAS0272/osu5388/software/tmp/glibc-2.23/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/users/PAS0272/osu5388/software/tmp/glibc-2.23'
make: *** [all] Error 2

【问题讨论】:

    标签: linux gnu-make gnu glibc


    【解决方案1】:

    我发现了一种解决方案。

    之前我已将linuxthreads 压缩包从glibc download page 解压缩到glibc-2.23/ 源目录中,并尝试在配置期间指定--enable-add-ons=linuxthreads 运行make

    删除此步骤允许glibcmake 完成而不会出现错误。

    但是,现在的新问题是我应该如何在 linuxthreads 支持下构建 glibc

    【讨论】:

      猜你喜欢
      • 2012-03-30
      • 2012-03-23
      • 2012-04-08
      • 2017-12-20
      • 2016-05-27
      • 2015-12-01
      • 2016-06-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多