[Samba] libiconv problems

Håkan Stefansson ste at algonet.se
Fri Aug 6 21:32:04 GMT 2004


Anthony Hess wrote:

 > Hello all,
 >
 > OK - Im kind of stumped on this one and google wasnt much help.  Its
 > probably something stupid and obvious, but I could use another pair of
 > eyeballs.
 >
 > When compiling Samba 3.0.5 on Solaris 9 (using the Sun directory server
 > 5.1 as the LDAP, but compiled against the OpenLDAP libraries in
 > /usr/local/lib) I got the following error during the make:
 >
 > lib/iconv.c: In function `sys_iconv':
 > lib/iconv.c:131: warning: passing arg 2 of `libiconv' from incompatible
 > pointer type


This is not an error, just a warning, and I don't think it is related to 
your problem. Of course, I may be wrong abuot that.

 >
 > And then when I try to run any of the samba commands after installation
 > (like net, testparm, smbstatus) I get a bunch of character conversion
 > errors followed by the output (and samba appears to be working - although
 > I havent gotten to the point where I add all of the Samba 3 user account
 > information in to LDAP so something odd might happen if I connected to
 > it).
 >
 > Here are the errors:
 >
 > init_iconv: Conversion from UTF-8 to UCS-2LE not supported
 > init_iconv: Attempting to replace with conversion from ASCII to UCS-2LE
 >
 > (at the end of the email Ill put the whole output)
 >
 > So the obvious culprit is some kind of libiconv problem.  The 
original was
 > installed as a package off of Sun freeware, but I later upgraded to a
 > version I compiled (listing of libiconv libraries included at the end).
 > Am I just doing something really wrong, or is this a bug of some type?


It's rather tricky to install libiconv on Solaris. The problem is that 
there are some mutual dependencies between libiconv and GNU gettext. 
However, I'm not sure you need this if you are just using english. I 
think samba comes with some default library. Perhaps you could find some 
info about that in the archives.

I have never managed to get the libiconv package from sunfreeware.com to 
work with samba, however, the following worked for me (please read the 
documentation that comes with libiconv and gettext as I probably have 
forgotten some details):

1) Compile and install libiconv from source.

2) Compile and install GNU gettext from source.

3) Remove the libiconv installation (make distclean)

4) Recompile and reinstall libiconv.

5) Yoy will need to tell the samba configure script where you installed 
  the libiconv library and put that directory into your LD_LIBRARY_PATH 
Solaris has some iconv support of its own that you should probably not 
overwrite.

 >
 > Also, if anyone has a step by step cookbook for doing an LDAP--Samba-PDC
 > on Solaris 9 it would probably save me some time (most documentation that
 > I see is for Samba and OpenLDAP on Linux - which works, but obviously I
 > dont have to think as much if its written for what I have :) ).


Sorry, I can't help you with that. Someone else?

Håkan Stefansson

 >
 > Thanks in advance for any help,
 >
 > --
 > Anthony Hess
 > Support Systems Analyst, Sr.
 > CoEM Computer Services
 >
 > Full error output:
 >
 > # /usr/local/samba/bin/testparm
 > Load smb config files from /usr/local/samba/lib/smb.conf
 > Processing section "[homes]"
 > init_iconv: Conversion from UCS-2LE to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from UCS-2LE to ASCII
 > Module '/usr/local/samba/lib/charset/CP850.so' loaded
 > init_iconv: Conversion from UTF-8 to UCS-2LE not supported
 > init_iconv: Attempting to replace with conversion from ASCII to UCS-2LE
 > init_iconv: Conversion from UTF-8 to 646 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UTF-8 to CP850 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UTF-8 to UTF8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from 646 to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from CP850 to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UTF8 to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UCS-2LE to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from UCS-2LE to ASCII
 > init_iconv: Conversion from UTF-8 to UCS-2LE not supported
 > init_iconv: Attempting to replace with conversion from ASCII to UCS-2LE
 > init_iconv: Conversion from UTF-8 to 646 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UTF-8 to CP850 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UTF-8 to UTF8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from 646 to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from CP850 to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > init_iconv: Conversion from UTF8 to UTF-8 not supported
 > init_iconv: Attempting to replace with conversion from ASCII to ASCII
 > Loaded services file OK.
 > Server role: ROLE_DOMAIN_PDC
 > Press enter to see a dump of your service definitions
 >
 > And here is the listing of the libiconv libraries in /usr/local/lib:
 >
 > -rw-r--r--   1 root     other        780 Aug  4 14:56 libiconv.la
 > lrwxrwxrwx   1 root     other         17 Aug  4 14:56 libiconv.so ->
 > libiconv.so.2.2.0
 > lrwxrwxrwx   1 root     other         17 Aug  4 14:56 libiconv.so.2 ->
 > libiconv.so.2.2.0
 > -rwxr-xr-x   1 bin      bin      1139112 Jan 26  2003 libiconv.so.2.1.0
 > -rwxr-xr-x   1 root     other    1101340 Aug  4 14:56 libiconv.so.2.2.0
 > -rw-r--r--   1 root     other    1098496 Aug  4 14:56 libiconv_plug.so






More information about the samba mailing list