[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build failures with lld >=17
From: |
Thomas Dickey |
Subject: |
Re: Build failures with lld >=17 |
Date: |
Thu, 23 May 2024 18:49:38 -0400 |
On Thu, May 23, 2024 at 04:49:41PM -0400, Bernardo Meurer Costa wrote:
> It seems like LLVM’s LLD started to enable --no-undefined-version by
> default[1], causing a hard error when building ncurses 6.4[2]:
https://github.com/termux/termux-packages/issues/18810
Some packages declare more symbols than they should declare in version
script, and cause problem when these packages are built with lld-17.
The .map files in ncurses list all of the possible symbols that might be
provided in the given library. The comment at the top of the file shows
how I generated the files for ncurses 6.0, by merging together different
configurations (since then, it's been a manual procedure because the process
took more than an hour, etc.).
If you're trying to produce a library with fewer symbols, you'll have
to maintain your own patch for that configuration.
>
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TIC_5.0.19991023' to symbol '_nc_check_termtype' failed: symbol not
> defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TIC_5.0.19991023' to symbol '_nc_resolve_uses' failed: symbol not
> defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TIC_5.5.20051010' to symbol '_nc_alloc_entry_leaks' failed: symbol
> not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TIC_5.5.20051010' to symbol '_nc_captoinfo_leaks' failed: symbol
> not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TIC_5.5.20051010' to symbol '_nc_comp_scan_leaks' failed: symbol
> not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TIC_5.7.20081102' to symbol '_nc_free_tic' failed: symbol not
> defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_comp_captab_leaks' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_leaks_tic' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TINFO_5.0.19991023' to symbol '_nc_info_hash_table' failed: symbol
> not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TINFO_5.0.19991023' to symbol '_nc_trace_buf' failed: symbol not
> defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TINFO_5.0.19991023' to symbol '_tracechar' failed: symbol not
> defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TINFO_5.0.19991023' to symbol 'trace' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_cap_hash_table' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_capalias_table' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_infoalias_table' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_key_names' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_read_termcap_entry' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_trace_tries' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of 'local' to
> symbol '_nc_tracebits' failed: symbol not defined
> aarch64-unknown-linux-gnu-ld: error: version script assignment of
> 'NCURSES6_TINFO_5.1.20000708' to symbol '_nc_utf8_outch' failed: symbol not
> defined
> aarch64-unknown-linux-gnu-ld: error: too many errors emitted, stopping now
> (use --error-limit=0 to see all errors)
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[1]: *** [Makefile:986: ../lib/libncursesw.so.6.4] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory '/build/ncurses-6.4/ncurses'
> make: *** [Makefile:135: all] Error 2
>
> We've had to work around this in nixpkgs by explicitly allowing undefined
> versions[3].
>
> Cheers,
> Bernardo.
>
> [1]:
> https://github.com/llvm/llvm-project/commit/241dbd310599e3c1a0f1b0c9ced14c8b8760539e
> [2]: https://github.com/NixOS/nixpkgs/issues/310727
> [3]: https://github.com/NixOS/nixpkgs/pull/309887
>
>
>
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature