buildroot主机 - 系统构建失败
我正在使用SystemD的i386目标建造一个带有buildroot的rootfs。构建SystemD软件包有效,但构建主机-SystemD失败了以下内容:
../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__);\
从Systemd.mk中,主机和非主机是从同一源构建的,但使用不同的配置,但是更改主机配置选项没有任何效果。
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
我要编制的内核是5.15使用i386的默认配置(但也尝试了x86_64)。
我注意到在构建主机 - 系统D时,设置了构建选项have_sys_sdt_h,但未在非宿主变体上设置。因此,插入conf.set10('hass_sys_sdt_h',false)
在主机 - 系统中的第700行中的第700行。Build解决了问题,Systemd编译和工作,但看起来不错。
有没有更好的方法来解决此编译问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用哪个版本的BuildRoot?您的主机分布是什么?
Which version of Buildroot are you using? What is your host distribution?