knot-resolver
knot-resolver copied to clipboard
build error from souce
command: meson ./build_dir and the output is:
[root@bogon knot-resolver]# meson ./build_dir The Meson build system Version: 0.63.0 Source dir: /home/xushipei/knot-resolver Build dir: /home/xushipei/knot-resolver/build_dir Build type: native build Project name: knot-resolver Project version: 5.5.1 C compiler for the host machine: cc (gcc 12.1.1 "cc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)") C linker for the host machine: cc ld.bfd 2.37-27 C++ compiler for the host machine: c++ (gcc 12.1.1 "c++ (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)") C++ linker for the host machine: c++ ld.bfd 2.37-27 Host machine cpu family: x86_64 Host machine cpu: x86_64 Message: --- required dependencies --- Found pkg-config: /usr/bin/pkg-config (1.8.0) Run-time dependency libknot found: YES 3.2.dev.1657363084.bd23bc5bb Run-time dependency libdnssec found: YES 3.2.dev.1657363084.bd23bc5bb Run-time dependency libzscanner found: YES 3.2.dev.1657363084.bd23bc5bb Run-time dependency libuv found: YES 1.44.1 Run-time dependency lmdb found: YES 0.9.29 Run-time dependency gnutls found: YES 3.7.6 Run-time dependency luajit found: YES 2.1.0-beta3 Message: ------------------------------ Message: --- optional dependencies --- Run-time dependency libnghttp2 found: YES 1.46.0 Run-time dependency openssl found: YES 3.0.2 Checking for function "asprintf" : YES Run-time dependency libcap-ng found: YES 0.8.2 Checking for function "sendmmsg" : YES Has header "libknot/xdp/xdp.h" : YES Run-time dependency libsystemd found: YES 250 Message: --------------------------- Configuring kresconfig.h using configuration Configuring trust_anchors.lua using configuration Configuring sandbox.lua using configuration Configuring distro-preconfig.lua using configuration Program ./kres-gen.sh found: YES (/home/xushipei/knot-resolver/daemon/lua/./kres-gen.sh) Checking for size of "time_t" : 8 Checking for size of "struct timeval" : 16 Checking for size of "zs_scanner_t" with dependency libzscanner: 206144 Checking for size of "knot_pkt_t" with dependency libknot: 464 Program luajit found: YES (/usr/bin/luajit)
daemon/lua/meson.build:92:4: ERROR: Problem encountered: if you use released Knot* versions, please contact us: https://www.knot-resolver.cz/contact/ /usr/bin/luajit: (command line):20: Lua binding for C type knot_pkt_t has incorrect size: 208 stack traceback: [C]: in function 'assert' (command line):20: in main chunk [C]: at 0x5634cecfbaa0
daemon/lua/meson.build:92:4: ERROR: Problem encountered: if you use released Knot* versions, please contact us: https://www.knot-resolver.cz/contact/
This is because you're using unreleased Knot DNS which has been changing some APIs until around now. With the current versions you can use patch https://gitlab.nic.cz/knot/knot-resolver/-/merge_requests/1309
I've switch to tag v5.5.1。 It's not ok?

It will be OK if you switch knot-dns to a tag, instead of 3.2.dev.1657363084.bd23bc5bb
On knot-resolver side it's not merged anywhere yet, as you can see on the linked merge request.
OK I know where the problem is. Try again now!
Message: --------------------------- Configuring kresconfig.h using configuration Configuring trust_anchors.lua using configuration Configuring sandbox.lua using configuration Configuring distro-preconfig.lua using configuration Program ./kres-gen.sh found: YES (/home/xushipei/knot-resolver-5.5.1/daemon/lua/./kres-gen.sh) Checking for size of "time_t" : 8 Checking for size of "struct timeval" : 16 Checking for size of "zs_scanner_t" with dependency libzscanner: 206144 Checking for size of "knot_pkt_t" with dependency libknot: 208 Program luajit found: YES (/usr/bin/luajit) Message: --- dnstap module dependencies --- Run-time dependency libprotobuf-c found: YES 1.4.0 Run-time dependency libfstrm found: YES 0.6.0 Program protoc-c found: YES (/usr/bin/protoc-c) Message: ---------------------------------- Configuring http.lua using configuration
modules/policy/meson.build:25:2: ERROR: Problem encountered: run "git submodule update --init --recursive" to initialize git submodules
A full log can be found at /home/xushipei/knot-resolver-5.5.1/build_dir/meson-logs/meson-log.txt [root@bogon knot-resolver-5.5.1]#
New problem. I've down tag v5.5.1 source from github.com. There is same problem in git repository !
Well yes, but the error message tells you what to do ;-)
The command blocked for a long while............!
Just for reference in case you've missed it, generally we recommend to avoid the hassle around setting up a build from source: https://www.knot-resolver.cz/download/
Message: --------------------------- Configuring kresconfig.h using configuration Configuring trust_anchors.lua using configuration Configuring sandbox.lua using configuration Configuring distro-preconfig.lua using configuration Program ./kres-gen.sh found: YES (/home/xushipei/knot-resolver/daemon/lua/./kres-gen.sh) Checking for size of "time_t" : 8 Checking for size of "struct timeval" : 16 Checking for size of "zs_scanner_t" with dependency libzscanner: 206144 Checking for size of "knot_pkt_t" with dependency libknot: 208 Program luajit found: YES (/usr/bin/luajit) WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 Message: --- dnstap module dependencies --- Run-time dependency libprotobuf-c found: YES 1.4.0 Run-time dependency libfstrm found: YES 0.6.0 Program protoc-c found: YES (/usr/bin/protoc-c) Message: ---------------------------------- Configuring http.lua using configuration
modules/policy/meson.build:24:2: ERROR: Problem encountered: run "git submodule update --init --recursive" to initialize git submodules
A full log can be found at /home/xushipei/knot-resolver/build_dir/meson-logs/meson-log.txt [root@bogon knot-resolver]# git submodule update --init --recursive [root@bogon knot-resolver]#
After execute the command "git submodule update --init --recursive" , there is still an error!
Just for reference in case you've missed it, generally we recommend to avoid the hassle around setting up a build from source: https://www.knot-resolver.cz/download/
I need to learn and maybe change the source code.
Well, the issue here is from not populating modules/policy/lua-aho-corasick/ which lives in a different repo mirrored at https://gitlab.nic.cz/knot/3rdparty/lua-aho-corasick.git
I don't know why git won't do the trick in your case (which I don't know well), but you can e.g. simply download the contents there, etc.
OK! It worked now! Thank you very much.
You could use our release tarballs where these dependencies are included https://secure.nic.cz/files/knot-resolver/knot-resolver-5.5.1.tar.xz
Now there's also 5.5.2 released which supports knot-dns 3.2