【问题标题】:Where lies the error when compiling the current Kerberos version?编译当前 Kerberos 版本时错误在哪里?
【发布时间】:2020-09-29 10:01:26
【问题描述】:

我目前正在尝试编译 MIT Kerberos 的 krb5-1.18.2 版本。不幸的是,我遇到了一个我无法解决的错误。我已经通过 Oracle Linux 6 的存储库安装了一组开发人员工具。使用命令 ./configure 我没有发现任何错误。

这是我在使用make 时遇到的错误:

rc_file2.c: In function ‘k5_rcfile2_store’:
rc_file2.c:146: error: ‘r1stamp’ may be used uninitialized in this function
rc_file2.c:146: note: ‘r1stamp’ was declared here
rc_file2.c:146: error: ‘r2stamp’ may be used uninitialized in this function
rc_file2.c:146: note: ‘r2stamp’ was declared here
At top level:
cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized"
make[3]: *** [rc_file2.so] Error 1
make[3]: Leaving directory `/home/vagrant/krb5-1.18.2/src/lib/krb5/rcache'
make[2]: *** [all-recurse] Error 1
make[2]: Leaving directory `/home/vagrant/krb5-1.18.2/src/lib/krb5'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/home/vagrant/krb5-1.18.2/src/lib'
make: *** [all-recurse] Error 1

当然,从包存储库加载 Kerberos 很容易,但不幸的是,这在目标环境中是不可能的。目前它是为了练习目的。并避免以后出现此类故障。

【问题讨论】:

  • 找到解决此问题的方法了吗?我现在也面临同样的情况。谢谢!
  • 没有???我们在存储库中使用了具有最新版本的不同 Linux

标签: linux kerberos mit-kerberos


【解决方案1】:

应该通过将标志 -Wno-uninitialized 传递给构建来解决。这可以使用参数CFLAGS 来配置。所以它会是:

./configure CFLAGS=-Wno-uninitialized

【讨论】: