ports/60254: net/samba-devel port with libiconv trouble

Andrew Khlebutin andreyh at perm.ru
Mon Dec 15 12:20:21 UTC 2003


>Number:         60254
>Category:       ports
>Synopsis:       net/samba-devel port with libiconv trouble
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 15 04:20:15 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Khlebutin
>Release:        FreeBSD 5.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD hm.pstu.ac.ru 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #0: Tue Oct 28 21:07:27 YEKT 2003 root at hm.pstu.ac.ru:/usr/obj/usr/src/sys/hm i386
iconv-2.0_3, libiconv-1.9.1_3

	
>Description:
	
I tried to compile samba with libiconv and found bug with detecting which
conversion library to use.  There are both converters installed at my PC -
converters/libiconv and converters/iconv. In detection process configure
found only first conversion  library (iconv) which doesn't have suitable
conversion modules. I think configure should search for other conversion
libraries - but it really did not. It continued with messages "Sufficient
support for iconv function was not found". To fix this bug aclocal.m4
needs to be changed, there should be added "rjs_CHARSET inside jm_ICONV" call.

>How-To-Repeat:
	
cd /usr/ports/converters/iconv && make install clean
cd /usr/ports/net/samba-devel && make WITHOUT_CUPS=yes WITH_LIBICONV=yes

with installed converters/iconv:
...skip...
checking for iconv in /usr/local... yes
checking can we convert from CP850 to UCS2-LE?... no
checking can we convert from IBM850 to UCS2-LE?... no
checking can we convert from ASCII to UCS2-LE?... no
checking can we convert from 646 to UCS2-LE?... no
checking can we convert from UTF-8 to UCS2-LE?... no
checking can we convert from UTF8 to UCS2-LE?... no
configure: WARNING: Sufficient support for iconv function was not found.
    Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset comp atibility!
...skip...

without converters/iconv:
...skip...
checking for iconv in /usr/local... yes
checking can we convert from CP850 to UCS2-LE?... CP850
checking can we convert from ASCII to UCS2-LE?... ASCII
checking can we convert from UTF-8 to UCS2-LE?... UTF-8
...skip...

Full configure logs can be found at http://hydra.pstu.ru/samba/with_iconv.tar.bz2
& http://hydra.pstu.ru/samba/without_iconv.tar.bz2.

Some cosmetic bugs in samba-devel port's Makefile was found too:
1. Samba's   libs   are   installed  to  /usr/local/etc  because  of
--libdir=${SAMBA_CONFDIR}.
2. Without  --with-libiconv=/usr/local  in .if defined(WITH_LIBICONV)
section configure didn't find libiconv.
3. It's much more convinient to write logs to separate dir
/var/log/samba than to /var/log because files log.<machine_name> thrash
shared log catalogue extemely.

>Fix:

Deinstall converters/iconv, install samba-devel, reinstall converters/iconv ;)

And also do 

--- Makefile.orig       Tue Nov 25 21:12:19 2003
+++ Makefile    Mon Dec 15 00:51:45 2003
@@ -33,7 +33,7 @@
 # directories
 VARDIR=                /var
 SAMBA_SPOOL=   ${VARDIR}/spool/samba
-SAMBA_LOGDIR=  ${VARDIR}/log
+SAMBA_LOGDIR=  ${VARDIR}/log/samba
 SAMBA_PRIVATE= ${PREFIX}/private
 SAMBA_CONFDIR= ${PREFIX}/etc
 # sample files
@@ -44,12 +44,12 @@
 NO_LATEST_LINK=        yes
 USE_AUTOCONF=  yes
 WANT_AUTOCONF_VER=     253
-CONFIGURE_ARGS=        --libdir=${SAMBA_CONFDIR} \
+CONFIGURE_ARGS=        --libdir=${PREFIX}/lib --sysconfdir=${SAMBA_CONFDIR} \
                --localstatedir=${VARDIR} --with-swatdir=${PREFIX}/share/swat \
                --with-sambabook=${PREFIX}/share/swat/using_samba \
                --with-lockdir=${VARDIR}/lock --with-privatedir=${SAMBA_PRIVATE} \
-               --with-piddir=${VARDIR}/run --with-logfilebase=${VARDIR}/log
+               --with-piddir=${VARDIR}/run --with-logfilebase=${VARDIR}/log/samba
 
 .include <bsd.port.pre.mk>
 
@@ -89,7 +89,7 @@
 
 .if defined(WITH_LIBICONV)
 LIB_DEPENDS+=          iconv.3:${PORTSDIR}/converters/libiconv
-CONFIGURE_ARGS+=       --with-libiconv
+CONFIGURE_ARGS+=       --with-libiconv=/usr/local
 .endif
 
 WRKSRC=                ${WRKDIR}/${DISTNAME}/source
@@ -132,6 +132,7 @@
        ${CHMOD} 500 ${SAMBA_PRIVATE}
        ${CHOWN} root:wheel ${PREFIX}/bin/smbpasswd
        ${CHMOD} 111 ${PREFIX}/bin/smbpasswd
+       ${MKDIR} ${VARDIR}/log/samba
 .if defined(PACKAGE_BUILDING)
        ${ECHO_CMD} "private/smbpasswd" >> ${TMPPLIST}
        ${ECHO_CMD} "@dirrm private" >> ${TMPPLIST}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list