Opened 6 days ago

Last modified 40 hours ago

#5707 new enhancement

gcc-15.1.0

Reported by: Xi Ruoyao Owned by: lfs-book
Priority: normal Milestone: 12.4
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description (last modified by Xi Ruoyao)

New major version.

Change History (19)

comment:1 by Xi Ruoyao, 6 days ago

m4 FTBFS: https://savannah.gnu.org/support/?111150

Workaround: sed 's/\[\[__nodiscard__]]//' -i lib/config.hin

And hopefully a new release will be made soon: https://git.savannah.gnu.org/cgit/m4.git/commit/?h=branch-1.4&id=64d7891fe81e0020a28400f2dc6be9cd754be4ae

comment:3 by Xi Ruoyao, 6 days ago

bash FTBFS. The latest rc https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-bash-5.3-rc1.tar.gz works.

3 fails in a row, really "wonderful."

comment:4 by Xi Ruoyao, 6 days ago

Other chapter 6/7 packages are fine.

comment:5 by Douglas R. Reno, 6 days ago

This update is going to be quite messy in BLFS too. I've seen dozens of fixes over there in recent package updates for GCC 15, and there's some stuff in the kernel pending merge as well for fixing compilation with GCC 15.

comment:6 by Joe Locash, 5 days ago

For expect and cpio in chapter 8, I used CFLAGS+="$CFLAGS -std=gnu17" to get them to build. I also needed to update to readline-8.3-rc1 https://ftp.gnu.org/gnu/readline/readline-8.3-rc1.tar.gz for bash-5.3-rc1.

comment:7 by Xi Ruoyao, 5 days ago

There's no cpio in chapter 8.

comment:8 by Xi Ruoyao, 5 days ago

Another annoying thing is https://git.savannah.gnu.org/ is currently extremely unstable, making it very difficult to locate upstream fixes...

comment:9 by Xi Ruoyao, 5 days ago

For m4 another sed is needed to exclude a problematic test:

sed 's/test-stdalign\$(EXEEXT) //' -i tests/Makefile.in

The upstream fix for this test is at https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=b22b1e425f530eeb16d2e1313c292fc61e991b08 (I hope you don't get a HTTP Bad Gateway accessing it...) but I don't want to carry such a big patch just as a temporary (considering 1.4.20 will be likely released soon) solution. Also note the fix has been in gnulib 3 years ago...

comment:10 by Xi Ruoyao, 5 days ago

For bc we should just use CC='gcc -std=c99' instead of CC=gcc. The reason is the default value of CC is just "c99" which is a script running "gcc -std=c99" on many other distros.

in reply to:  10 comment:11 by Xi Ruoyao, 5 days ago

For expect:

  • expect5.45.4

    diff --color -Naur expect5.45.4.orig/exp_clib.c expect5.45.4/exp_clib.c
    old new  
    17351735int exp_loguser = TRUE;         /* if TRUE, user sees interactions on stdout */
    17361736
    17371737
    1738 char *exp_printify();
     1738char *exp_printify(char *);
    17391739int exp_getptymaster();
    1740 int exp_getptyslave();
     1740int exp_getptyslave(int, int, CONST char *);
    17411741
    17421742#define sysreturn(x)    return(errno = x, -1)
    17431743
  • exp_command.h

    diff --color -Naur expect5.45.4.orig/exp_command.h expect5.45.4/exp_command.h
    old new  
    222222
    223223EXTERN void             exp_strftime(char *format, const struct tm *timeptr,Tcl_DString *dstring);
    224224
    225 #define exp_deleteProc (void (*)())0
    226 #define exp_deleteObjProc (void (*)())0
     225#define exp_deleteProc NULL
     226#define exp_deleteObjProc NULL
    227227
    228228EXTERN int expect_key;
    229229EXTERN int exp_configure_count; /* # of times descriptors have been closed */
     
    321321EXTERN void             exp_init_most_cmds _ANSI_ARGS_((Tcl_Interp *));
    322322EXTERN void             exp_init_trap_cmds _ANSI_ARGS_((Tcl_Interp *));
    323323EXTERN void             exp_init_interact_cmds _ANSI_ARGS_((Tcl_Interp *));
    324 EXTERN void             exp_init_tty_cmds();
     324EXTERN void             exp_init_tty_cmds _ANSI_ARGS_((Tcl_Interp *));
    325325
    326326EXTERN ExpState *       expStateCheck _ANSI_ARGS_((Tcl_Interp *,ExpState *,int,int,char *));
    327327EXTERN ExpState *       expStateCurrent _ANSI_ARGS_((Tcl_Interp *,int,int,int));
  • exp_main_sub.c

    diff --color -Naur expect5.45.4.orig/exp_main_sub.c expect5.45.4/exp_main_sub.c
    old new  
    4949#define NEED_TCL_MINOR          5
    5050
    5151char *exp_argv0 = "this program";       /* default program name */
    52 void (*exp_app_exit)() = 0;
    53 void (*exp_event_exit)() = 0;
     52void (*exp_app_exit) _ANSI_ARGS_((Tcl_Interp *)) = 0;
     53void (*exp_event_exit) _ANSI_ARGS_((Tcl_Interp *)) = 0;
    5454FILE *exp_cmdfile = 0;
    5555char *exp_cmdfilename = 0;
    5656int exp_cmdlinecmds = FALSE;
     
    921921            char file[200];
    922922            char *home;
    923923            int fd;
    924             char *getenv();
    925924
    926925            if ((NULL != (home = getenv("DOTDIR"))) ||
    927926                (NULL != (home = getenv("HOME")))) {
  • expect5.45.4

    diff --color -Naur expect5.45.4.orig/exp_pty.c expect5.45.4/exp_pty.c
    old new  
    134134        return(cc);
    135135}
    136136
    137 static RETSIGTYPE (*oldAlarmHandler)();
    138 static RETSIGTYPE (*oldHupHandler)();
     137static RETSIGTYPE (*oldAlarmHandler)(int);
     138static RETSIGTYPE (*oldHupHandler)(int);
    139139static time_t current_time;     /* time when testing began */
    140140
    141141/* if TRUE, begin testing, else end testing */
  • expect5.45.4

    diff --color -Naur expect5.45.4.orig/exp_trap.c expect5.45.4/exp_trap.c
    old new  
    5353
    5454int sigchld_count = 0;  /* # of sigchlds caught but not yet processed */
    5555
    56 static int eval_trap_action();
     56static int
     57eval_trap_action(Tcl_Interp *, int, struct trap *, int);
    5758
    5859static int got_sig;             /* this records the last signal received */
    5960                                /* it is only a hint and can be wiped out */
  • expect5.45.4

    diff --color -Naur expect5.45.4.orig/exp_tty.c expect5.45.4/exp_tty.c
    old new  
    572572    char **argv)
    573573{
    574574        int result = TCL_OK;
    575         RETSIGTYPE (*old)();    /* save old sigalarm handler */
     575        RETSIGTYPE (*old)(int); /* save old sigalarm handler */
    576576#define MAX_ARGLIST 10240
    577577        int i;
    578578
  • expect5.45.4

    diff --color -Naur expect5.45.4.orig/exp_win.h expect5.45.4/exp_win.h
    old new  
    88
    99#include <tcl.h> /* For _ANSI_ARGS_ */
    1010
    11 int exp_window_size_set();
    12 int exp_window_size_get();
     11int exp_window_size_set _ANSI_ARGS_ ((int));
     12int exp_window_size_get _ANSI_ARGS_ ((int));
    1313
    1414void  exp_win_rows_set    _ANSI_ARGS_ ((char* rows));
    1515char* exp_win_rows_get    _ANSI_ARGS_ ((void));
  • pty_termios.c

    diff --color -Naur expect5.45.4.orig/pty_termios.c expect5.45.4/pty_termios.c
    old new  
    206206{
    207207#define MAX_ARGLIST 10240
    208208        char buf[MAX_ARGLIST];  /* overkill is easier */
    209         RETSIGTYPE (*old)();    /* save old sigalarm handler */
     209        RETSIGTYPE (*old)(int); /* save old sigalarm handler */
    210210        int pid;
    211211       
    212212        old = signal(SIGCHLD, SIG_DFL);
     
    266266{
    267267#define MAX_ARGLIST 10240
    268268        char buf[MAX_ARGLIST];  /* overkill is easier */
    269         RETSIGTYPE (*old)();    /* save old sigalarm handler */
     269        RETSIGTYPE (*old)(int); /* save old sigalarm handler */
    270270
    271271#ifdef STTY_READS_STDOUT
    272272        sprintf(buf,"%s %s > %s",STTY_BIN,s,name);

https://www.linuxfromscratch.org/patches/downloads/expect/expect-5.45.4-gcc15-1.patch (including the changes from -gcc14-1.patch).

comment:12 by Xi Ruoyao, 5 days ago

gmp: sed '/long long t1;/,+1s/()/(...)/' -i configure

It's a simplified (only works with C23) form of the upstream fix https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18.

comment:13 by Xi Ruoyao, 5 days ago

gcc.target/i386/pr90579.c fails: https://gcc.gnu.org/PR118885

The two sed

sed -e 's/no-pic /&-no-pie /'     -i ../gcc/testsuite/gcc.target/i386/pr113689-1.c
sed -e 's/{ target nonpic } //' \
    -e '/GOTPCREL/d'              -i ../gcc/testsuite/gcc.target/i386/fentryname3.c

are no longer needed.

in reply to:  6 comment:14 by Xi Ruoyao, 5 days ago

Replying to Joe Locash:

I also needed to update to readline-8.3-rc1 https://ftp.gnu.org/gnu/readline/readline-8.3-rc1.tar.gz for bash-5.3-rc1.

Confirmed. And for bash-5.3-rc1 there's a better download link than mine (mine has a stupid file name): https://ftp.gnu.org/gnu/bash/bash-5.3-rc1.tar.gz.

in reply to:  7 comment:15 by Joe Locash, 4 days ago

Replying to Xi Ruoyao:

There's no cpio in chapter 8.

My bad. I forgot I moved cpio to LFS because it's hard to create an initrd without it and cpio doesn't have any dependencies.

comment:16 by Xi Ruoyao, 3 days ago

For BLFS: wiki/gcc15-todo

in reply to:  16 ; comment:17 by Joe Locash, 2 days ago

Replying to Xi Ruoyao:

For BLFS: wiki/gcc15-todo

Could a ticket be created for tracking BLFS issues related to gcc15? I have a bunch of fixes I can submit.

in reply to:  17 comment:18 by Bruce Dubbs, 2 days ago

Replying to Joe Locash:

Could a ticket be created for tracking BLFS issues related to gcc15? I have a bunch of fixes I can submit.

You should have permissions to do that.

comment:19 by Xi Ruoyao, 40 hours ago

Description: modified (diff)
Summary: gcc-15.1.0-RC-20250418 (wait for 15.1.0)gcc-15.1.0
Note: See TracTickets for help on using tickets.