CZ-NIC / knot-resolver

Knot Resolver - resolve DNS names like it's 2024
https://www.knot-resolver.cz/
Other
346 stars 58 forks source link

cross compilation broken #98

Open Duncaen opened 10 months ago

Duncaen commented 10 months ago

The pkgconfig file from the sysroot (/usr/aarch64-linux-musl/usr/lib/pkgconfig/luajit.pc) is correctly located and used when cross compiling, but the resulting path returned by luajit.get_pkgconfig_variable('includedir') does not include the sysroot.

Prior to the commit https://github.com/CZ-NIC/knot-resolver/commit/2b6df073db13461edc8b3387ff17dafe1111b920 this worked since meson constructed the correct include path.

modules/meson.build:35:14: ERROR: Include dir /usr/include/luajit-2.1 does not exist.
vcunat commented 10 months ago

Thanks. I suppose you did find some immediate workaround. I'm not sure yet if the longer-term solution will be just revert of this with simple conflicts resolved or something else.

Duncaen commented 1 month ago

https://github.com/CZ-NIC/knot-resolver/commit/e32df41e6f67ea8b02e0b5deb613e0a74f8205b2 changed this a bit and now the patch to make cross compilation work just requires to remove the manual luajit.get_pkgconfig_variable('includedir') from the include directories.

--- a/modules/meson.build
+++ b/modules/meson.build
@@ -32,8 +32,7 @@
   ['serve_stale', meson.current_source_dir() / 'serve_stale' / 'test.integr'],
 ]

-mod_inc_dir = include_directories('..', '../contrib',
-  luajit.get_pkgconfig_variable('includedir'))
+mod_inc_dir = include_directories('..', '../contrib')

 mod_deps = [
   contrib_dep,

Not sure if this is an oversight or if this is required for some other platform than linux, I think all modules that require the lua headers now have the include flags through the luajit dependency in mod_deps.