bug-bash
[Top][All Lists]
Advanced

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

bash doesn't build with gcc 14.x


From: Yuri Kanivetsky
Subject: bash doesn't build with gcc 14.x
Date: Sat, 7 Dec 2024 02:50:34 +0200

gcc 14.1.0 turned -Wimplicit-function-declaration into an error:

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=55e94561e97ed0bce4774aa1c6b5d5d82209a379

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a1adce82c17577aeaaf6b9736ca8a1455d1164cb

The bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91092

The porting guide which includes a section on -Wimplicit-function-declaration:
https://gcc.gnu.org/gcc-14/porting_to.html#implicit-function-declaration

A way to reproduce the issue:

$ 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
    gcc --version
    make
'
...
+ gcc --version
gcc (Alpine 14.2.0) 14.2.0
...
+ 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

Under alpine:3.20 (gcc 13.2.1) it builds.

Regards,
Yuri



reply via email to

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