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 libstdc++/52740] Unable to make gcc-4.x.x after successful configuration


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52740

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-28 19:46:04 UTC ---
(In reply to comment #3)
> I have GLIBCXX_2.5 installed on my computer and I need version 3.4.9 or higher.
> I needed to install version 4 or higher for gcc so I randomly chose to install
> gcc-4.4.0. I can try 4.4.7 also

"Randomly" picking a .0 release is a terrible idea.  It is the first release
from a new series so inevitably has bugs which will be fixed in later versions,
so if you're going to choose a 4.4 release, pick the latest one not the most
buggy one of the whole series.

> However, all steps I performed and errors I encounetred are imentioned below
> Although I am not sure the error messages I got are sufficiently helpful or
> not.
> 
> After downloading GCC and placing it in a directory I ran its configuration
> script
> 
> /Gcc/gcc-4.4.0/configure --target=/usr/local/gcc-4.4.0/
> 
> It gave me error saying mpfr and gmp needs to be installed. I downloaded gmp
> version  5.0.4 and mpfr version 3.1.0. For installing gmp I simply ran
> following commands
> 
> ./configure
> make 
> make install
> 
> Everything executed pretty smoothly. Afterwards for installing mpfr I followed
> its instruction and first applied patch inside mpfr folder,as directed in
> INSTALL file
> 
> curl http://www.mpfr.org/mpfr-3.1.0/allpatches | patch -N -Z -p1

Don't use mpfr 3.1.0, it's known not to work, see PR 50461 for details.

As it says at http://gcc.gnu.org/install/prerequisites.html "Newer versions may
work in some cases, but it's safer to use the exact versions documented."  


> patch was applied successfully
> 
> Afterwords I executed 
> 
> ./configure
> 
> This gave me following WARNING at the end of execution
> 
> configure: WARNING: ==========================================================
> configure: WARNING: 'gmp.h' and 'libgmp' seem to have different versions or
> configure: WARNING: we cannot run a program linked with GMP (if you cannot
> configure: WARNING: see the version numbers above). A cause may be different
> configure: WARNING: GMP versions with different ABI's or the use of --with-gmp
> configure: WARNING: or --with-gmp-include with a system include directory
> configure: WARNING: (such as /usr/include or /usr/local/include).
> configure: WARNING: However since we can't use 'libtool' inside the configure,
> configure: WARNING: we can't be sure. See 'config.log' for details.
> configure: WARNING: ==========================================================

This is probably because you already had GMP isntalled somewhere, so installing
it again gives you two incompatible versions.

> At the end it said that creating Makefile etc. Afterwards I ran 
> 
> make 
> make check
> make install
> 
> No error appeared in this whole procedure except for above mentioned warning.
> 
> Afterwards I again ran configure script of gcc as mentioned above, which
> finished succefully saying "creating Makefile"
> 
> /Gcc/gcc-4.4.0/configure --target=/usr/local/gcc-4.4.0/
> 
> But when I ran make it gave me following error as in my first post 
> 
> make [2]: Leaving directory '/root/fixincludes'
> make [1]: *** [all-fixincludes] Error 2
> make [1]: Leaving directory '/root'
> make: *** [all] Error 2
> 
> This is all the erro rit showed me.

No it isn't, it will have printed many, MANY lines of output, and the error is
not shown in the last four lines you've copied.

> I have no Idea what to do about it.

I've already given you the link:
"Please read http://gcc.gnu.org/wiki/InstallingGCC and ensure you are not
making
the common mistakes listed there."

That page describes a foolproof way to build GCC, with the first suggestion
being the simplest: install gmp-devel and mpfr-devel RPMs from your
distribution.

> If
> there is a better and stable version which can give me GLIBC3.4.9 I'll use
> that, and also can you please refer to me appropriate guide for installing GCC

I already referred you to the simpler instruction on the wiki.

Please read it and you'll save us both time and effort.

> because the instructions available on this website has so many configurations
> that I do not know which one will be appropriate.
> Another Important point to note is after even the installation of mentioned
> versions of gmp and mpfr when I do rpm -qa|grep gmp and rpm -qa|grep mpfr the
> output I get is older version for gmp installed by distro and no output for
> mpfr? 

Of course, because you didn't install RPMs, you installed from source, so
obviously the rpm tool doesn't know about the other versions.

PLEASE READ http://gcc.gnu.org/wiki/InstallingGCC !

Basically, I suggest you delete the versions of gmp and mpfr you installed
manually and then use your distro's package management tool to install
gmp-devel and mpfr-devel RPMs.


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