[oe] [meta-networking][RFC PATCH 0/1] Failed to compile networkmanager with musl

Bruce Ashfield bruce.ashfield at gmail.com
Wed Aug 28 12:33:40 UTC 2019


On Wed, Aug 28, 2019 at 12:27 AM Khem Raj <raj.khem at gmail.com> wrote:
>
> On Tue, Aug 27, 2019 at 8:43 PM <kai.kang at windriver.com> wrote:
> >
> > From: Kai Kang <kai.kang at windriver.com>
> >
> > Hi Khem,
> >
> > I am updating networkmanager to 1.20. But I meet a problem with musl
> > that "error: redefinition of 'struct ethhdr'". I find a patch for kernel
> > which is created in Jan 2018. The musl part has been merged in musl:
> >
> > commit b583c5d3b4cc2c54c68eef5eb7855ecfacee8bfc
> > Author: Hauke Mehrtens <hauke at hauke-m.de>
> > Date:   Sat Jan 6 23:32:52 2018 +0100
> >
> >     add additional uapi guards for Linux kernel header files
> >
> >     With Linux kernel 4.16 it will be possible to guard more parts of the
> >     Linux header files from a libc. Make use of this in musl to guard all
> >     the structures and other definitions from the Linux header files which
> >     are also defined by the header files provided by musl. This will make
> >     it possible to compile source files which include both the libc
> >     headers and the kernel userspace headers.
> >
> >     This extends the definitions done in commit 04983f227238 ("make
> >     netinet/in.h suppress clashing definitions from kernel headers")
> >
> > But the kernel part doesn't exist in current kernel source.
> > It should not be networkmanager specified.
> >
> > Do you have any suggestion to fix this error? Thanks.
>
> the kernel patch should be applied to linux-libc-headers

.. and please wait a day or so before sending it, since I'm about to
bump the reference headers to 5.2

Cheers,

Bruce

>
> >
> >
> > PS: detailed error messages:
> >
> > x86_64-poky-linux-musl-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot -Isrc/25a6634@@NetworkManager at sta -Isrc -I../NetworkManager-1.20.0/src -Ilibnm-core -I../NetworkManager-1.20.0/libnm-core -I. -I../NetworkManager-1.20.0/ -Ishared -I../NetworkManager-1.20.0/shared -I../NetworkManager-1.20.0/shared/systemd/sd-adapt-shared -I../NetworkManager-1.20.0/shared/systemd/src/basic -I../NetworkManager-1.20.0/shared/systemd/src/shared -I/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/gio-unix-2.0 -I/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/glib-2.0 -I/home/kkang/buildare
>  a/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/lib/glib-2.0/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu11 -fdata-sections -ffunction-sections -O2 -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0=/usr/src/debug/networkmanager/1.20.0-r0 -fdebug-prefix-map=/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0=/usr/src/debug/networkmanager/1.20.0-r0 -fdebug-prefix-map=/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot-native= -DRTLD_DEEPBIND=0 -fPIC -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VE
>  RSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_DAEMON -MD -MQ 'src/25a6634@@NetworkManager at sta/devices_nm-device.c.o' -MF 'src/25a6634@@NetworkManager at sta/devices_nm-device.c.o.d' -o 'src/25a6634@@NetworkManager at sta/devices_nm-device.c.o' -c ../NetworkManager-1.20.0/src/devices/nm-device.c
> > In file included from /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/net/ethernet.h:10,
> >                  from ../NetworkManager-1.20.0/src/systemd/src/systemd/sd-dhcp-client.h:23,
> >                  from ../NetworkManager-1.20.0/src/systemd/nm-sd.h:21,
> >                  from ../NetworkManager-1.20.0/src/devices/nm-device.c:76:
> > /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/netinet/if_ether.h:111:8: error: redefinition of 'struct ethhdr'
> >   111 | struct ethhdr {
> >       |        ^~~~~~
> > In file included from ../NetworkManager-1.20.0/libnm-core/nm-utils.h:32,
> >                  from ../NetworkManager-1.20.0/libnm-core/nm-setting-ip-config.h:29,
> >                  from ../NetworkManager-1.20.0/src/NetworkManagerUtils.h:26,
> >                  from ../NetworkManager-1.20.0/src/devices/nm-device.h:31,
> >                  from ../NetworkManager-1.20.0/src/devices/nm-device.c:23:
> > /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/linux/if_ether.h:167:8: note: originally defined here
> >   167 | struct ethhdr {
> >       |        ^~~~~~
> > In file included from /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/netinet/if_ether.h:118,
> >                  from /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/net/ethernet.h:10,
> >                  from ../NetworkManager-1.20.0/src/systemd/src/systemd/sd-dhcp-client.h:23,
> >                  from ../NetworkManager-1.20.0/src/systemd/nm-sd.h:21,
> >                  from ../NetworkManager-1.20.0/src/devices/nm-device.c:76:
> > /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
> >    22 | struct arphdr {
> >       |        ^~~~~~
> > In file included from ../NetworkManager-1.20.0/src/devices/nm-device.c:34:
> > /home/kkang/buildarea/222-Yocto/build-xfce-x86-64/tmp/work/core2-64-poky-linux-musl/networkmanager/1.20.0-r0/recipe-sysroot/usr/include/linux/if_arp.h:144:8: note: originally defined here
> >   144 | struct arphdr {
> >       |        ^~~~~~
> >
> >
> > Regards,
> > Kai
> >
> >
> >
> >
> > Kai Kang (1):
> >   networkmanager: 1.18.2 -> 1.20.0
> >
> >  ...e.ac-Fix-pkgconfig-sysroot-locations.patch |  22 ---
> >  ...ttings-settings-property-documentati.patch |  71 ---------
> >  ...on.build-pkgconfig-sysroot-locations.patch |  23 +++
> >  ...eate-settings-property-documentation.patch | 146 ++++++++++++++++++
> >  ...Fix-build-with-musl-systemd-specific.patch |  10 +-
> >  .../musl/0002-Fix-build-with-musl.patch       |  12 +-
> >  .../musl/0003-Fix-mrand48_r-with-musl.patch   |  47 ++++++
> >  ...ger_1.18.2.bb => networkmanager_1.20.0.bb} |  72 +++++----
> >  8 files changed, 262 insertions(+), 141 deletions(-)
> >  delete mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch
> >  delete mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch
> >  create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/fix-meson.build-pkgconfig-sysroot-locations.patch
> >  create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/meson-do-not-create-settings-property-documentation.patch
> >  create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-mrand48_r-with-musl.patch
> >  rename meta-networking/recipes-connectivity/networkmanager/{networkmanager_1.18.2.bb => networkmanager_1.20.0.bb} (62%)
> >
> > --
> > 2.20.0
> >
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


More information about the Openembedded-devel mailing list