
Sir, i have a problem regarding the installation of ppl-0.5. It does not install on my system. configure exits saying that "gmp not found" I have installed GMP on my machine. all self tests that come with GMP are also working fine. for gmp, i used the --enable-cxx option with configure. then make, make check, and finally make install as mentioned in the gmp installation instructions. I start ppl installation with : [root@neem ppl-0.5]# ./configure --with-gmp-dir=/usr/local/lib --with-gmp-includes=/pkg2/GMP/gmp-4.1.2
GMP source directory is /pkg2/GMP/gmp-4.1.2 and GMP libraries are installed in /usr/local/lib.
is there something that i am missing? please help.
Thank you, Nitin Kulkarni.

nitinsk@cfdvs.iitb.ac.in wrote:
i have a problem regarding the installation of ppl-0.5. It does not install on my system. configure exits saying that "gmp not found" I have installed GMP on my machine. all self tests that come with GMP are also working fine. for gmp, i used the --enable-cxx option with configure. then make, make check, and finally make install as mentioned in the gmp installation instructions. I start ppl installation with : [root@neem ppl-0.5]# ./configure --with-gmp-dir=/usr/local/lib --with-gmp-includes=/pkg2/GMP/gmp-4.1.2
GMP source directory is /pkg2/GMP/gmp-4.1.2 and GMP libraries are installed in /usr/local/lib.
is there something that i am missing? please help.
Dear Nitin,
from the files you sent, I gather that you configured GMP 4.1.2 with the command
./configure --enable-cxx
Since you have not specified the `--prefix' option, the default installation prefix `/usr/local' should have been used. If this is correct, then I don't understand the command with which you have configured the PPL:
./configure --with-gmp-dir=/usr/local/lib \ --with-gmp-includes=/pkg2/GMP/gmp-4.1.2
I believe it should be
./configure --with-gmp-dir=/usr/local/lib \ --with-gmp-includes=/usr/local/include
Nonetheless, the origin of your problem seems to be another one. For some reasons, it seems in your system there is another version of GMP, perhaps compiled with a different (version of the) C++ that is picked up by the linker during the PPL configuration process. In order to check if this is the problem, please try to compile the attached snippet (which is the same used in the PPL configuration script) with the command
g++ -g -O2 -I/usr/local/include tgmp.cc -L/usr/local/lib -lgmpxx -lgmp
If this fails, please use the verbose option `-v', i.e.,
g++ -v -g -O2 -I/usr/local/include tgmp.cc -L/usr/local/lib -lgmpxx -lgmp
and send us the messages printed out by the compiler. Cheers
Roberto
-- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
#include <gmpxx.h>
using namespace std;
int main() { mpz_class pie("3141592653589793238462643383279502884"); exit(0); }

Dear Roberto,
following your instructions, i compiled the code snippet that you had sent. and as you had guessed, it did not compile. i am attaching a file containing the output of the compile command.
Thank you, Nitin Kulkarni.
On Wed, 13 Aug 2003, Roberto Bagnara wrote:
nitinsk@cfdvs.iitb.ac.in wrote:
i have a problem regarding the installation of ppl-0.5. It does not install on my system. configure exits saying that "gmp not found" I have installed GMP on my machine. all self tests that come with GMP are also working fine. for gmp, i used the --enable-cxx option with configure. then make, make check, and finally make install as mentioned in the gmp installation instructions. I start ppl installation with : [root@neem ppl-0.5]# ./configure --with-gmp-dir=/usr/local/lib --with-gmp-includes=/pkg2/GMP/gmp-4.1.2
GMP source directory is /pkg2/GMP/gmp-4.1.2 and GMP libraries are installed in /usr/local/lib.
is there something that i am missing? please help.
Dear Nitin,
from the files you sent, I gather that you configured GMP 4.1.2 with the command
./configure --enable-cxx
Since you have not specified the `--prefix' option, the default installation prefix `/usr/local' should have been used. If this is correct, then I don't understand the command with which you have configured the PPL:
./configure --with-gmp-dir=/usr/local/lib \ --with-gmp-includes=/pkg2/GMP/gmp-4.1.2
I believe it should be
./configure --with-gmp-dir=/usr/local/lib \ --with-gmp-includes=/usr/local/include
Nonetheless, the origin of your problem seems to be another one. For some reasons, it seems in your system there is another version of GMP, perhaps compiled with a different (version of the) C++ that is picked up by the linker during the PPL configuration process. In order to check if this is the problem, please try to compile the attached snippet (which is the same used in the PPL configuration script) with the command
g++ -g -O2 -I/usr/local/include tgmp.cc -L/usr/local/lib -lgmpxx -lgmp
If this fails, please use the verbose option `-v', i.e.,
g++ -v -g -O2 -I/usr/local/include tgmp.cc -L/usr/local/lib -lgmpxx -lgmp
and send us the messages printed out by the compiler. Cheers
Roberto
-- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
----------------------------------------- Nitin Kulkarni Graduate Student Computer Science and Engineering Dept., IIT Bombay, Mumbai, India. -----------------------------------------

nitinsk@cfdvs.iitb.ac.in wrote:
following your instructions, i compiled the code snippet that you had
sent. and as you had guessed, it did not compile. i am attaching a file containing the output of the compile command.
Dear Nitin,
the output you sent shows nothing wrong. I am now convinced that you should have, in your system, a (old) version of GMP compiled with a different (version of the) C++ compiler. If you installed GMP 4.1.2 compiled with GCC 3.3 in /usr/local you should see something like the following
$ ls -l /usr/local/include/gmp* -rw-r--r-- 1 root root 79571 Jun 30 15:32 /usr/local/include/gmp.h -rw-r--r-- 1 root root 182330 Jun 30 15:32 /usr/local/include/gmpxx.h $ ls -l /usr/local/lib/libgmp* -rw-r--r-- 1 root root 2863428 Jun 30 15:32 /usr/local/lib/libgmp.a -rwxr-xr-x 1 root root 693 Jun 30 15:32 /usr/local/lib/libgmp.la lrwxrwxrwx 1 root root 15 Jun 30 15:32 /usr/local/lib/libgmp.so -> libgmp.so.3.3.2 lrwxrwxrwx 1 root root 15 Jun 30 15:32 /usr/local/lib/libgmp.so.3 -> libgmp.so.3.3.2 -rwxr-xr-x 1 root root 1409013 Jun 30 15:32 /usr/local/lib/libgmp.so.3.3.2 -rw-r--r-- 1 root root 1337872 Jun 30 15:32 /usr/local/lib/libgmpxx.a -rwxr-xr-x 1 root root 1161 Jun 30 15:32 /usr/local/lib/libgmpxx.la lrwxrwxrwx 1 root root 17 Jun 30 15:32 /usr/local/lib/libgmpxx.so -> libgmpxx.so.3.0.4 lrwxrwxrwx 1 root root 17 Jun 30 15:32 /usr/local/lib/libgmpxx.so.3 -> libgmpxx.so.3.0.4 -rwxr-xr-x 1 root root 629220 Jun 30 15:32 /usr/local/lib/libgmpxx.so.3.0.4
And this should be the only version of GMP's libgmpxx.* files you have in the system. If, for example, you have another instance of the GMP C++ interface installed in a place that your compiler looks into _before_ looking into /usr/local/lib, this may be the cause of your problem.
Try passing the --verbose option to the linker, i.e., use the command
g++ -v -I/usr/local/include tgmp.cc -L/usr/local/lib -lgmpxx -lgmp -Xlinker --verbose
and check where the linker picks libgmpxx.so from. For instance, here is what I see in the output of the above command:
attempt to open /usr/local/lib/libgmpxx.so succeeded -lgmpxx (/usr/local/lib/libgmpxx.so)
This tells me that the linker is picking up the right version of the library. Keep us informed. Cheers
Roberto
participants (2)
-
nitinsk@cfdvs.iitb.ac.in
-
Roberto Bagnara