I build Samba3.0.0beta2 from FreeBSD ports collection. After building I didn't found any charset modules in /usr/local/etc/charsets.Messages in logs looks like [2003/07/21 14:17:57, 0] lib/module.c:smb_load_module(40) Error loading module '/usr/local/etc/charset/KOI8-R.so': Cannot open "/usr/local/etc/charset/KOI8-R.so" I didn't found any sources for this modules in tar.bz2 file. How I can set unix charset for KOI8-R and dos charset for CP866?
charset conversion is done via iconv. This should be part of your glibc or if you don't use glibc - libiconv. The modules are not part of samba.
I rebuild Samba with libiconv, but when I try unix charset = KOI8-R display charset = KOI8-R dos charset = 866 smbd and nmbd was core dumped after restarting samba
set dos charset = CP866 in Samba 3.0 all charset names should be the same as charset names in underlying iconv library.
Of course, dos charset = CP866 Sorry, I made the mistake when wrote the comment
Can you show us result of configure script run? How it detects your iconv library?
I found very interesting results - configure script didn't detect iconv! in FreeBSD4.8 I have no giconv.h but have iconv.h in /usr/local/include libiconv package installed too configure:18904: checking for iconv in /usr configure:18931: cc -o conftest -O -pipe -I/usr/local/include -I/usr/include -L/usr/lib conftest.c >&5 configure:18912: giconv.h: No such file or directory configure: In function `main': configure:18922: syntax error before `cd' configure:18923: `cd' undeclared (first use in this function) configure:18923: (Each undeclared identifier is reported only once configure:18923: for each function it appears in.) configure:18934: $? = 1 configure: failed program was: #line 18910 "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:18973: cc -o conftest -O -pipe -I/usr/local/include -I/usr/include -L/usr/lib conftest.c >&5 /tmp/ccLBfFr8.o: In function `main': /tmp/ccLBfFr8.o(.text+0x15): undefined reference to `libiconv_open' /tmp/ccLBfFr8.o(.text+0x28): undefined reference to `libiconv' /tmp/ccLBfFr8.o(.text+0x34): undefined reference to `libiconv_close' configure:18976: $? = 1 configure: failed program was: #line 18952 "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:19016: cc -o conftest -O -pipe -I/usr/local/include -I/usr/include -L/usr/lib conftest.c -lgiconv >&5 configure:18997: giconv.h: No such file or directory configure: In function `main': configure:19007: syntax error before `cd' configure:19008: `cd' undeclared (first use in this function) configure:19008: (Each undeclared identifier is reported only once configure:19008: for each function it appears in.) configure:19019: $? = 1 configure: failed program was: #line 18995 "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:19062: cc -o conftest -O -pipe -I/usr/local/include -I/usr/include -L/usr/lib conftest.c -liconv >&5 /usr/libexec/elf/ld: cannot find -liconv configure:19065: $? = 1 configure: failed program was: #line 19041 "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:19106: result: no configure:19144: checking for working iconv configure:19166: cc -o conftest -O -pipe -I/usr/local/include -L/usr/local/lib conftest.c >&5 /tmp/ccj09yVl.o: In function `main': /tmp/ccj09yVl.o(.text+0x14): undefined reference to `libiconv_open' configure:19169: $? = 1 configure: program exited with status 1 configure: failed program was: #line 19154 "configure" #include "confdefs.h" #include <iconv.h> main() { iconv_t cd = iconv_open("ASCII", "UCS-2LE"); if (cd == 0 || cd == (iconv_t)-1) return -1; return 0; } configure:19187: result: no configure:19198: WARNING: Sufficient support for iconv function was not found. Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility! configure:19205: checking for Linux kernel oplocks configure:19230: cc -o conftest -O -pipe -I/usr/local/include -L/usr/local/lib conftest.c >&5 configure:19233: $? = 0 configure:19235: ./conftest configure:19238: $? = 1 configure: program exited with status 1 configure: failed program was: #line 19215 "configure" #include "confdefs.h" and cache variables jm_cv_giconv=no jm_cv_lib_iconv=no jm_cv_func_iconv=no ------------------------cut-here----------------------------------
May be, it is not a Samba bug, but FreeBSD port bug I edit Makefile in samba-devel port (/usr/ports/net/samba-devel/Makefile) to define the path to libiconv libraries and rebuild it again configure script found my libiconv libraries and I have no more messages about missing modules. After that my charset options work!
Pavel, can you try using the --with-libiconv option to ./configure without having to change the Makefile? I.e ./configure --with-libiconv=/usr/local/iconv or wherever your iconv library is.
I don't change Makefile in Samba sources - I edit the Makefile in FreeBSD port. This file required for applying additional patches from FreeBSD comitter team, building package and it registration in system. The BASEDIR parameter for libiconv was not defined in this Makefile and it's default value 'auto' doesn't work properly. As Tim Potter wrote above, I define this parameter in port Makefile (a part of this file shown below) .if defined(WITH_LIBICONV) LIB_DEPENDS+=iconv.3:${PORTSDIR}/converters/libiconv CONFIGURE_ARGS+=--with-libiconv=${PREFIX} #My changes above ^^^^^^^^^^^^^^ #CONFIGURE_ARGS+=--with-libiconv # In original Makefile path to libiconv not defined .endif and it equal to ./configure --with-libiconv=BASEDIR, where BASEDIR=PREFIX=/usr/local I think that is all FreeBSD port maintainer bug, and you can change resolution to FIXED
Changed resolution to fixed by initiator's request as this appeared to be a bug in FreeBSD ports collection for Samba port makefile.
originally reported against 3.0.0beta2. CLeaning out non-production release versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
database cleanup