首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >构建glibc2.23时出错

构建glibc2.23时出错
EN

Stack Overflow用户
提问于 2016-07-17 23:54:01
回答 1查看 540关注 0票数 2

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

代码语言:javascript
复制
~/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:

代码语言:javascript
复制
~/software/tmp/glibc-build >../glibc-2.23/configure --prefix=$HOME/software --enable-add-ons=linuxthreads

但是,make会失败,并出现以下(或更多)错误。如有任何建议,我们将不胜感激。

代码语言:javascript
复制
~/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
EN

回答 1

Stack Overflow用户

发布于 2016-07-18 01:28:26

我发现了一个解决方案。

早些时候,我将linuxthreads压缩包从glibc download page解压缩到glibc-2.23/源目录中,并尝试使用在配置过程中指定的--enable-add-ons=linuxthreads运行make

删除此步骤将使glibcmake操作完成而不会出现错误。

然而,现在的新问题是,我应该如何构建支持linuxthreadsglibc

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38423103

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档