Hello there, I downloaded today the new 3.0.0beta1 version. It worked almost from the first second, but then I found some "misterious" files. Littel bit of reading in the documentation and I found out that there is a new "character behaviour". So far so good - but: I wanted to try the new NT-group mapping feature. Unfortunatly it didn't work. Please see the output here. [root@scheme /usr/local/samba/bin]# ./net [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from UCS-2LE to CP850 not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from UTF8 to CP850 not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from ASCII to CP850 not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from CP850 to UCS-2LE not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from CP850 to UTF8 not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from CP850 to ASCII not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from CP850 to UTF8 not supported [2003/06/09 02:15:27, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/samba/lib/charset/CP850.so': Cannot open "/usr/local/samba/lib/charset/CP850.so" [2003/06/09 02:15:27, 0] lib/charcnv.c:init_iconv(110) Conversion from UTF8 to CP850 not supported There are no characterset libraries, also not in any older version I had installed. I hope you can provide some info, maybe it's too simple for me to see what really went wrong. Special thanks for advice, Martin
"Me too" (using "testparm" and also noticed in recent alphas). I'm on Solaris. Further, looking through the "Recent Builds" of the build farm, it seems that many (most?) non-Linux builds (Solaris, IRIX, FreeBSD, ...) exhibit a very similar (dare I say identical?) problem. If someone who understands charsets and codepages (I don't!) can come up with a patch, I would be very happy to test it. And if such a patch would have both structural and OS-specific components, I'd be happy to read a structural "skeleton" of it, and try to supply/adjust the Solaris "flesh".
It looks like you have either 'unix charset', 'dos charset' or 'display charset' set to CP850. Could you post the output of 'testparm -v | grep CP850' ?
Output of 'testparm | grep CP850': <empty> (apart from the several STDERR reports in the original message) Output of 'testparm -v | grep CP850': dos charset = CP850 My smb.conf file has no reference at all to anything vaguely 850-ish or charset-ish. That was a useful hint, Jelmer. Thanks. A recursive "grep -r 850 ." through the source code included: param/loadparm.c: string_set(&Globals.dos_charset, "CP850") I guess that's the trigger. Does that help?
I've looked a little deeper. I think that the test in "configure.in" may be insufficient (in addition to this param/loadparm.c CP850 problem). Perhaps the "configure" test should be more generous, trying a range of possible charsets, including one (or more) which would make a suitable default for the param/loadparm.c initialisation. Because this affects most of the OSes in the build farm (except Linux) and because different OSes might have different charsets, I've sent a message to samba-technical for wider discussion.
This bug should be in Extended Characters section where all problems with charsets appear. I think the real solution for it is to have Samba charset module for CP850 so that broken (in iconv(3) sense) or non-iconv systems will be usable in default configuration.
Workaround on Solaris. In smb.conf: dos charset = ASCII display charset = ASCII
OK, part of the problem is that the iconv stuff was very Linux centric. FreeBSD has several versions of iconv, GNU libiconv and iconv-2.0.3 or something. The latter falls under a BSD licence. In anycase, they install in places like /usr/local and the libraries are called libgiconv.{a,so} and libbiconv.{a,so}. Also, configure[.in] had bugs in it where it would not step through all the locations where it was possible to find iconv. I think I have fixed up all the problems, but the last one might be trying to check if it has native iconv. It does a test looking for a translation from ASCII to UCS2-LE, neither of which libbiconv supports without modifying the charset.aliases file. Also, I haven't tested with GNU libiconv, but I guess I could later in the week on both FreeBSD and Solaris ... As a result of not setting HAVE_NATIVE_ICONV or whatever, the iconv code in Samba tries to load the files shown in the messages above which might not exist.
Can the original bug submitter tell us: 1. What version of iconv is installed? 2. What configure said about iconv ... show us what config.log says about it. Search for "checking for working iconv" ... Also, have you tried with a more recent version from CVS? I have fixed a few problems there ...
I'm not the original poster, but I do have the same problem on Solaris 9 and supply my answers to the questions. 1) What version of iconv is installed? A: 2 versions. One in /usr/bin that comes with SUNWcsu package. Here is it's info: bash-2.05# pkginfo -l SUNWcsu PKGINST: SUNWcsu NAME: Core Solaris, (Usr) CATEGORY: system ARCH: sparc VERSION: 11.9.0,REV=2002.04.06.15.27 BASEDIR: / VENDOR: Sun Microsystems, Inc. DESC: core software for a specific instruction-set architecture PSTAMP: leo20030106171854 INSTDATE: Jun 19 2003 15:07 HOTLINE: Please contact your local service provider STATUS: completely installed FILES: 2346 installed pathnames 63 shared pathnames 297 linked files 121 directories 462 executables 31 setuid/setgid executables 25382 blocks used (approx) The other version is the GNU version from www.sunfreeware.com: bash-2.05# pkginfo -l SMCliconv PKGINST: SMCliconv NAME: libiconv CATEGORY: application ARCH: sparc VERSION: 1.8 BASEDIR: /usr/local VENDOR: Bruno Haible PSTAMP: Steve Christensen INSTDATE: Aug 06 2003 14:37 EMAIL: steve@smc.vnet.net STATUS: completely installed FILES: 44 installed pathnames 7 shared pathnames 8 directories 3 executables 4994 blocks used (approx) 2) This is what I found in config.log about iconv: configure:18902: checking for iconv in /usr configure:18931: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib conftest.c -l biconv >&5 configure:18911:20: biconv.h: No such file or directory configure: In function `main': configure:18921: `iconv_t' undeclared (first use in this function) configure:18921: (Each undeclared identifier is reported only once configure:18921: for each function it appears in.) configure:18921: syntax error before "cd" configure:18922: `cd' undeclared (first use in this function) configure:18934: $? = 1 configure: failed program was: #line 18909 "configure" #include "confdefs.h" #include <stdlib.h> #include <biconv.h> #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } configure:18976: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib conftest.c >& 5 configure:18956:20: giconv.h: No such file or directory configure: In function `main': configure:18966: `iconv_t' undeclared (first use in this function) configure:18966: (Each undeclared identifier is reported only once configure:18966: for each function it appears in.) configure:18966: syntax error before "cd" configure:18967: `cd' undeclared (first use in this function) configure:18979: $? = 1 configure: failed program was: #line 18954 "configure" #include "confdefs.h" #include <stdlib.h> #include <giconv.h> #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } configure:19019: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib conftest.c >& 5 Undefined first referenced symbol in file libiconv /var/tmp//ccOew4Pn.o libiconv_open /var/tmp//ccOew4Pn.o libiconv_close /var/tmp//ccOew4Pn.o ld: fatal: Symbol referencing errors. No output written to conftest collect2: ld returned 1 exit status configure:19022: $? = 1 configure: failed program was: #line 18997 "configure" #include "confdefs.h" #include <stdlib.h> #include <iconv.h> #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } configure:19063: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib conftest.c -l giconv >&5 configure:19043:20: giconv.h: No such file or directory configure: In function `main': configure:19053: `iconv_t' undeclared (first use in this function) configure:19053: (Each undeclared identifier is reported only once configure:19053: for each function it appears in.) configure:19053: syntax error before "cd" configure:19054: `cd' undeclared (first use in this function) configure:19066: $? = 1 configure: failed program was: #line 19041 "configure" #include "confdefs.h" #include <stdlib.h> #include <giconv.h> #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } configure:19110: gcc -o conftest -g -O2 -I/usr/include -L/usr/lib conftest.c -l iconv >&5 configure:19113: $? = 0 configure:19116: test -s conftest configure:19119: $? = 0 configure:19160: result: yes configure:19210: checking for working iconv configure:19232: gcc -o conftest -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS =64 -L/usr/local/lib conftest.c -lsec -lgen -lresolv -lsocket -lnsl -ldl -lico nv -L/usr/lib >&5 configure:19235: $? = 0 configure:19237: ./conftest configure:19240: $? = 0 configure:19253: result: yes
OK, so it looks like things work now for Solaris, if I am interpreting that last comment OK.
AB and I have discussed this some more. We think that we need to: 1. Fix the iconv detection and look for more than just a translation from ASCII to UCS2-LE. We should look for USASCII to UCS2-LE and CP850 to UCS2-LE as well, and declare that we have a working iconv if any of these apply. Fixing the iconv detection also involves checking for a working iconv correctly, so hoist the code that checks for a working iconv into the loop that checks where iconv can be found. 2. Actually add a CP850.so module for those cases where iconv is truly not available.
OK, I have committed code that properly checks for iconv and a working iconv ... Now to the next part ...
Fixed in SAMBA_3_0 CVS by introducing CP850 Samba charset module and build it shared by default.
originally reported against 3.0.0beta1. CLeaning out non-production release versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
database cleanup