compiler-errors - 粗短不能在 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 源文件中存在错误?
解决方案
好的,我已经从 github 上的一位维护者那里得到了答案。
解决方案是使用主分支而不是开发分支(我在 HowTo 中找到的所有说明都建议使用该分支)
因此,如果其他人遇到该错误:
git checkout master
应该修复它。
推荐阅读
- java - 功能错了吗?
- java - 为什么 Kotlin 使用 forloop 导致索引为空?(指数)
- java - Hibernate BatchSize 不影响正在执行的查询计数
- charts - 谷歌图表中 y 轴的值未正确反映
- python - jinja2.exceptions.UndefinedError: 'intern_to_update' 未定义
- angular - NX 工作区 - 角度 - 通过 HTTPS 服务
- redux - 获取另一个查询 RTK 查询时更改突变值?
- sql - 为没有任何数据的行选择并分配 0
- plot - 如何使用其最后 2 个数据点作为梯度来扩展移动平均线以绘制趋势线
- javascript - 网页上的Bloom或其他一些后处理(过滤器)?