-1

I'm building a rootfs with Buildroot for i386 target with SystemD. Building systemd package works but building host-systemd fails with the following:

../src/udev/udev-event.c:1047:9: note: in expansion of macro ‘DEVICE_TRACE_POINT’
         DEVICE_TRACE_POINT(rules_finished, dev);
         ^~~~~~~~~~~~~~~~~~
../src/shared/udev-util.h:81:81: error: expected ‘)’ before ‘__VA_OPT__’
                 STAP_PROBEV(udev, name, device_action_to_string(_a), _n, _p, _s __VA_OPT__(,) __VA_ARGS__);\

From the systemd.mk the host and non-host are built from the same source but using different configuration, but changing the host config options doesn't have any effect.

SYSTEMD_CONF_OPTS += \
-Ddefault-hierarchy=unified \
-Didn=true \
-Dima=false \
-Dkexec-path=/usr/sbin/kexec \
-Dkmod-path=/usr/bin/kmod \
-Dldconfig=false \
-Dlink-boot-shared=true \
-Dloadkeys-path=/usr/bin/loadkeys \
-Dman=false \
-Dmount-path=/usr/bin/mount \
-Dmode=release \
-Dnss-systemd=true \
-Dquotacheck-path=/usr/sbin/quotacheck \
-Dquotaon-path=/usr/sbin/quotaon \
-Drootlibdir='/usr/lib' \
-Dsetfont-path=/usr/bin/setfont \
-Dsplit-bin=true \
-Dsplit-usr=false \
-Dsulogin-path=/usr/sbin/sulogin \
-Dsystem-gid-max=999 \
-Dsystem-uid-max=999 \
-Dsysvinit-path= \
-Dsysvrcnd-path= \
-Dtelinit-path= \
-Dtests=false \
-Dtmpfiles=true \
-Dumount-path=/usr/bin/umount \
-Dutmp=false

# We need a very minimal host variant, so we disable as much as possible.
HOST_SYSTEMD_CONF_OPTS = \
    -Dsplit-bin=true \
    -Dsplit-usr=false \
    --prefix=/usr \
    --libdir=lib \
    --sysconfdir=/etc \
    --localstatedir=/var \
    -Dmode=release \
    -Dutmp=false \
    -Dhibernate=false \
    -Dldconfig=false \
    -Dresolve=false \
    -Defi=false \
    -Dtpm=false \
    -Denvironment-d=false \
    -Dbinfmt=false \
    -Drepart=false \
    -Dcoredump=false \
    -Dpstore=false \
    -Doomd=false \
    -Dlogind=false \
    -Dhostnamed=false \
    -Dlocaled=false \
    -Dmachined=false \
    -Dportabled=false \
    -Dsysext=false \
    -Duserdb=false \
    -Dhomed=false \
    -Dnetworkd=false \
    -Dtimedated=false \
    -Dtimesyncd=false \
    -Dremote=false \
    -Dcreate-log-dirs=false \
    -Dnss-myhostname=false \
    -Dnss-mymachines=false \
    -Dnss-resolve=false \
    -Dnss-systemd=false \
    -Dfirstboot=false \
    -Drandomseed=false \
    -Dbacklight=false \
    -Dvconsole=false \
    -Dquotacheck=false \
    -Dsysusers=false \
    -Dtmpfiles=true \
    -Dimportd=false \
    -Dhwdb=false \
    -Drfkill=false \
    -Dman=false \
    -Dhtml=false \
    -Dsmack=false \
    -Dpolkit=false \
    -Dblkid=false \
    -Didn=false \
    -Dadm-group=false \
    -Dwheel-group=false \
    -Dzlib=false \
    -Dgshadow=false \
    -Dima=false \
    -Dtests=false \
    -Dglib=false \
    -Dacl=false \
    -Dsysvinit-path='' \
    -Dinitrd=false \
    -Dxdg-autostart=false \
    -Dkernel-install=false \
    -Danalyze=false \
    -Dlibcryptsetup=false \
    -Daudit=false \
    -Dzstd=false

The kernel I'm compiling for is 5.15 using the default configuration for i386 (but also tried x86_64).

I noticed that the build option HAVE_SYS_SDT_H is set when building host-systemd, but it's not set on the non-host variant. Therefore inserting conf.set10('HAVE_SYS_SDT_H',false) at line 700 of host-systemd's meson.build fixes the problem, systemd compiles and works but it doesn't look like a good solution.

Is there a better way to fix this compilation issue?

Denis Stepanenko
  • 510
  • 6
  • 14

1 Answers1

0

Which version of Buildroot are you using? What is your host distribution?

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • The buildroot version is 2022.05. The host is an Amazon AMI (which looks like CentOS) but also tried on Ubuntu 22 - same problem. Thanks. – Denis Stepanenko Jun 25 '22 at 21:16