[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Cross-OS building

Oh, here is an interesting one, while trying to cross-build glib2.0:

  In file included from /usr/include/linux/sysinfo.h:5,
                   from /usr/include/linux/kernel.h:5,
                   from /usr/include/linux/netlink.h:5,
                   from ../../../gio/gnetworkmonitornetlink.c:39:
  /usr/include/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
      5 | #include <asm/types.h>
        |          ^~~~~~~~~~~~~
  compilation terminated.

what happens apparently is that

  meson.build:if cc.has_header('linux/netlink.h')

detected the presence of linux/netlink.h without actually checking that it
compiles with i686-gnu-gcc:

  #ifdef __has_include
   #if !__has_include("linux/netlink.h")
    #error "Header 'linux/netlink.h' could not be found"
   #include <linux/netlink.h>

and thus enabled HAVE_NETLINK, and then on compilation with i686-gnu-gcc
of the source code making actual use of it, it's missing the per-arch
asm/ file.

Put another way, the issue here is that since linux-libc-dev:amd64's
headers are still in non-multiarch /usr/include, i686-gnu-gcc sees them


Reply to: