首页 > 解决方案 > 粗短不能在 raspbian 拉伸上编译

问题描述

嗨,我想在我的树莓设置上使用 stubby,它已经运行了一个 PiHole 实例(hw 是一个 pi3,当前 Raspbian Stretch Lite 发布日期:2018-11-13)。

我发现的有关该主题的所有 how_to 都建议采用以下方法:

sudo apt-get install libtool autoconf m4 libssl-dev libyaml-dev

git clone https://github.com/getdnsapi/getdns.git
cd getdns
git checkout develop
git submodule update --init
libtoolize -ci
autoreconf -fi
mkdir -v build && cd build
../configure --prefix=/usr/local --without-libidn --without-libidn2 --enable-stub-only --with-ssl --with-stubby
make
sudo make install

但无论我遵循哪种方式,当我进入制作部分时,我都会得到:

pi@PiHole:~/getdns/build $ make
cd src && make default
make[1]: Entering directory '/home/pi/getdns/build/src'
../libtool --quiet --tag=CC --mode=compile gcc -I../../src -I. -I../../src/util/auxiliary -I../../src/../stubby/src -g -O2 -Wall -Wextra -D_BSD_SOURCE -D_DEFAULT_SOURCE   -Wpedantic -c ../../src/convert.c -o convert.lo
In file included from ../../src/convert.c:50:0:
../../src/util-internal.h: In function ‘_getdns_tls_version2openssl_version’:
../../src/util-internal.h:229:29: error: ‘TLS1_3_VERSION’ undeclared (first use in this function)
  case GETDNS_TLS1_3: return TLS1_3_VERSION;
                             ^~~~~~~~~~~~~~
../../src/util-internal.h:229:29: note: each undeclared identifier is reported only once for each function it appears in
Makefile:122: recipe for target 'convert.lo' failed
make[1]: *** [convert.lo] Error 1
make[1]: Leaving directory '/home/pi/getdns/build/src'
Makefile:53: recipe for target 'default' failed
make: *** [default] Error 2

怎么了?当我检查引用的文件时,我可以确认带有“TLS1_3_VERSION”的行是整个文件中唯一出现的,但是编译器想告诉我什么呢?

我可以自己做任何事情来修复它,还是来自 github 的 stubby 源文件中存在错误?

标签: compiler-errorsraspbian

解决方案


好的,我已经从 github 上的一位维护者那里得到了答案。

解决方案是使用主分支而不是开发分支(我在 HowTo 中找到的所有说明都建议使用该分支)

因此,如果其他人遇到该错误:

git checkout master

应该修复它。


推荐阅读