Skip to content

The buildroot rootfs step fails on modern hosts when GDBSERVER=y (libreadline.so.8: undefined symbol: UP) #867

Description

@r-l8

On modern host distributions with recent binutils, make with GDBSERVER=y fails during Buildroot rootfs generation with:

  /bin/sh: symbol lookup error:
      .../out-br/host/lib/libreadline.so.8: undefined symbol: UP

Host: Arch Linux, gcc 16.1.1, binutils 2.46.1.
Buildroot: tag 2026.02.2.
Config: GDBSERVER=y (enables BR2_PACKAGE_HOST_GDB=y).

Looks like the root cause is in Buildroot's package/readline/readline.mk: READLINE_CONF_OPTS is not propagated to the host variant, so --with-shared-termcap-library is dropped for host-readline. The resulting host libreadline.so.8 has no DT_NEEDED on ncurses/tinfo; termcap symbols (UP, BC, tgetent, ...) are unresolved. Under modern binutils enforcing --no-copy-dt-needed-entries, any process loading this libreadline via LD_LIBRARY_PATH aborts. fakeroot prepends $(HOST_DIR)/lib, so /bin/sh dies and cpio/tar rootfs generation fails.

This seems to be part of a spate of recent similar issues
#842
OP-TEE/manifest#179
OP-TEE/manifest#347

It is getting 'fixed "by itself" soon' ;-) with a patch submitted to upstream in Buildroot. So, if/when that is merged, I guess OP-TEE should update its dependency. I'm posting this issue for tracking it.
https://lists.buildroot.org/pipermail/buildroot/2026-July/806328.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions