![]() |
|
|
#1 |
|
"Robert Gerbicz"
Oct 2005
Hungary
31518 Posts |
I've some problems: I've tried to install gmp-4.2.4 (currently the newest) under Ubuntu by (after download and unzip):
./configure make make check make install But on the last step at make install I've gotten an error message because the program wanted to install some file in another directory where I have only simple user rights and not root rights. So it hasn't installed gmp-4.2.4. Today an admin answered that "apt-cache show libgmp3c2" and he claims that this means that gmp-3 is already installed on this computer. My questions: 1. If there was really gmp-3 on this computer then haven't I overwritten by the semi reinstallation by gmp-4.2.4 ? 2. How can I compile gmp code under Ubuntu? Before installation I've tried gcc -o bernstein bernstein.c .libs/libgmp.a But Ubuntu hasn't found libgmp.a 3. Are the above installation steps good under Ubuntu?? If I will find an admin then I would try to install the newer gmp. I will use that computer at Tuesday morning. Last fiddled with by R. Gerbicz on 2009-03-13 at 14:48 |
|
|
|
|
|
#2 |
|
(loop (#_fork))
Feb 2006
Cambridge, England
2×7×461 Posts |
libgmp3c2 is a Debian package containing version 4.2.2 of gmp - the naming is, I agree, unclear.
If you're installing libgmp yourself, I strongly recommend doing ./configure --prefix=somewhere_under_your_home_directory at which point 'make install' installs libgmp in the place you requested, rather than running the risk of overwriting the system library. The Debian package puts gmp in /usr/lib/libgmp.a, so you can compile things that require gmp with just gcc -o bernstein bernstein.c -lgmp Last fiddled with by fivemack on 2009-03-13 at 15:14 |
|
|
|
|
|
#3 |
|
"Robert Gerbicz"
Oct 2005
Hungary
3·547 Posts |
Thanks for the answers! I will try it on Tuesday. Another thing:
which should I use under Ubuntu: #include "gmp.h" or #include <gmp.h> in the code? Last fiddled with by R. Gerbicz on 2009-03-13 at 15:44 |
|
|
|
|
|
#4 |
|
(loop (#_fork))
Feb 2006
Cambridge, England
2·7·461 Posts |
It ought to work with either; you should use <angle brackets> because gmp.h is a system include file rather than part of your own program.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Installing YAFU 1.34 on Linux | Romuald | YAFU | 12 | 2015-12-06 09:52 |
| Problems installing Prime95 on Mac OS X 10.4 | peterhowarth | Software | 4 | 2015-02-18 10:40 |
| Installing mprime on Linux | lidocorc | Software | 9 | 2009-11-06 20:59 |
| Ubuntu 9.04: Installing GMP-ECM; problems with GMP | Andi47 | Linux | 4 | 2009-10-01 06:31 |
| Installing GGNFS | Zeta-Flux | Factoring | 33 | 2005-06-10 21:19 |