Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to compile mpfr on ubuntu. I am getting the following error when running make check:
[tversion] GMP: header 5.0.2, library 4.3.2
[tversion] MPFR tuning parameters from src/x86_64/core2/mparam.h
ERROR! The versions of gmp.h (5.0.2) and libgmp (4.3.2) do not match.
The possible causes are:
* A bad configuration in your include/library search paths.
* An inconsistency in the include/library search paths of
your development environment; an example:
* GMP has been upgraded after the first "make check".
In such a case, try again after a "make clean".
* A new or non-standard version naming is used in GMP.
In this case, a patch may already be available on the
MPFR web site. Otherwise please report the problem.
In the first two cases, this may lead to errors, in particular with MPFR.
If some other tests fail, please solve that problem first.
Ealier I compiled gmp 5.0.2, and now it seems that there is some kind of inconsistency with the header file and the library itself. Any idea how to fix this?
Did you install gmp-5.0.2 or just build it? Did you uninstall the previous version of gmp? Did you tell mpfr where to look for the 5.0.2 libraries if you installed them in a non-standard location? Did you look into the four possible causes provided by mpfr, especially the third one?
I installed, I guess... I executed the commands the README specified: ./configure; make; make check; sudo install;
If this is exactly how you did it, then the v5 gmp should be installed in /usr/local. What is the output from these two commands?
ls -l /usr/lib/libgmp*
ls -l /usr/local/lib/libgmp*
Originally Posted by KeiNivky
No. How can I do this?
Did you install the previous gmp from source or using your package manager? If you installed using your package manager, use your package manager to uninstall it. If you installed from source, then execute make uninstall from the source directory for v4 gmp. If you don't have the source directory any more, then you will need to hunt down each file installed by v4 gmp and manually remove it.
Originally Posted by KeiNivky
Well. I didn't specified the path in the installation script, so I suppose it was put in the standard directory. I didn't tell mpfr to look for it in a specific directory.
What installation script? You should be able to pass an option to the mpfr configure script telling it explicitly where to look for the gmp headers and libraries. I suspect these are in /usr/local/include and /usr/local/lib(64) if you didn't pass --prefix to the gmp configure script.
What about this 10.0.2 version? I thought the newer was 5.0.2
I am not sure about how any of the previous version was installed, but it was not me. Maybe they came with the standard installation of ubuntu, or maybe they were installed as a dependency for another package. Either way, there are some some gmp entries in the installed packages table:
dpkg --list | grep gmp
ii libgmp-ocaml 20021123-17 OCaml bindings for the GNU multiprecision arithmetic library
ii libgmp-ocaml-dev 20021123-17 OCaml bindings for the GNU multiprecision arithmetic library
ii libgmp3-dev 2:4.3.2+dfsg-1ubuntu3 Multiprecision arithmetic library developers tools
ii libgmp3c2 2:4.3.2+dfsg-1ubuntu3 Multiprecision arithmetic library
ii libgmpxx4ldbl 2:4.3.2+dfsg-1ubuntu3 Multiprecision arithmetic library (C++ bindings)
Should I remove the last three?
And about the "install script", I was referring to "make install".
The first thing I would do is uninstall v5 by executing make uninstall in the source directory. Then I would use my package manager to update GMP to the latest version available in the repositories. I would also install MPFR from the repositories. Why do you need to build MPFR from source anyway?
If I needed to build MPFR from source, I wouldn't install it or it's dependencies system-wide...especially if I didn't understand what I was doing. I would create a directory in my $HOME to install things so I didn't pollute my system directories. For example, I might create a directory called MySystem in my $HOME. Then I would pass --prefix=$HOME/MySystem/usr to the configure script for anything I built from source. That way, when I executed make install, nothing could get installed system-wide because I wouldn't be root. Finally, I would add $HOME/MySystem/usr/bin:$HOME/MySystem/bin to my $PATH so I could access the applications I install in MySystem. But that's just me.
Also, the 10.0.2 libraries are the ones you installed from 5.0.2. The numbers on the end of the shared libraries themselves don't necessarily correspond to the version of the package.
Last edited by weibullguy; 12-16-2011 at 08:12 AM.
Thanks for all the help. I will probably use your advice and install them in my home.
gmp and mpfr are not updated in the repositories, that's why I am building them.
Just for curiosity. If keep the libs in my own home, then how would I include them in C programs? Is there a way of configuring where the compiler should look for headers and libs? Or I would always have to specify the full path?