GMP on MacOS

delta trinity deltatrinity@hotmail.com
Fri, 06 Dec 2002 14:34:29 -0500


It is possible that the compiler doesn't recognize symbolic links.

While building for native Windows platforms, using MinGW, I had similar 
problem.

To cure it, I had to modify the configure script to force 'hard' copy and 
not make symbolic link.

Toward the end of the 'configure' shell script, there's something like:

...
  # Make a symlink if possible; otherwise try a hard link.
  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
    ln $srcdir/$ac_source $ac_dest ||
    { { echo "$as_me:22626: error: cannot link $ac_dest to 
$srcdir/$ac_source" >&5
...

what I did is comment the second line, like this:

...
  # Make a symlink if possible; otherwise try a hard link.
#  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
    ln $srcdir/$ac_source $ac_dest ||
    { { echo "$as_me:22626: error: cannot link $ac_dest to 
$srcdir/$ac_source" >&5
...

Note that this problem was related to the version of GCC that I were using 
(that was part of the version of MinGW I had).  Well, it doesn't hurt to at 
least try it ;-)

>From: Minh Nguyen <md6nguyen@yahoo.com>
>To: gmp-discuss@swox.com
>Subject: GMP on MacOS
>Date: Fri, 6 Dec 2002 11:00:05 -0800 (PST)
>
>
>Hi all, I'm building GMP shared library on MacOS. Everything worked fine. 
>Here is the library listing
>
>#### SNIP ####
>
>rhea 11% ls -l $HOME/gmp-4.1/.libs
>
>-rwxr-xr-x 1 mnguyen maple 1372168 Dec 5 14:54 libgmp.3.3.0.dylib*
>
>lrwxr-xr-x 1 mnguyen maple 18 Dec 5 14:54 libgmp.3.dylib@ -> 
>libgmp.3.3.0.dylib
>
>lrwxr-xr-x 1 mnguyen maple 18 Dec 5 14:54 libgmp.dylib@ -> 
>libgmp.3.3.0.dylib
>
>#### SNIP ####
>
>I then set the Dynamic Library Path to include the GMP path
>
>rhea 12 % set DYLD_LIBRARY_PATH="$HOME/gmp-4.1/.libs"
>
>Next, I compile a test program
>
>rhea 14 % gcc -g -I $HOME/gmp-4.1/ -o add_test add_test.c 
>-L$HOME/gmp-4.1/.libs -lgmp
>
>The test program was compiled fine. However, when I tried to run the 
>program I got this error.
>
>#### SNIP ####
>
>rhea 15 % ./add_test 100
>
>dyld: ./add_test can't open library: /usr/local/lib/libgmp.3.dylib (No such 
>file or directory, errno = 2)
>
>#### SNIP ####
>
>It looks like that the path "/usr/local/lib/libgmp.3.dylib" was embedded in 
>the shared library libgmp.3.3.0.dylib. But why the error message? After 
>all, libgmp.3.dylib is just a symbolic link to libgmp.3.3.0.dylib right? So 
>why bother to find this link when the shared library has been found. Anyone 
>knows how to get around this?
>
>Thanks,
>
>Minh
>
>
>
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail