I am trying to set up the gnu multiple precision arithmetic library for some c++ programming I have to do.
I am using a system with mac osx 10.6.3 and do NOT have root user access.
I'm trying to use gmp 5.0.1.
Since I don't have root user access, I had to install to a different directory
Thus I used
I also ran make check and it did not report any errors.
I then went to run a test program
Compiled with no errors using
and tried to run with
The error I get is
The gmptest.cxx test program is the following
It's just some program I found that should print out a number.. Not important what it does at this point, I just want it to run.
I understand the error is saying that it cant find the libgmpxx.4.dylib file in /usr/local/lib which makes sense because it isn't there. But I thought the -L and -I settings I put in the compiler options tell it to look there for the libraries, and that library DOES exist there.
What am I doing wrong? Did I miss something?
Edit:
I also checked otool -L gmptest and it shows libgmpxx.4.dylib and libgmp.10.dylib linked from /usr/local/lib . They do NOT exist in this directory, they exist in /Users/****/gmp/lib where I thought I had told it to look.
Last edited by pludi; 06-29-2010 at 03:41 AM..
Reason: code tags, please...
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
I have no experience with gmp, and little with c++. However, I had been looking at ld today, and thought I would try a few things.
Briefly, I downloaded gmp 5.x from gnu.org, compiled it with your .configure line (into ~/gmp), ran make, make check, make install. Then I created a script, s1, to try the test code compile, link, execute. The (lengthy) results are below in 3 sections: my environment, the script, and the "link trace" compile, link, execute.
At first I thought the link had included everything in libgmp.a, but there are 450+ entries (according to nm | grep T | wc, and ar t | wc), so I concluded it was a selective link.
I am not using OS X, but I'd guess it's worth a try to do it this way if you cannot install into /lib, /usr/lib.
Hi All,
My application main engine will use a shared library where we do many operation. We are trying to implement the linear algebra operation on the shared library for that I need to link my shared library to the lapack library in /usr/lib.
Below is my make file. Can you please let me... (2 Replies)
I want to install a recent version of gmp on Fedora. Tried to use yum
# yum list | grep gmp
gmp.i686 4.3.1-6.fc13 @fedora
gmp.x86_64 4.3.1-6.fc13 @fedora
gmp-devel.x86_64 ... (3 Replies)
I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message.
add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a
add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Hello,
./configure script fails to configure libsf. Please check the following last few lines of configure script error.
checking for db1/db.h... no
checking for db.h... yes
checking for dbopen in -ldb1... no
configure: error: No libdb? No libsf.
But find command shows the following; ... (4 Replies)
I'm trying to get Valgrind to work with an openmpi application in OS X. However I want to hardcode the path to a shared library called libmpiwrap-amd64-darwin.so into my application so that it is available at runtime. In Linux this is relatively simple, I would just add the option... (0 Replies)
Hi:
I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library)
Thanks. (1 Reply)
Hi,
I have one library(libfoo.a) that is folder /home/xyz and my c program is in /home/xyz/cprog. Whenever I issue cc command
cc -o test test.c -lfoo , i get the error /usr/bin/ld: cannot find -lfoo.
echo $PATH has already listing of /home/xyz variable, even LIBPATH also has same entry... (0 Replies)
Getting the following error ,
ld: /opt/syncsort39/lib/libsyncsort.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.
Is there any difference in the ld options in opt file while linking a 64 bit shared library ? Or is the problem because we are trying to link both 32 bit and 64... (3 Replies)
Hello all,
I'm having trouble building the GNU Multi Precision (GMP 4.1.3) on the HP Intel Itanium 2 HP-UX 11i
I'm hoping someone out there has had some experience building GMP on this platform. After running the ./configure and doing a make I get an error saying:
`.rodata` is not a section
... (3 Replies)
Hi
I'm getting
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
When I run
ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o
after running
gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c
I'm... (6 Replies)