【问题标题】:missing __attribute__ ((constructor)) support when building glibc for aarch64为 aarch64 构建 glibc 时缺少 __attribute__ ((constructor)) 支持
【发布时间】: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


【解决方案1】:

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

http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064955.html https://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 添加到 ./configure 参数的末尾,就像 linuxquestions.org 上的人在他的回答中所做的那样

【讨论】:

    猜你喜欢
    • 2019-06-12
    • 2020-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多