QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1855|回复: 4

新的 glibc 2.16 下该如何才能成功编译 nash 呢?

[复制链接]
发表于 2013-3-20 06:59:51 | 显示全部楼层 |阅读模式
cd mkinitrd-6.0.51
+ LANG=C
+ export LANG
+ unset DISPLAY
+ make LIB=lib
making /root/rpmbuild/BUILD/mkinitrd-6.0.51/version.h
make[1]: Entering directory `/root/rpmbuild/BUILD/mkinitrd-6.0.51/nash'
making /root/rpmbuild/BUILD/mkinitrd-6.0.51/nash/version.h
Package libdhcp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdhcp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libdhcp' found
gcc -Wall -g -D_FORTIFY_SOURCE=2 -Wno-unused-function -fPIC -std=gnu99 -D_GNU_SOURCE=1 -I/root/rpmbuild/BUILD/mkinitrd-6.0.51/nash/include -I/root/rpmbuild/BUILD/mkinitrd-6.0.51/bdevid/include    -c -o lib.o lib.c
In file included from /usr/include/stdio.h:27:0,
                 from lib.c:24:
/usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
In file included from lib.h:40:0,
                 from lib.c:33:
vitals.h:56:19: error: duplicate member 'unique_id'
vitals.h:61:19: error: duplicate member 'unique_id'
vitals.h:66:19: error: duplicate member 'unique_id'
vitals.h:71:19: error: duplicate member 'unique_id'
make[1]: *** [lib.o] Error 1
make[1]: Leaving directory `/root/rpmbuild/BUILD/mkinitrd-6.0.51/nash'
make: *** [subdirs] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.IQLCVL (%build)

修改 MakefIle 将 SUBDIRS = bdevid grubby nash 中的 nash 去掉可以编译成功 mkinitrd
那 nash 该如何编译?
 楼主| 发表于 2013-3-20 08:18:24 | 显示全部楼层
根据提示将 vitals.h 指定行的 unique_id 相关指针去掉(不是全部封杀,也不懂哪重复定义了),把只有 unique_id 指针的函数去掉,然后再编译结果成功编译运行。
回复

使用道具 举报

发表于 2013-3-20 10:13:14 | 显示全部楼层

不是已经换成 dracut 了吗?
回复

使用道具 举报

 楼主| 发表于 2013-3-20 10:19:41 | 显示全部楼层
MGC 2.6 还在用啊,3.0 几时出公开测试版?
回复

使用道具 举报

发表于 2013-3-22 10:24:15 | 显示全部楼层
原帖由 haulm 于 2013-3-20 10:19 发表
MGC 2.6 还在用啊,3.0 几时出公开测试版?

公开测试版本还需要等一段时间,至少没有大的bug才能行。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-19 07:56 , Processed in 0.076008 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表