This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/80720] New: gcc build fails on libiberty conflicting types: CP_STATIC_IF_GLIBCPP_V3


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80720

            Bug ID: 80720
           Summary: gcc build fails on libiberty conflicting types:
                    CP_STATIC_IF_GLIBCPP_V3
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joriswu at gmail dot com
  Target Milestone: ---

When building gcc release 7.1.0 according to https://gcc.gnu.org/install, a
type conflict in building libiberty causes an error.

When building without binutils added to the source tree, buid stops at a
missing libiberty.aq
When building binutils libiberty in a separate dir and copying linbiberty.a, an
error about incorrect relacation type shows.

When unpacking binutils 2.28 into the gcc source dir, the type conflict shows :

if [ x"-fpic" != x ]; then \
          gcc -c -DHAVE_CONFIG_H -g  -I. -I../../gcc-7.1.0/libiberty/../include
 -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
-D_GNU_SOURCE -fpic ../../gcc-7.1.0/libiberty/cp-demangle.c -o
pic/cp-demangle.o; \
        else true; fi
../../gcc-7.1.0/libiberty/cp-demangle.c:4248:1: error: conflicting types for
‘cplus_demangle_print_callback’
 cplus_demangle_print_callback (int options,
 ^
In file included from ../../gcc-7.1.0/libiberty/cp-demangle.c:140:0:
../../gcc-7.1.0/libiberty/../include/demangle.h:715:1: note: previous
declaration of ‘cplus_demangle_print_callback’ was here
 cplus_demangle_print_callback (int options,
 ^
../../gcc-7.1.0/libiberty/cp-demangle.c:4292:1: error: conflicting types for
‘cplus_demangle_print’
 cplus_demangle_print (int options, const struct demangle_component *dc,
 ^
In file included from ../../gcc-7.1.0/libiberty/cp-demangle.c:140:0:
../../gcc-7.1.0/libiberty/../include/demangle.h:695:1: note: previous
declaration of ‘cplus_demangle_print’ was here
 cplus_demangle_print (int options,
 ^
make[3]: *** [cp-demangle.o] Error 1
make[3]: Leaving directory `/home/joris/pkg/gccbld/libiberty'

configured as :
../gcc-7.1.0/configure --prefix=/home/joris --enable-languages=c
--enable-checking=release --disable-nls --disable-multilib

Looking into the conflicting decls the difference is that the source function
has CP_STATIC_IF_GLIBCPP_V3 translating into static whilst demangle.h has it as
extern

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]