[英]Error building glibc2.23
I'm trying to build the latest version (2.23) of glibc
on an older version of linux. 我正在尝试在旧版本的linux上构建
glibc
的最新版本(2.23)。 For that, I rebuilt the latest versions of gcc
and binutils
. 为此,我重建了最新版本的
gcc
和binutils
。
~/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
I then configured glibc as follows: 然后,我将glibc配置如下:
~/software/tmp/glibc-build >../glibc-2.23/configure --prefix=$HOME/software --enable-add-ons=linuxthreads
However, make fails with the following (and more) errors. 但是,make失败,并出现以下(以及更多)错误。 Any suggestions would be appreciated.
任何建议,将不胜感激。
~/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
I discovered one solution. 我发现了一个解决方案。
Earlier I had extracted the linuxthreads
tarball from the glibc
download page into the glibc-2.23/
source directory and was trying run make
with --enable-add-ons=linuxthreads
specified during configuration. 早些时候,我已从
glibc
下载页面将linuxthreads
压缩包提取到glibc-2.23/
源目录中,并尝试使用配置期间指定的--enable-add-ons=linuxthreads
运行make
。
Removing this step allows the make
of glibc
to complete without errors. 删除此步骤可以
make
glibc
的make
完成而不会出现错误。
However, the new the question is now how should I build glibc
with linuxthreads
support 但是,新的问题是现在我应该如何在
linuxthreads
支持下构建glibc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.