Re: Error compiling GCC 4.8.2

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

 



21.11.2013 19:48, Vale Cofer-Shabica kirjoitti:

I'm receiving the following error when compiling GCC 4.8.2 on a redhat
machine with kernel version 2.6.18:

g++ -c  -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wwrite-strings -Wcast-qual  -fno-common  -DHAVE_CONFIG_H -I.
-Ic-family -I../../gcc-4.8.2/gcc -I../../gcc-4.8.2/gcc/c-family
-I../../gcc-4.8.2/gcc/../include
-I../../gcc-4.8.2/gcc/../libcpp/include -I/share/apps/include
-I/home/vale/toor/include  -I../../gcc-4.8.2/gcc/../libdecnumber
-I../../gcc-4.8.2/gcc/../libdecnumber/bid -I../libdecnumber
-I../../gcc-4.8.2/gcc/../libbacktrace
../../gcc-4.8.2/gcc/c-family/c-ppoutput.c -o c-family/c-ppoutput.o
../../gcc-4.8.2/gcc/../libcpp/internal.h:32: error: conflicting
declaration 'typedef int libiconv_t'
/home/vale/toor/include/iconv.h:47: error: 'libiconv_t' has a previous
declaration as 'typedef void* libiconv_t'
make[3]: *** [c-family/c-ppoutput.o] Error 1
make[3]: Leaving directory `/home/vale/build/gcc-objdir/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/vale/build/gcc-objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/vale/build/gcc-objdir'
make: *** [all] Error 2


I used the following options for configure:
../gcc-4.8.2/configure --prefix=/home/vale/toor
--with-mpfr=/share/apps --with-mpc=/home/vale/toor
--with-libiconv-prefix=/home/vale/toor

and compiled and installed libiconv-1.14 to $HOME/toor

Any ideas about what's going on?

Why the 'iconv()' in the RHEL5 glibc-2.5 wasn't enough/suitable?

So this issue is related to you knowing what you are doing and why... I myself
updated the gcc-4.8 in my CentOS 5.10/i386 and the CentOS 5.8/i386 target
cross compiler in my CentOS 6.4/x86_64 from gcc-4.8.0 to gcc-4.8.2. But
used only the default 'iconv()' in the provided native glibcs. No problems when
doing things in the default way...

Ok the conflicting definition in the 'gcc-4.8.2/libcpp/internal.h' is in the code :

#if HAVE_ICONV
#include <iconv.h>
#else
#define HAVE_ICONV 0
typedef int iconv_t;  /* dummy */ <--- row 32
#endif

when most probably :

/home/vale/toor/include/iconv.h:47: error: 'iconv_t' has a previous
declaration as 'typedef void* iconv_t'

as the error says. Why the 'iconv_t' was changed to 'libiconv_t' in the messages
I cannot say.  In the glibc headers (include/iconv.h) there also is the :

/* Identifier for conversion method from one codeset to another.  */
typedef void *iconv_t;

So somehow the HAVE_ICONV wasn't defined because of using the

--with-libiconv-prefix=/home/vale/toor

in the GCC configure...  In my build the $BUILD/gcc/auto-host.h had :

/* Define if you have the iconv() function. */
#ifndef USED_FOR_TARGET
#define HAVE_ICONV 1
#endif


/* Define to 1 if you have the <iconv.h> header file. */
#ifndef USED_FOR_TARGET
#define HAVE_ICONV_H 1
#endif

meaning these were found during the 'gcc' subdir configure...





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux