knot-resolver icon indicating copy to clipboard operation
knot-resolver copied to clipboard

cross compilation broken

Open Duncaen opened this issue 2 years ago • 2 comments

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.

Duncaen avatar Aug 30 '23 18:08 Duncaen

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.

vcunat avatar Sep 03 '23 17:09 vcunat

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.

Duncaen avatar Jun 02 '24 12:06 Duncaen