<div dir="ltr">have you looked at compile-time vs run-time path setting for ld (eg LD_LIBRARY_PATH, etc - I'm a little rusty in this respect, so please look in the man-page)?<div><br></div><div style>HTH</div><div style>
Michael</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 10:45 PM, Alexander Pyhalov <span dir="ltr"><<a href="mailto:alp@rsu.ru" target="_blank">alp@rsu.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
While testing 3801 bug fix I observed one interestin unrelated GCC effect.<br>
We have two gmp libraries:<br>
one from library/gmp<br>
<br>
$ ls -l /usr/lib/libgmp.so*<br>
lrwxrwxrwx 1 root root 15 Jun 13 23:28 /usr/lib/libgmp.so -> libgmp.so.3.5.0<br>
lrwxrwxrwx 1 root root 15 Jun 13 23:28 /usr/lib/libgmp.so.3 -> libgmp.so.3.5.0<br>
-rwxr-xr-x 1 root bin 294528 Jun 13 23:28 /usr/lib/libgmp.so.3.5.0<br>
<br>
and another coming with gcc<br>
$ ls -l /usr/gcc/4.7/lib/libgmp.so*<br>
lrwxrwxrwx 1 root root 16 Jun 13 23:39 /usr/gcc/4.7/lib/libgmp.so -> libgmp.so.10.0.5<br>
lrwxrwxrwx 1 root root 16 Jun 13 23:39 /usr/gcc/4.7/lib/libgmp.so.10 -> libgmp.so.10.0.5<br>
-r-xr-xr-x 1 root bin 577620 Jun 13 23:39 /usr/gcc/4.7/lib/libgmp.so.10.<u></u>0.5<br>
<br>
Now, when autoconf tries to find libgmp it tries to compile the next program:<br>
/* confdefs.h */<br>
#define PACKAGE_NAME "FULL-PACKAGE-NAME"<br>
#define PACKAGE_TARNAME "full-package-name"<br>
#define PACKAGE_VERSION "VERSION"<br>
#define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"<br>
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"<br>
#define PACKAGE_URL ""<br>
#define HAVE_LIBGMP 1<br>
#define HAVE_DECL_MPZ_POWM 1<br>
#define HAVE_DECL_MPZ_POWM_SEC 1<br>
/* end confdefs.h. */<br>
#include <ctype.h><br>
#include <stdlib.h><br>
#if ((' ' & 0x0FF) == 0x020)<br>
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')<br>
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))<br>
#else<br>
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') || ('j' <= (c) && (c) <= 'r') || ('s' <= (c) && (c) <= 'z'))<br>
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))<br>
#endif<br>
<br>
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))<br>
int<br>
main ()<br>
{<br>
int i;<br>
for (i = 0; i < 256; i++)<br>
if (XOR (islower (i), ISLOWER (i))<br>
|| toupper (i) != TOUPPER (i))<br>
return 2;<br>
return 0;<br>
}<br>
<br>
with: gcc -o gmp gmp.c -O2 -lgmp<br>
The command finishes succesfully but links gmp to libgmp.so.10:<br>
$ ldd gmp<br>
libgmp.so.10 => (file not found)<br>
libc.so.1 => /lib/libc.so.1<br>
libm.so.2 => /lib/libm.so.2<br>
So, the resulting binary cannot be run.<br>
<br>
So, I have an ethernal question: who is guilty and what to do?<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
System Administrator of Southern Federal University Computer Center<br>
<br>
<br>
______________________________<u></u>_________________<br>
oi-dev mailing list<br>
<a href="mailto:oi-dev@openindiana.org" target="_blank">oi-dev@openindiana.org</a><br>
<a href="http://openindiana.org/mailman/listinfo/oi-dev" target="_blank">http://openindiana.org/<u></u>mailman/listinfo/oi-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Michael Schuster<br><a href="http://recursiveramblings.wordpress.com/" target="_blank">http://recursiveramblings.wordpress.com/</a>
</div>