Re: Bash Static broken with new ncurses update on current

From: Baptiste Daroussin <bapt_at_freebsd.org>
Date: Wed, 06 Oct 2021 07:56:15 UTC
On Tue, Oct 05, 2021 at 11:46:45AM -0700, Manfred Antar (KN6KBS) wrote:
> After update to current world on 10/5/2021 bash static is broken:
> 
> cc -L./builtins -L/usr/local/lib -L/usr/local/lib -L./lib/glob  -L./lib/tilde  -L./lib/sh  -L/usr/local/lib -fstack-protector-strong -fuse-ld=bfd  -static  -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -static -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o   dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o  expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o  trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o  alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o  bashline.o  list.o stringlib.o locale.o findcmd.o redir.o  pcomplete.o pcomplib.o syntax.o xmalloc.o  -lbuiltins -lglob -lsh -lreadline -lhistory -lncursesw  -ltilde     -L/usr/local/lib
> /usr/local/bin/ld.bfd: ./lib/sh/libsh.a(tmpfile.o): in function `sh_mktmpname':
> tmpfile.c:(.text+0x85): warning: warning: mktemp() possibly used unsafely; consider using mkstemp()
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(display.o): in function `update_line':
> display.c:(.text+0x4654): undefined reference to `tgoto'
> /usr/local/bin/ld.bfd: display.c:(.text+0x4664): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: display.c:(.text+0x48e1): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: display.c:(.text+0x48ff): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: display.c:(.text+0x4a62): undefined reference to `tgoto'
> /usr/local/bin/ld.bfd: display.c:(.text+0x4a74): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: display.c:(.text+0x4b5d): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: display.c:(.text+0x4b8f): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: display.c:(.text+0x4bc7): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(display.o): in function `_rl_clear_to_eol':
> display.c:(.text+0x4c15): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(display.o):display.c:(.text+0x4cf3): more undefined references to `tputs' follow
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o): in function `_rl_get_screen_size':
> terminal.c:(.text+0xd0): undefined reference to `tgetnum'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x108): undefined reference to `tgetnum'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o): in function `_rl_init_terminal_io':
> terminal.c:(.text+0x36d): undefined reference to `tgetent'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x39b): undefined reference to `tgetstr'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x5b9): undefined reference to `PC'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x5cc): undefined reference to `BC'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x5d7): undefined reference to `UP'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x603): undefined reference to `PC'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x611): undefined reference to `BC'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x61f): undefined reference to `UP'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x63e): undefined reference to `tgetflag'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x64f): undefined reference to `tgetflag'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0x6a3): undefined reference to `tgetflag'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o): in function `_rl_backspace':
> terminal.c:(.text+0xa43): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: terminal.c:(.text+0xa62): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o): in function `_rl_cr':
> terminal.c:(.text+0xb37): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o): in function `rl_ding':
> terminal.c:(.text+0xb78): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o): in function `_rl_standout_on':
> terminal.c:(.text+0xbd6): undefined reference to `tputs'
> /usr/local/bin/ld.bfd: /usr/local/lib/libreadline.a(terminal.o):terminal.c:(.text+0xc06): more undefined references to `tputs' follow
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> *** [bash] Error code 1
> 
> make[2]: stopped in /usr/ports/shells/bash/work/bash-5.1
> 1 error
> 
> make[2]: stopped in /usr/ports/shells/bash/work/bash-5.1
> ===> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
> the maintainer.
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /usr/ports/shells/bash
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/ports/shells/bash
> 
> 



Fixed, thank you for reporting

Bapt