| Message ID | 20250214085152.1273827-1-ravi@prevas.dk |
|---|---|
| State | Accepted |
| Headers | show |
| Series | [meta-oe,v3] systemd-netlogd: new recipe | expand |
it fails on musl
| FAILED: systemd-netlogd.p/src_netlog_netlog-network.c.o
| x86_64-yoe-linux-musl-clang -target x86_64-yoe-linux-musl -m64
-march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian
--dyld-prefix=/usr -Qunused-arguments -fstack-protector-
↪ strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
-Werror=format-security
--sysroot=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot
-
↪ Isystemd-netlogd.p -I. -I../git -I../git/src/share
-I../git/src/netlog -Isrc -fdiagnostics-color=always
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11
-Werror=undef -
↪ Werror=format=2 -Wformat-security -Wformat-nonliteral
-Wmissing-include-dirs -Werror=old-style-definition
-Werror=pointer-arith -Winit-self -Wdeclaration-after-statement
-Wfloat-equal -
↪ Werror=missing-prototypes -Werror=implicit-function-declaration
-Werror=missing-declarations -Werror=return-type
-Werror=incompatible-pointer-types -Werror=shadow -Wstrict-prototypes
-
↪ Wredundant-decls -Wmissing-noreturn -Wendif-labels
-Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter
-Wno-missing-field-initializers -Wno-unused-result -Werror=overflow
-Werror=
↪ sign-compare -Wdate-time -Wnested-externs -ffast-math -fno-common
-fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden
-fstack-protector -fstack-protector-strong -fPIE --
↪ param=ssp-buffer-size=4 -include config.h -O2 -g
-fmacro-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/git=/usr/src/debug/systemd-netlogd/1.4.4
↪ -fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/git=/usr/src/debug/systemd-netlogd/1.4.4
-fmacro-prefix-map=/home/kraj01/yoe/build/tmp/
↪ work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/build=/usr/src/debug/systemd-netlogd/1.4.4
-fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.
↪ 4.4/build=/usr/src/debug/systemd-netlogd/1.4.4
-fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot=
-fmacro-prefix-map=/home/
↪ kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot=
-fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/
↪ recipe-sysroot-native=
-fmacro-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot-native=
-pipe -MD -MQ systemd-netlogd.p/
↪ src_netlog_netlog-network.c.o -MF
systemd-netlogd.p/src_netlog_netlog-network.c.o.d -o
systemd-netlogd.p/src_netlog_netlog-network.c.o -c
../git/src/netlog/netlog-network.c
| In file included from ../git/src/netlog/netlog-network.c:11:
| In file included from ../git/src/netlog/netlog-manager.h:7:
| In file included from ../git/src/netlog/netlog-dtls.h:7:
| In file included from ../git/src/share/socket-util.h:16:
| ../git/src/share/util.h:65:70: error: unknown type name 'comparison_fn_t'
| 65 | static inline void qsort_safe(void *base, size_t nmemb,
size_t size, comparison_fn_t compar) {
| |
^
| 1 error generated.
On Fri, Feb 14, 2025 at 12:52 AM Rasmus Villemoes <ravi@prevas.dk> wrote:
>
> From: Rasmus Villemoes <ravi@prevas.dk>
>
> In some deployments, the log aggregator collects log messages in the
> syslog format, so systemd-journal-upload and friends can not be
> used.
>
> systemd-netlogd is a daemon for filling that gap.
>
> Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
> ---
> v2: add systemd as required distro feature
> v3: also inherit the features_check class to make that have effect
>
> .../systemd-netlogd/systemd-netlogd_1.4.4.bb | 27 +++++++++++++++++++
> 1 file changed, 27 insertions(+)
> create mode 100644 meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb
>
> diff --git a/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb b/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb
> new file mode 100644
> index 0000000000..f95cfdb418
> --- /dev/null
> +++ b/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb
> @@ -0,0 +1,27 @@
> +SUMMARY = "Forwards messages from the journal to other hosts over the network using the Syslog Protocol"
> +
> +LICENSE = "LGPL-2.1-or-later"
> +LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
> +
> +SRC_URI = "git://github.com/systemd/systemd-netlogd.git;protocol=https;branch=main"
> +SRCREV = "b03cc3b1a75048c7cf19467d8918a4b7320767e6"
> +
> +inherit meson systemd pkgconfig useradd features_check
> +
> +REQUIRED_DISTRO_FEATURES = "systemd"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS += "systemd"
> +DEPENDS += "openssl"
> +DEPENDS += "gperf-native"
> +DEPENDS += "python3-sphinx-native"
> +
> +# systemd-netlogd uses prefix and sysconfdir in a weird way.
> +EXTRA_OEMESON += "--prefix ${libdir}/systemd --sysconfdir ${sysconfdir}/systemd"
> +
> +FILES:${PN} += "${libdir}"
> +
> +USERADD_PACKAGES = "${PN}"
> +GROUPADD_PARAM:${PN} = "-r systemd-journal"
> +USERADD_PARAM:${PN} = "--system -d / -M --shell /sbin/nologin -g systemd-journal systemd-journal-netlog"
> --
> 2.48.1
>
you might look into musl patches for systemd in oe-core e.g. meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch or perhaps disable it for musl target as well. On Fri, Feb 14, 2025 at 8:25 PM Khem Raj <raj.khem@gmail.com> wrote: > > it fails on musl > > | FAILED: systemd-netlogd.p/src_netlog_netlog-network.c.o > | x86_64-yoe-linux-musl-clang -target x86_64-yoe-linux-musl -m64 > -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian > --dyld-prefix=/usr -Qunused-arguments -fstack-protector- > ↪ strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security > -Werror=format-security > --sysroot=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot > - > ↪ Isystemd-netlogd.p -I. -I../git -I../git/src/share > -I../git/src/netlog -Isrc -fdiagnostics-color=always > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 > -Werror=undef - > ↪ Werror=format=2 -Wformat-security -Wformat-nonliteral > -Wmissing-include-dirs -Werror=old-style-definition > -Werror=pointer-arith -Winit-self -Wdeclaration-after-statement > -Wfloat-equal - > ↪ Werror=missing-prototypes -Werror=implicit-function-declaration > -Werror=missing-declarations -Werror=return-type > -Werror=incompatible-pointer-types -Werror=shadow -Wstrict-prototypes > - > ↪ Wredundant-decls -Wmissing-noreturn -Wendif-labels > -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter > -Wno-missing-field-initializers -Wno-unused-result -Werror=overflow > -Werror= > ↪ sign-compare -Wdate-time -Wnested-externs -ffast-math -fno-common > -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden > -fstack-protector -fstack-protector-strong -fPIE -- > ↪ param=ssp-buffer-size=4 -include config.h -O2 -g > -fmacro-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/git=/usr/src/debug/systemd-netlogd/1.4.4 > ↪ -fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/git=/usr/src/debug/systemd-netlogd/1.4.4 > -fmacro-prefix-map=/home/kraj01/yoe/build/tmp/ > ↪ work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/build=/usr/src/debug/systemd-netlogd/1.4.4 > -fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1. > ↪ 4.4/build=/usr/src/debug/systemd-netlogd/1.4.4 > -fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot= > -fmacro-prefix-map=/home/ > ↪ kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot= > -fdebug-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/ > ↪ recipe-sysroot-native= > -fmacro-prefix-map=/home/kraj01/yoe/build/tmp/work/core2-64-yoe-linux-musl/systemd-netlogd/1.4.4/recipe-sysroot-native= > -pipe -MD -MQ systemd-netlogd.p/ > ↪ src_netlog_netlog-network.c.o -MF > systemd-netlogd.p/src_netlog_netlog-network.c.o.d -o > systemd-netlogd.p/src_netlog_netlog-network.c.o -c > ../git/src/netlog/netlog-network.c > | In file included from ../git/src/netlog/netlog-network.c:11: > | In file included from ../git/src/netlog/netlog-manager.h:7: > | In file included from ../git/src/netlog/netlog-dtls.h:7: > | In file included from ../git/src/share/socket-util.h:16: > | ../git/src/share/util.h:65:70: error: unknown type name 'comparison_fn_t' > | 65 | static inline void qsort_safe(void *base, size_t nmemb, > size_t size, comparison_fn_t compar) { > | | > ^ > | 1 error generated. > > On Fri, Feb 14, 2025 at 12:52 AM Rasmus Villemoes <ravi@prevas.dk> wrote: > > > > From: Rasmus Villemoes <ravi@prevas.dk> > > > > In some deployments, the log aggregator collects log messages in the > > syslog format, so systemd-journal-upload and friends can not be > > used. > > > > systemd-netlogd is a daemon for filling that gap. > > > > Signed-off-by: Rasmus Villemoes <ravi@prevas.dk> > > --- > > v2: add systemd as required distro feature > > v3: also inherit the features_check class to make that have effect > > > > .../systemd-netlogd/systemd-netlogd_1.4.4.bb | 27 +++++++++++++++++++ > > 1 file changed, 27 insertions(+) > > create mode 100644 meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb > > > > diff --git a/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb b/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb > > new file mode 100644 > > index 0000000000..f95cfdb418 > > --- /dev/null > > +++ b/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb > > @@ -0,0 +1,27 @@ > > +SUMMARY = "Forwards messages from the journal to other hosts over the network using the Syslog Protocol" > > + > > +LICENSE = "LGPL-2.1-or-later" > > +LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" > > + > > +SRC_URI = "git://github.com/systemd/systemd-netlogd.git;protocol=https;branch=main" > > +SRCREV = "b03cc3b1a75048c7cf19467d8918a4b7320767e6" > > + > > +inherit meson systemd pkgconfig useradd features_check > > + > > +REQUIRED_DISTRO_FEATURES = "systemd" > > + > > +S = "${WORKDIR}/git" > > + > > +DEPENDS += "systemd" > > +DEPENDS += "openssl" > > +DEPENDS += "gperf-native" > > +DEPENDS += "python3-sphinx-native" > > + > > +# systemd-netlogd uses prefix and sysconfdir in a weird way. > > +EXTRA_OEMESON += "--prefix ${libdir}/systemd --sysconfdir ${sysconfdir}/systemd" > > + > > +FILES:${PN} += "${libdir}" > > + > > +USERADD_PACKAGES = "${PN}" > > +GROUPADD_PARAM:${PN} = "-r systemd-journal" > > +USERADD_PARAM:${PN} = "--system -d / -M --shell /sbin/nologin -g systemd-journal systemd-journal-netlog" > > -- > > 2.48.1 > >
diff --git a/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb b/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb new file mode 100644 index 0000000000..f95cfdb418 --- /dev/null +++ b/meta-oe/recipes-support/systemd-netlogd/systemd-netlogd_1.4.4.bb @@ -0,0 +1,27 @@ +SUMMARY = "Forwards messages from the journal to other hosts over the network using the Syslog Protocol" + +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/systemd/systemd-netlogd.git;protocol=https;branch=main" +SRCREV = "b03cc3b1a75048c7cf19467d8918a4b7320767e6" + +inherit meson systemd pkgconfig useradd features_check + +REQUIRED_DISTRO_FEATURES = "systemd" + +S = "${WORKDIR}/git" + +DEPENDS += "systemd" +DEPENDS += "openssl" +DEPENDS += "gperf-native" +DEPENDS += "python3-sphinx-native" + +# systemd-netlogd uses prefix and sysconfdir in a weird way. +EXTRA_OEMESON += "--prefix ${libdir}/systemd --sysconfdir ${sysconfdir}/systemd" + +FILES:${PN} += "${libdir}" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r systemd-journal" +USERADD_PARAM:${PN} = "--system -d / -M --shell /sbin/nologin -g systemd-journal systemd-journal-netlog"