glibc make install 报错: /usr/bin/ld: cannot find -lnss_test2
问题状况
我需要升级glibc-2.28,在更新gcc、make之后,glibc make install报错出现下面情况:
/usr/bin/ld: cannot find -lnss_test2
或报错 nss_nis、nss_nisplus,也可使用下面解决方法
解决方法:添加代码补丁
glibc/scripts/test-installation.pl ,125行修改如下
@@ -125,7 +125,7 @@ while (<SOVERSIONS>) {
next if ($build_mathvec == 0 && $name eq "mvec");
if ($name ne "nss_ldap" && $name ne "db1"
&& $name ne "thread_db"
- && $name ne "nss_test1" && $name ne "libgcc_s") {
+ && $name ne "nss_test1" && $name ne "nss_test2" && $name ne "nss_nis" && $name ne "nss_nisplus" && $name ne "libgcc_s") {
$link_libs .= " -l$name";
$versions{$name} = $version;
}
glibc/Changelog ,8044行修改如下
@@ -8044,6 +8044,11 @@
(__log1pf): Disable -Wmaybe-uninitialized for -Os around
computation using c.
+2017-08-06 Hiroshi Takekawa <sian@big.or.jp>
+
+ * scripts/test-installation.pl: Filter out libnss_test2. Additionally, as of 2017-11-17, filter
+ out nss_nis, nss_nisplus, and libgcc_s.
+
2018-02-01 Dmitry V. Levin <ldv@altlinux.org>
重新make install即可成功