
Hello
While trying to compile my program using the command:
%g++ -lppl -lgmp -lgmpxx -o test PPL-test.cpp
I encountered an error message stating that libgmpxx can't be found anywhere. So I ran
%/sbin/ldconfig -n /usr/local/lib (my GMP was installed in /usr/local/lib)
but to no avail. The same problem still occured. So I tried this command instead:
%g++ -lppl -L/usr/local/lib -o test PPL-test.cpp
This time the compiler returned long list of errors saying something like /usr.../libppl.so: undefined reference to '__gmp_{name}'
So I linked those files, libgmp, libgmpxx and ppl directory, in /usr/local/lib to /usr/lib and compiled the program again. This time the compiler returned no error, but when I tried to run the program
%./test
the error appeared saying; relocation error: /usr/lib/libgmpxx.so.3: undefined symbol: __gmp_asprintf_memory'
I checked with 'ldd test' and it seems like all the libraries has been found successfully.
Did I do something wrong? Can anyone suggest me anything?
I'm using GCC 3.2 with GMP 4.1 installed with --enable-cxx and PPL 4.0.1
TIA
Cheers, Vaji

V Panumong wrote:
While trying to compile my program using the command:
%g++ -lppl -lgmp -lgmpxx -o test PPL-test.cpp
I encountered an error message stating that libgmpxx can't be found anywhere. So I ran [...]
Dear Vaji,
I am trying to see what may be the cause of your problems. Which system are you using? Is it perhaps a Linux system using RPM as the package manager? If so, could you mail the output of
rpm -qa | fgrep gmp
I will be back to you soon. All the best,
Roberto

Dear Mr.Roberto
Thank you very much for your e-mail. Tomorrow I'll be meeting Dr.Pat Hill and maybe we can come up with some idea to fix this problem. She might have talked something about this with you already.
The problem is I installed the library by using make & make install, not by RedHat Package Manager. The installation went pass alright, no errors. Also the GCC and GMP were installed by that method. I'm using Redhat 7.2 with nearly all the patches installed in the system already - apart from patches for kernel.
Thank you again and I hope the above information is what you want to know.
Cheers, Vaji
On Tue, 1 Oct 2002, Roberto Bagnara wrote:
V Panumong wrote:
While trying to compile my program using the command:
%g++ -lppl -lgmp -lgmpxx -o test PPL-test.cpp
I encountered an error message stating that libgmpxx can't be found anywhere. So I ran [...]
Dear Vaji,
I am trying to see what may be the cause of your problems. Which system are you using? Is it perhaps a Linux system using RPM as the package manager? If so, could you mail the output of
rpm -qa | fgrep gmp
I will be back to you soon. All the best,
Roberto

V Panumong wrote:
While trying to compile my program using the command:
%g++ -lppl -lgmp -lgmpxx -o test PPL-test.cpp
I encountered an error message stating that libgmpxx can't be found anywhere. So I ran [...]
Dear Vaji,
I notice now that, depending on how you configured and installed gcc, your compilation command above misses a -L/usr/local/lib. Can you please try
g++ -lppl -lgmp -lgmpxx -L/usr/local/lib -o test PPL-test.cpp
and let me know what happens? The output of
rpm -qa | fgrep gmp
would also be useful in case things still go wrong. All the best
Roberto

Dear Dr.Roberto
I'm very sorry for the late reply. After the meeting with Dr.Pat, I tried to install the PPL with different configuration - so I uninstalled the installed one out just in case it might trigger some conflicts, just to find out that the configure doesn't pass anymore.
It's the same problem that happened to me before, the compiler can't find GMP in the machine. I checked the file and knew that it was trying to link to gmpxx.h. The gmpxx.h is presented on my machine in the default installation directory, /usr/local/lib. I already put in line "LD_LIBRARY_PATH=/usr/local/lib" in my .bashrc and ran /sbin/ldconfig - n /usr/local/lib, but to no avail. I already tried ./configure --with-gmp-dir=/usr/local/lib. I was trying to fix that.
About your questions, I'm pretty sure that I already tried the command you suggested after the one without doesn't work. It compiled successful, but gave the same error on run-time.
The result from rpm -qa|fgrep gmp is;
gmp-devel-3.1.1-4 gmp-3.1.1-4
Does it suggest anything? It might be from when I installed RedHat or GMP, I can't be sure. Should I just erase them out? because I don't really want to find out later that the GMP doesn't work on my system anymore.
Thank you very much.
Vaji,
On Wed, 2 Oct 2002, Roberto Bagnara wrote:
V Panumong wrote:
While trying to compile my program using the command:
%g++ -lppl -lgmp -lgmpxx -o test PPL-test.cpp
I encountered an error message stating that libgmpxx can't be found anywhere. So I ran [...]
Dear Vaji,
I notice now that, depending on how you configured and installed gcc, your compilation command above misses a -L/usr/local/lib. Can you please try
g++ -lppl -lgmp -lgmpxx -L/usr/local/lib -o test PPL-test.cpp
and let me know what happens?
The output of
rpm -qa | fgrep gmp
would also be useful in case things still go wrong. All the best
Roberto

V Panumong wrote:
I'm very sorry for the late reply. After the meeting with Dr.Pat, I tried to install the PPL with different configuration - so I uninstalled the installed one out just in case it might trigger some conflicts, just to find out that the configure doesn't pass anymore.
It's the same problem that happened to me before, the compiler can't find GMP in the machine. I checked the file and knew that it was trying to link to gmpxx.h. The gmpxx.h is presented on my machine in the default installation directory, /usr/local/lib. I already put in line "LD_LIBRARY_PATH=/usr/local/lib" in my .bashrc and ran /sbin/ldconfig - n /usr/local/lib, but to no avail. I already tried ./configure --with-gmp-dir=/usr/local/lib. I was trying to fix that.
About your questions, I'm pretty sure that I already tried the command you suggested after the one without doesn't work. It compiled successful, but gave the same error on run-time.
The result from rpm -qa|fgrep gmp is;
gmp-devel-3.1.1-4 gmp-3.1.1-4
Does it suggest anything? It might be from when I installed RedHat or GMP, I can't be sure. Should I just erase them out? because I don't really want to find out later that the GMP doesn't work on my system anymore.
Dear Vaji,
the quick thing to try is erasing the gmp-devel package:
rpm -e gmp-devel
Don't worry: GMP will remain operational on your system. If you still have problems, please mail me the file config.log created by the configure command. All the best
Roberto
participants (2)
-
Roberto Bagnara
-
V Panumong