bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash doesn't build with gcc 14.x


From: Yuri Kanivetsky
Subject: Re: bash doesn't build with gcc 14.x
Date: Sun, 8 Dec 2024 04:55:39 +0200

On Sat, Dec 7, 2024 at 7:50 PM Chet Ramey <chet.ramey@case.edu> wrote:
> Since you're building in a docker container, or, more specifically,
> without ncurses or any kind of termcap/termlib support, it might be
> better to run
>
>         ./configure --disable-readline
>
> The ancient termcap library in lib/termcap is only there to get bash
> to link.

Well, containers can be used to run software interactively, but indeed
--disable-readline may come in handy.

Also I was helped to realize that installing ncurses-dev will make it
build. Although lib/termcap/tparam.c apparently should build in any
case.

docker run --rm alpine:3.21 sh -euxc '
    apk add git build-base
    git clone https://git.savannah.gnu.org/git/bash.git
    cd bash
    git checkout 6794b5478f660256a1023712b5fc169196ed0a22
    ./configure
    make || true
    grep TERMCAP config.status
    apk add ncurses-dev
    ./configure
    make
    grep TERMCAP config.status
'
...
+ ./configure
...
checking for tgetent... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
checking for tgetent in -lncursesw... no
checking which library has the termcap functions... using gnutermcap
...
+ make
...
making lib/termcap/libtermcap.a in ./lib/termcap
make[1]: Entering directory '/bash/lib/termcap'
gcc -c -g -O2 -DHAVE_CONFIG_H  -I. -I../.. -I../.. -I../../lib -I. termcap.c
gcc -c -g -O2 -DHAVE_CONFIG_H  -I. -I../.. -I../.. -I../../lib -I. tparam.c
tparam.c: In function 'memory_out':
tparam.c:67:3: error: implicit declaration of function 'write'; did
you mean 'wprintf'? [-Wimplicit-function-declaration]
   67 |   write (2, "virtual memory exhausted\n", 25);
      |   ^~~~~
      |   wprintf
make[1]: *** [Makefile:56: tparam.o] Error 1
make[1]: Leaving directory '/bash/lib/termcap'
make: *** [Makefile:702: lib/termcap/libtermcap.a] Error 1
+ true
+ grep TERMCAP config.status
S["TERMCAP_DEP"]="./lib/termcap/libtermcap.a"
S["TERMCAP_LIB"]="./lib/termcap/libtermcap.a"
+ apk add ncurses-dev
...
+ ./configure
...
checking for tgetent... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... yes
checking which library has the termcap functions... using libtinfo
...
+ make
...
gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob
-L./lib/tilde -L./lib/malloc -L./lib/sh  -rdynamic -g -O2   -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 -ltinfo -ltilde -lmalloc
lib/intl/libintl.a     -ldl
ls -l bash
-rwxr-xr-x    1 root     root       4687096 Dec  8 02:33 bash
size bash
   text       data        bss        dec        hex    filename
1293031      48528      45632    1387191     152ab7    bash
make[1]: Entering directory '/bash/support'
rm -f man2html.o
gcc -c  -DHAVE_CONFIG_H -DSHELL  -I/bash -I.. -Wno-parentheses
-Wno-format-security   -g -O2 man2html.c
gcc -rdynamic -rdynamic -g -O2 man2html.o -o man2html -ldl
make[1]: Leaving directory '/bash/support'
+ grep TERMCAP config.status
S["TERMCAP_DEP"]=""
S["TERMCAP_LIB"]="-ltinfo"
D["HAVE_TERMCAP_H"]=" 1"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]