Menu

#299 15.9 + master: build fails with gcc 10.2.1

None
closed-invalid
nobody
None
5
2021-01-25
2020-09-05
No

gcc 10.2.1
Looks like C++ syntax is used in C files and even using g++ on failing file does not help.

It would be good to migrate git repo to github or gitlab to allow fetching exact commits patches over https/http.

BTW: Do you have any plans to make new nereleae?

Full build log:

+ /usr/bin/gzip -dc /home/tkloczko/rpmbuild/SOURCES/cscope-15.9.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd cscope-15.9
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-modified-from-patch-81-Fix-reading-include-files-in-.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-Cull-extraneous-declaration.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-Avoid-putting-directories-found-during-header-search.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-Avoid-double-free-via-double-fclose-in-changestring.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-contrib-ocs-Fix-bashims-Closes-480591.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-doc-cscope.1-Fix-hyphens.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-fscanner-swallow-function-as-parameters.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/cscope-emacs-plugin-fixup-GNU-Emacs-27.1-removes-function-p.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.N38aSE
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd cscope-15.9
+ autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
autoreconf: configure.in: tracing
autoreconf: configure.in: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
autoreconf: Leaving directory `.'
+ export 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ export 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ export 'FFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ export 'FCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ export 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin'
+ export AR=/usr/bin/gcc-ar RANLIB=/usr/bin/gcc-ranlib NM=/usr/bin/gcc-nm
+ AR=/usr/bin/gcc-ar
+ RANLIB=/usr/bin/gcc-ranlib
+ NM=/usr/bin/gcc-nm
+ export CC=gcc CXX=g++
+ CC=gcc
+ CXX=g++
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --disable-silent-rules --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking whether make supports the include directive... yes (GNU style)
checking for x86_64-redhat-linux-gnu-gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for x86_64-redhat-linux-gnu-gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for bison... bison -y
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
configure: checking "location of cursesw.h file"...
Found ncurses on /usr/include/cursesw.h
checking for ncurses version... VERSION:
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for regcomp in -lregex... no
checking for gnome-config... no
checking for pkg-config... true
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/window.h usability... no
checking sys/window.h presence... no
checking for sys/window.h... no
checking sys/termios.h usability... yes
checking sys/termios.h presence... yes
checking for sys/termios.h... yes
checking for unistd.h... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking floss.h usability... no
checking floss.h presence... no
checking for floss.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for an ANSI C-conforming const... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for sighandler_t... yes
checking for sigsetjmp... yes
checking for strchr... yes
checking for memcpy... yes
checking for memset... yes
checking for setmode... no
checking for _setmode... no
checking for getcwd... yes
checking for regcmp... no
checking for regcomp... yes
checking for strerror... yes
checking for lstat... yes
checking for fixkeypad... no
checking for getopt_long... yes
checking for stdarg.h... yes
checking for varargs.h... no
checking for unsigned long long int... yes
checking for vsnprintf... yes
checking whether vsnprintf is C99 compliant... yes
checking for snprintf... yes
checking whether snprintf is C99 compliant... yes
checking for vsnprintf... (cached) yes
checking whether vsnprintf is C99 compliant... (cached) yes
checking for vasprintf... yes
checking for asprintf... yes
checking for vasprintf... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating contrib/Makefile
config.status: creating config.h
config.status: executing depfiles commands
+ /usr/bin/make -O -j1 V=1 VERBOSE=1
/usr/bin/make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9'
Making all in doc
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9/doc'
Making all in src
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9/src'
/usr/bin/make  all-am
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9/src'
/bin/sh ../ylwrap fscanner.l lex.yy.c fscanner.c -- flex
gcc -DHAVE_CONFIG_H -I. -I..     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -c -o fscanner.o fscanner.c
fscanner.c:58311:16: warning: 'yy_top_state' defined but not used [-Wunused-function]
58311 |
      |                ^
gcc -DHAVE_CONFIG_H -I. -I..     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -c -o egrep.o egrep.c
gcc -DHAVE_CONFIG_H -I. -I..     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -c -o alloc.o alloc.c
gcc -DHAVE_CONFIG_H -I. -I..     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -c -o basename.o basename.c
gcc -DHAVE_CONFIG_H -I. -I..     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -c -o build.o build.c
In file included from build.c:50:
/usr/include/cursesw.h:37:8: error: expected identifier or '(' before string constant
   37 | extern "C" {
      |        ^~~
In file included from /usr/include/cursesw.h:52,
                 from build.c:50:
/usr/include/etip.h:119:8: error: expected identifier or '(' before string constant
  119 | extern "C" {
      |        ^~~
In file included from /usr/include/cursesw.h:52,
                 from build.c:50:
/usr/include/etip.h:143:1: error: unknown type name 'class'
  143 | class NCURSES_CXX_IMPEXP NCursesPanel;
      | ^~~~~
/usr/include/etip.h:144:1: error: unknown type name 'class'
  144 | class NCURSES_CXX_IMPEXP NCursesMenu;
      | ^~~~~
/usr/include/etip.h:145:1: error: unknown type name 'class'
  145 | class NCURSES_CXX_IMPEXP NCursesForm;
      | ^~~~~
/usr/include/etip.h:147:1: error: unknown type name 'class'
  147 | class NCURSES_CXX_IMPEXP NCursesException
      | ^~~~~
/usr/include/etip.h:148:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
  148 | {
      | ^
/usr/include/etip.h:181:1: error: unknown type name 'class'
  181 | class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
      | ^~~~~
/usr/include/etip.h:181:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
  181 | class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
      |                                                ^
/usr/include/etip.h:232:1: error: unknown type name 'class'
  232 | class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
      | ^~~~~
/usr/include/etip.h:232:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
  232 | class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
      |                                               ^
/usr/include/etip.h:283:1: error: unknown type name 'class'
  283 | class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
      | ^~~~~
/usr/include/etip.h:283:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
  283 | class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
      |                                               ^
/usr/include/etip.h:336:15: fatal error: iostream: No such file or directory
  336 | #     include <iostream>
      |               ^~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:558: build.o] Error 1
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9/src'
make[2]: *** [Makefile:395: all] Error 2
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9/src'
make[1]: *** [Makefile:373: all-recursive] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/cscope-15.9'
make: *** [Makefile:314: all] Error 2

Discussion

  • Hans-Bernhard Broeker

    • status: open --> pending-invalid
    • Group: -->
     
  • Hans-Bernhard Broeker

    AFAICS none of those failures actually originate in cscope itself.

    Note how they're all in system library header files, which somehow expanded C++-only pieces to a C compiler. I would suspect the root cause to be either in a broken ncurses installation, or a broken RPM build script.

     
  • Tomasz K&#322;oczko

    I'm using ncurses 6.2-4.2020081.
    None of other my packages complains about anything wrong in ncurses header files.

     
    • Hans-Bernhard Broeker

      Well, somehow it managed to hide the correct header file, curses.h, from the configure script. Instead it found the C++ version: cursesw.h. How exactly that happened can only be analyzed by looking at your config.log file. FWIW the original script would never even look for a file of that name.

       
  • Tomasz K&#322;oczko

    Feel free to close that ticket.
    I found what I've done wrong :P

     
  • Hans-Bernhard Broeker

    • status: pending-invalid --> closed-invalid
     
  • Hans-Bernhard Broeker

    It might be interesting to tell the public what that mistake was, so others can avoid tripping over it. I will close this anyway.

     

Log in to post a comment.