【发布时间】:2018-12-14 13:55:17
【问题描述】:
我正在尝试使用 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"
在谷歌的帮助下,我找到了一些mailinglists,有人说我需要在配置调用的末尾添加“'libc_cv_ctors_header=yes'”。
但我不知道该怎么做。
core-image-sato 有效。
【问题讨论】:
-
你的编译器和链接器的目标三元组是什么?它应该类似于
aarch64-unknown-linux-gnu。我假设您使用的是裸机 ELF 目标。 -
哦,我认为使用 bitbake 可以确保只使用一个目标编译器(在我的情况下是 aarch64-poky-linux ...)我如何确定使用哪个?
标签: glibc yocto configure openwrt openembedded