为aarch64构建glibc时缺少__attribute__((构造函数))支持



我正在尝试用OpenEmbedded/Yocto 为ARM构建一个映像

在构建glibc时,我得到以下错误消息:

[...]
| checking whether to use .ctors/.dtors header and trailer... configure: error: missing __attribute__ ((constructor)) support??
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/server/git/poky/build/tmp/work/aarch64-poky-linux/glibc-initial/2.28-r0/temp/log.do_configure.21953)
ERROR: Task (/home/server/git/poky/meta/recipes-core/glibc/glibc-initial_2.28.bb:do_configure) failed with exit code '1'

我正在尝试构建的层meta openwrt

我的local.conf看起来像这样:

MACHINE ?= "jetson-tx1"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "
STOPTASKS,${TMPDIR},1G,100K 
STOPTASKS,${DL_DIR},1G,100K 
STOPTASKS,${SSTATE_DIR},1G,100K 
STOPTASKS,/tmp,100M,100K 
ABORT,${TMPDIR},100M,1K 
ABORT,${DL_DIR},100M,1K 
ABORT,${SSTATE_DIR},100M,1K 
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
SSTATE_MIRRORS = "
file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH n 
file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH n 
file://.* http://sstate.yoctoproject.org/2.6/PATH;downloadfilename=PATH n 
"
IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash"
TARGET_CFLAGS += " -lcrypt"

在谷歌的帮助下,我发现了一些邮件列表,其中有人说我需要在配置调用的末尾添加"libc_cv_ctors_header=yes"。但我不知道该怎么做。core-image-sato起作用。

我刚刚遇到这个问题,你在这里看到了答案:

http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064955.htmlhttps://www.linuxquestions.org/questions/linux-from-scratch-13/error-compiling-glibc-2-28-in-lfs-8-3-a-4175644816/

在配置调用的末尾添加"libc_cv_ctors_header=yes">

意思是将libc_cv_ctors_header=yes添加到的末尾/配置args,就像linuxquestions.org上的人在回答时所做的那样

最新更新