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

            Bug ID: 65988
           Summary: Trying to compile GCC 5.1 in my (customized) Solaris
                    10/x86-64 fails with GMP errors
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jcea at jcea dot es
  Target Milestone: ---

Currently running GCC 4.9.2. Compiled cleanly.

When trying to compile GCC 5.1 I get these errors: (partial/incomplete)

"""
[...]
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/bits/stringfwd.h:69:3:
error: template with C linkage
   template<typename _CharT, typename _Traits = char_traits<_CharT>,
   ^
In file included from
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/iosfwd:40:0,
                 from /usr/local/include/gmp.h:34,
                 from /usr/local/include/isl/val_gmp.h:4,
                 from ../../gcc-5.1.0/gcc/graphite-isl-ast-to-gimple.c:33:
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/bits/postypes.h:111:3:
error: template with C linkage
   template<typename _StateT>
   ^
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/bits/postypes.h:214:3:
error: template with C linkage
   template<typename _StateT>
   ^
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/bits/postypes.h:219:3:
error: template with C linkage
   template<typename _StateT>
   ^
In file included from /usr/local/include/gmp.h:34:0,
                 from /usr/local/include/isl/val_gmp.h:4,
                 from ../../gcc-5.1.0/gcc/graphite-isl-ast-to-gimple.c:33:
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/iosfwd:76:3: error:
template with C linkage
   template<typename _CharT, typename _Traits = char_traits<_CharT> >
   ^
/tmp/z/obj/prev-i386-pc-solaris2.10/libstdc++-v3/include/iosfwd:79:3: error:
template with C linkage
[...]
In file included from /usr/local/include/isl/val_gmp.h:4:0,
                 from ../../gcc-5.1.0/gcc/graphite-isl-ast-to-gimple.c:33:
/usr/local/include/gmp.h:2255:71: error: conflicting declaration of C function
‘std::ostream& operator<<(std::ostream&, mpq_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr);
                                                                       ^
/usr/local/include/gmp.h:2254:33: note: previous declaration ‘std::ostream&
operator<<(std::ostream&, mpz_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr);
                                 ^
/usr/local/include/gmp.h:2256:71: error: conflicting declaration of C function
‘std::ostream& operator<<(std::ostream&, mpf_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr);
                                                                       ^
/usr/local/include/gmp.h:2255:33: note: previous declaration ‘std::ostream&
operator<<(std::ostream&, mpq_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr);
[...]
/usr/local/include/gmp.h:2255:33: note: previous declaration ‘std::ostream&
operator<<(std::ostream&, mpq_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr);
                                 ^
/usr/local/include/gmp.h:2256:71: error: conflicting declaration of C function
‘std::ostream& operator<<(std::ostream&, mpf_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr);
                                                                       ^
/usr/local/include/gmp.h:2254:33: note: previous declaration ‘std::ostream&
operator<<(std::ostream&, mpz_srcptr)’
 __GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr);
                                 ^
/usr/local/include/gmp.h:2258:68: error: conflicting declaration of C function
‘std::istream& operator>>(std::istream&, mpq_ptr)’
 __GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr);
                                                                    ^
/usr/local/include/gmp.h:2257:33: note: previous declaration ‘std::istream&
operator>>(std::istream&, mpz_ptr)’
 __GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr);
                                 ^
/usr/local/include/gmp.h:2259:68: error: conflicting declaration of C function
‘std::istream& operator>>(std::istream&, mpf_ptr)’
 __GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr);
                                                                    ^
/usr/local/include/gmp.h:2258:33: note: previous declaration ‘std::istream&
operator>>(std::istream&, mpq_ptr)’
 __GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr);
                                 ^
/usr/local/include/gmp.h:2259:68: error: conflicting declaration of C function
‘std::istream& operator>>(std::istream&, mpf_ptr)’
 __GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr);
                                                                    ^
/usr/local/include/gmp.h:2257:33: note: previous declaration ‘std::istream&
operator>>(std::istream&, mpz_ptr)’
 __GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr);
                                 ^
Makefile:1058: recipe for target 'graphite-isl-ast-to-gimple.o' failed
make[3]: *** [graphite-isl-ast-to-gimple.o] Error 1
make[3]: Leaving directory '/tmp/z/obj/gcc'
Makefile:4406: recipe for target 'all-stage2-gcc' failed
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory '/tmp/z/obj'
Makefile:21875: recipe for target 'stage2-bubble' failed
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory '/tmp/z/obj'
Makefile:899: recipe for target 'all' failed
make: *** [all] Error 2
"""

I am trying to compile with these options:

../gcc-5.1.0/configure --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld
--enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,go

My system is Solaris 10 x86-64 bits.

I am trying to compile this with GCC 4.9.2, compiled on this very same machine
and working correctly for other source code I compile.

The GMP versions apparently conflicting are 6.0.0a and 5.1.2. I was running
5.1.2 and upgraded to 6.0.0a when I got this error, with the same result.

Reply via email to