Bug 8259 - linker flag for libintl missing.
Summary: linker flag for libintl missing.
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.5.9
Hardware: x86 Solaris
: P5 normal
Target Milestone: ---
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
Depends on:
Reported: 2011-06-23 18:58 UTC by sean o'malley
Modified: 2011-06-24 12:49 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description sean o'malley 2011-06-23 18:58:01 UTC
utils/net fails to compile without the -lintl flag being added. 

./configure.developer --prefix=/usr/local/samba --with-pam --disable-avahi \
   --disable-dnssd --without-cluster-support --with-libiconv=/usr/local \
   --disable-merged-build --disable-netapi --without-ads --disable-krb5developer

I got something like (and it looks like make clean didn't quite clean the tree properly and it will appear again in Linking shared library bin/pam_winbind.so)

Linking utils/net
Undefined                       first referenced
 symbol                             in file
libintl_bindtextdomain              ../nsswitch/pam_winbind.o
libintl_dgettext                    ../nsswitch/pam_winbind.o

I added -lintl to the Makefile 
LDSHFLAGS=$(PICFLAG) -shared  -lintl ....

and it got rid of the error. 
(which I think might be the incorrect place, and I think libiconv depends on it.)

Im using gcc 3.4.6 on an older version of solaris 10..
Comment 1 sean o'malley 2011-06-23 21:10:16 UTC
I started over and reinstalled readline, and libiconv and libintl (from sunfreeware) Here is the actual error: 

Compiling ../libcli/samsync/decrypt.c
Compiling localedir.c
Linking bin/net
Undefined                       first referenced
 symbol                             in file
libintl_gettext                     utils/net.o
libintl_textdomain                  utils/net.o
libintl_bindtextdomain              utils/net.o
ld: fatal: Symbol referencing errors. No output written to bin/net
collect2: ld returned 1 exit status
make: *** [bin/net] Error 1
Comment 2 Björn Jacke 2011-06-23 22:18:32 UTC
I saw this once on a Solaris 10 machine. The problem there was that there was a libintl in /usr/lib/ and another different libintl in /usr/local/lib/. This is kind of insane IMHO but anyway it would be nice if it would be working somehow. Hoever I don't see a sane fix for that currently. I'd not like to add some hack which just makes this work "by accident".
Probably some sunfreeware packages introduce this library madness.
Comment 3 sean o'malley 2011-06-24 12:49:41 UTC
IIRC the reason why there -is- a libintl in both places is the libintl provided by Solaris in /usr/lib doesn't link correctly using gcc.