bug-rcs
[Top][All Lists]
Advanced

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

Build failure for rcs-5.9.4 on CentOS 8 with gcc 8


From: Thom O'Connor
Subject: Build failure for rcs-5.9.4 on CentOS 8 with gcc 8
Date: Mon, 20 Apr 2020 18:12:45 -0600 (MDT)

Hi RCS team,

The rcs package is not available in the CentOS 8 distribution/repository (it 
was previously available with CentOS7). When compiling rcs-5.9.4 from source on 
CentOS8 using gcc 8 [gcc-8.3.1-4.5.el8.x86_64], getting a set of build errors, 
mostly related to what appears to be the replacement of "_Noreturn" with 
"__attribute__((__noreturn__))" in gcc-8.

// build error on CentOS 8 with gcc-8

# ./configure
# make
...
gcc -DHAVE_CONFIG_H -I. -I../lib  -I'../lib'   -g -O2 -MT b-anchor.o -MD -MP 
-MF .deps/b-anchor.Tpo -c -o b-anchor.o b-anchor.c
In file included from b-anchor.c:21:
base.h: In function ‘unexpected_EOF’:
base.h:758:3: error: ‘_Noreturn’ in empty declaration
   exiting;
   ^~~~~~~
base.h:44:18: warning: empty declaration
 #define exiting  _Noreturn
                  ^~~~~~~~~
base.h:758:3: note: in expansion of macro ‘exiting’
   exiting;
   ^~~~~~~
base.h:802:26: error: storage class specified for parameter ‘ctab’
 extern enum tokens const ctab[];
                          ^~~~
base.h:44:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before 
‘_Noreturn’
 #define exiting  _Noreturn
                  ^~~~~~~~~
base.h:834:3: note: in expansion of macro ‘exiting’
   exiting;
   ^~~~~~~


I put together a quick patch that fixes the compilation on CentOS8, included 
below.

Many thanks for all your work and maintenance on rcs - continues to be an 
important tool for versioning control.

Warm regards,
Thom


// rcs-patch 

--- ./src/base.h-orig   2015-01-09 02:40:02.000000000 -0700
+++ ./src/base.h        2020-04-20 16:21:25.219919026 -0600
@@ -41,7 +41,7 @@
 #include <vfork.h>
 #endif
 
-#define exiting  _Noreturn
+#define exiting  __attribute__((__noreturn__))
 
 /* GCC attributes  */
 
@@ -754,8 +754,7 @@
 int donerewrite (int changed, time_t newRCStime);
 void ORCSclose (void);
 void ORCSerror (void);
-void unexpected_EOF (void)
-  exiting;
+void unexpected_EOF (void) exiting;
 void initdiffcmd (struct diffcmd *dc);
 int getdiffcmd (struct fro *finfile, bool delimiter,
                 FILE *foutfile, struct diffcmd *dc);
@@ -830,8 +829,7 @@
                       char datebuf[datesize + zonelenmax]);
 
 /* rcsutil */
-void thank_you_and_goodnight (int const how)
-  exiting;
+void thank_you_and_goodnight (int const how) exiting;
 /* These are for ‘thank_you_and_goodnight’.  */
 #define TYAG_ORCSERROR     (1 << 3)
 #define TYAG_DIRTMPUNLINK  (1 << 2)


reply via email to

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