Friday, June 10, 2005

LDfLags

> When I compile Samba for Solaris, I always have to link
> /usr/local/lib/libiconv.so.2 to /usr/lib/ first, otherwise I get a
> dreaded swat error in my web browser griping about not finding
> libiconv.so.2

Your environment requires LDFLAGS so that proper configure scripts can set
up the Makefiles correctly.

For libraries in /usr/local/lib only:

export LDFLAGS='-L/usr/local/lib -R/usr/local/lib'

Please read the man pages for ld and ld.so.1. The purpose of the -R
argument is well described there.

I just looked into this issue, with a different application. In
Solaris 9 and 10, and likely earlier Solaris versions, the iconv
functions are in libc. There's no need for a separate libiconv.

The configure script may be confused if you have libiconv installed.
I'd recommend removing it. You may also be able to tell configure
not to use it.

This is on Solaris 9:

$ nm /usr/lib/libc.so | grep iconv
[4769] | 274488| 56|FUNC |GLOB |0 |9 |_iconv
[3886] | 274400| 88|FUNC |GLOB |0 |9 |_iconv_close
[3517] | 272724| 180|FUNC |GLOB |0 |9 |_iconv_open
[4307] | 274488| 56|FUNC |WEAK |0 |9 |iconv
[1185] | 0| 0|FILE |LOCL |0 |ABS |iconv.c
[4672] | 274400| 88|FUNC |WEAK |0 |9 |iconv_close
[4959] | 272724| 180|FUNC |WEAK |0 |9 |iconv_open
[1193] | 273640| 200|FUNC |LOCL |0 |9 |iconv_open_all
[1197] | 274040| 360|FUNC |LOCL |0 |9 |iconv_open_private
[1194] | 273840| 200|FUNC |LOCL |0 |9 |iconv_search_alias

--

0 Comments:

Post a Comment

<< Home