I am trying to install gcc4.8.2 on fedora but have encountered problems.
This is the error I got when running configure
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
So I went along to install the three of them
I installed gmp-4.3.2 which went ok
However when I got to install mpfr-3.1.2, I did "make check" after doing "./configure" and "make".
"make check" reported the following error and I am now stuck
ERROR! The versions of gmp.h (4.3.2) and libgmp (4.3.1) do not match.
Why are you installing gcc by hand? Surely Fedora has packages for it. Installing things by hand doesn't inform your package manager and can cause awful errors and conflicts.
What things have you installed manually so far? I foresee problems...
There must be another libmpfr already installed on your OS, and I assume you're building from source so package tracking has been skipped.
---------- Post updated at 06:10 PM ---------- Previous update was at 06:02 PM ----------
Sorry
What I meant was libgmp
If you like to compile a compiler by hand you'll be compiling almost the whole toolchain. And you're never sure it'll be stable enough since you're building a completely untested toolchain
Yes I foresee loads of problems
My system was changed to Fedora 13 ant am stuck with gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)
This is too old for what I want to do and am insalling gcc4.8.2
How can I clean up libgmp so I can install it again?
When doing "make install" on mpfr-3.1.2 I get the following error. How can I remove this problem?
ldconfig: libraries libgmpxx.so.4 and libgmpxx.so.4.1.0 in directory /usr/lib have same soname but different type.
Idid ls and got the following:
ls -l /usr/lib/libgmp*
-rw-r--r-- 1 root root 999690 Feb 6 18:34 /usr/lib/libgmp.a
-rwxr-xr-x 1 root root 779 Feb 6 18:34 /usr/lib/libgmp.la
lrwxrwxrwx 1 root root 15 Feb 6 18:34 /usr/lib/libgmp.so -> libgmp.so.3.5.2
lrwxrwxrwx 1 root root 15 Feb 6 18:34 /usr/lib/libgmp.so.3 -> libgmp.so.3.5.2
-rwxr-xr-x 1 root root 249148 Feb 6 16:36 /usr/lib/libgmp.so.3.4.2
-rwxr-xr-x. 1 root root 333044 Nov 27 2009 /usr/lib/libgmp.so.3.5.0
-rwxr-xr-x 1 root root 386110 Feb 6 18:34 /usr/lib/libgmp.so.3.5.2
-rw-r--r-- 1 root root 35652 Feb 6 18:34 /usr/lib/libgmpxx.a
-rwxr-xr-x 1 root root 812 Feb 6 18:34 /usr/lib/libgmpxx.la
lrwxrwxrwx 1 root root 17 Feb 6 18:34 /usr/lib/libgmpxx.so -> libgmpxx.so.4.1.2
lrwxrwxrwx 1 root root 17 Feb 6 18:34 /usr/lib/libgmpxx.so.4 -> libgmpxx.so.4.1.2
-rwxr-xr-x 1 root root 17327 Feb 6 16:36 /usr/lib/libgmpxx.so.4.0.2
-rwxr-xr-x. 1 root root 12688 Nov 27 2009 /usr/lib/libgmpxx.so.4.1.0
-rwxr-xr-x 1 root root 21014 Feb 6 18:34 /usr/lib/libgmpxx.so.4.1.2
By 'cleaning up' you run the risk of wrecking your one good compiler, which would be a disaster... My advice, leave it alone, install everything separately.
./configure should be doing that by default, actually, it should put everything in /usr/local/...
You may need to use custom options to tell ./configure to search in /usr/local/ for libgmp and such, and need LD_LIBRARY_PATH="/usr/local/lib" to find the right libraries when you run them, but this will allow you to get a new compiler working without replacing parts of your old one..
Need some guidance through installing everything separately.
I have downloaded what I need,
gmp-4.3.2
mpfr-3.1.2
mpc-1.0.2
What, exactly, have you been doing?
./configure should have been installing in /usr/local/, not /usr/, unless you gave ./configure PREFIX="/usr".
for gmp I used
./configure --prefix=/usr --enable-cxx --enable-mpbsd
And the other packages? What did you do for them?
and same for mpfr. And I stopped there
You cannot "update" when compiling by hand... You are ripping the floor out from underneath your package manager and trashing your existing applications. You want to install a separate version somewhere else instead.
That's why /usr/local exists, why it's the default for hand compilation.
So, you need to:
1) Uninstall all the packages you hand-installed into /usr/.
2) Reinstall the "old" versions to repair any files overwritten or deleted by your hand-installations.
3) Compile and install your packages into /usr/local/, i.e. leaving PREFIX at default.
Whenever a package complains about the version of something being too old, look carefully at its ./configure --help options and direct it to /usr/local/include or /usr/local/lib to use your custom-compiled versions.
This way, the new and old versions can co-exist.
Ok, so now I installed
gmp-4.3.2
mpfr-3.1.2
mpc-1.0.2
When doing configure on gcc-4.8.2 I need to use --with options to specify
their locations. What locations should I use?
../gcc-4.8.2/configure --with-gmp --with-mpfr --with-mpc
Depends what options you have, and where those packages installed what files. ./configure --help
Does it list the defaults for those options? Those might help.
Thought I would see things in /usr/local however they are not there
Doing as you suggested gave the following
./configure --help
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.
---------- Post updated at 05:25 PM ---------- Previous update was at 04:29 PM ----------
I have now installed them on /home/chrisd/local/gcc_numeric_lib/lib
../gcc-4.8.2/configure --with-gmp=/home/chrisd/local/gcc_numeric_lib/lib --with-mpfr=/home/chrisd/local/gcc_numeric_lib/lib --with-mpc=/home/chrisd/local/gcc_numeric_lib/lib
Tried running make to get:
make && make install
make: *** No targets specified and no makefile found. Stop.
I'm not sure you're in the right directory, or ran configure in the right directory.