Bug 3568 - Local charset reported as missing
Local charset reported as missing
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.21c
All AIX
: P3 minor
: none
Assigned To: William Jojo
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-01 08:15 UTC by David Shapiro
Modified: 2006-03-02 07:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Shapiro 2006-03-01 08:15:08 UTC
Log level 10 shows the following error now:
Probing module 'ISO8859-1': Trying to load from /usr/local/samba/lib/charset/ISO8859-1.so
Error loading module '/usr/local/samba/lib/charset/ISO8859-1.so': No such file or directory

I buildt with libiconv.a at level 1.91 on aix 5.2.0.7 server.

Build with:

#!/bin/ksh -x

export LIBPATH=/usr/lib:/usr/local/lib:/opt/freeware/lib

env "CC=gcc" \
CFLAGS="-DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR -DPAM_EXTERN=extern -D_LINUX_SOURCE_COMPAT" \
CPPFLAGS="-I/usr/local/bdb/include -I/usr/local/ssl/include -I /usr/local/include -I/usr/include" \
LDFLAGS="-L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib -L/usr/local/ssl/lib -L/usr/local/openldap/lib -L/usr/lib -L/usr/local/lib" \
../configure --prefix=/usr/local/samba --with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap --with-pam
 --with-krb5=/usr/local/heimdal-krb5 --with-winbind --with-acl-support --with-utmp --with-quotas --with-sendfile-support --with-aio-support --enable-shared=yes --disable-static --with-libiconv=/usr/local

/usr/local/bin/gmake
/usr/local/bin/gmake install

for i in WINBIND pam_winbind.so; do
        if [ -f /usr/lib/security/$i ]; then
                mv /usr/lib/security/$i /usr/lib/security/$i.old
                chmod 555 nsswitch/$i
                cp nsswitch/$i /usr/lib/security
                rm /usr/lib/security/$i.old
        else
                cp nsswitch/$i /usr/lib/security
        fi
done
Comment 1 Gerald (Jerry) Carter 2006-03-01 08:37:47 UTC
Bill,  Could you review these when you get a chance?  Thanks.
Comment 2 David Shapiro 2006-03-01 08:55:11 UTC
[root@svcanimp][/tmp/samba/samba-3.0.21c/source/build] > grep -i iconv config.log
  $ ../configure --prefix=/usr/local/samba --with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap --with-pam --with-krb5=/usr/local/heimdal-krb5 --with-winbind --with-acl-support --with-utmp --with-quotas --with-sendfile-support --with-aio-support --enable-shared=yes --disable-static --with-libiconv=/usr/local
configure:28396: checking for iconv in /usr/local/lib
conftest.c:243:20: error: giconv.h: No such file or directory
conftest.c:247: error: 'iconv_t' undeclared (first use in this function)
| #include <giconv.h>
| iconv_t cd = iconv_open("","");
|          iconv(cd,NULL,NULL,NULL,NULL);
|          iconv_close(cd);
ld: 0711-317 ERROR: Undefined symbol: .libiconv_open
ld: 0711-317 ERROR: Undefined symbol: .libiconv
ld: 0711-317 ERROR: Undefined symbol: .libiconv_close
| #include <iconv.h>
| iconv_t cd = iconv_open("","");
|            iconv(cd,NULL,NULL,NULL,NULL);
|            iconv_close(cd);
configure:28530: gcc -o conftest -DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR -DPAM_EXTERN=extern -D_LINUX_SOURCE_COMPAT -D_SAMBA_BUILD_ -I/usr/local/bdb/include -I/usr/local/ssl/include -I/usr/local/include -I/usr/include -I/usr/local/include -L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib -L/usr/local/ssl/lib -L/usr/local/openldap/lib -L/usr/lib -L/usr/local/lib -L/usr/local/lib conftest.c  -lgiconv >&5
conftest.c:243:20: error: giconv.h: No such file or directory
conftest.c:247: error: 'iconv_t' undeclared (first use in this function)
| #include <giconv.h>
| iconv_t cd = iconv_open("","");
|                iconv(cd,NULL,NULL,NULL,NULL);
|                iconv_close(cd);
configure:28588: gcc -o conftest -DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR -DPAM_EXTERN=extern -D_LINUX_SOURCE_COMPAT -D_SAMBA_BUILD_ -I/usr/local/bdb/include -I/usr/local/ssl/include -I/usr/local/include -I/usr/include -I/usr/local/include -L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib -L/usr/local/ssl/lib -L/usr/local/openldap/lib -L/usr/lib -L/usr/local/lib -L/usr/local/lib conftest.c  -liconv >&5
ld: 0711-317 ERROR: Undefined symbol: .libiconv_open
ld: 0711-317 ERROR: Undefined symbol: .libiconv
ld: 0711-317 ERROR: Undefined symbol: .libiconv_close
| #include <iconv.h>
| iconv_t cd = iconv_open("","");
|              iconv(cd,NULL,NULL,NULL,NULL);
|              iconv_close(cd);
configure:28931: WARNING: Sufficient support for iconv function was not found.
    Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!
jm_cv_func_iconv=no
jm_cv_giconv=no
jm_cv_lib_iconv=''
[root@svcanimp][/tmp/samba/samba-3.0.21c/source/build] > find / -name giconv.h -ls

Nothing found...

 
Comment 3 David Shapiro 2006-03-01 14:45:14 UTC
Note that I still get the whine about needing libiconv (I am using libiconv 1.9x ) even though I see the path to libiconv.a is specified correctly:

 #define HAVE_UT_UT_TIME 1
| #define HAVE_UT_UT_TYPE 1
| #define HAVE_UT_UT_PID 1
| #define HAVE_UT_UT_EXIT 1
| #define PUTUTLINE_RETURNS_UTMP 1
| #define HAVE_ICONV 1
| /* end confdefs.h.  */
|
| #include <iconv.h>
| main(){
|     iconv_t cd = iconv_open("UTF8", "UCS-2LE");
|     if (cd == 0 || cd == (iconv_t)-1) {
|       return -1;
|     }
|     return 0;
| }
|
configure:28853: result: no
configure:28931: WARNING: Sufficient support for iconv function was not found.
    Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!
configure:28953: checking for Linux kernel oplocks
configure:28981: gcc -o conftest -DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR -DPAM_EXTERN=extern -D_LINUX_SOURCE_COMPAT -D_SAMBA_BUILD_ -
I/usr/local/bdb/include -I/usr/local/ssl/include -I/usr/local/include -I/usr/local -L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib -L/usr/local
/ssl/lib -L/usr/local/openldap/lib -L/usr/local/lib /usr/local/lib/libiconv.a /usr/local/lib/libintl.a -liconv -L/usr/lib -lc conftest.c  >&5
configure:28984: $? = 0
configure:28986: ./conftest
configure:28989: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
|
Comment 4 David Shapiro 2006-03-01 14:46:55 UTC
Note I modified LDFLAGS to include /usr/local/lib/libiconv.a and -lc and -liconv and it still does not find what it needs:

env "CC=gcc" \
CFLAGS="-DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR -DPAM_EXTERN=extern -D_LINUX_SOURCE_COMPAT" \
CPPFLAGS="-I/usr/local/bdb/include -I/usr/local/ssl/include -I/usr/local/include -I/usr/local" \
LDFLAGS="-L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib -L/usr/local/ssl/lib -L/usr/local/openldap/lib -L/usr/local/lib /usr/local/lib/libicon
v.a /usr/local/lib/libintl.a -liconv -L/usr/lib -lc" \
../configure --prefix=/usr/local/samba --with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap --with-pam --with-krb5=/usr/local/heimdal
-krb5 --with-winbind --with-acl-support --with-utmp --with-quotas --with-sendfile-support --with-aio-support --enable-shared=yes --disable-stati
c --with-libiconv=/usr/local


Comment 5 William Jojo 2006-03-02 07:38:15 UTC
What does "ldd /path/to/sbin/smbd" return?

If it has /usr/lib/libiconv.a, then consider "unset LIBPATH" when you build and when you launch the samba binaries. LIBPATH by default has /usr/lib first. This just seems to mess things up unnecessarily IMHO.
Comment 6 David Shapiro 2006-03-02 07:49:14 UTC
For some reason the libiconv from gnu compiles fine and gets through make, but if you run make check, it cores.  I ended up getting libiconv from pdslib and installing that instead, which got me around this issue.  I am worried that there is something going on with compilation (gcc 4.0.2 from same site) and/or libraries/library paths.  Anyway, using the pdslib libiconv got me a configure run with no errors about needing libiconv from freshmeat. I used the following build script (in reference to your last comment, note that I have been setting LIBPATH):

#!/bin/ksh -x

export LIBPATH=/usr/lib:/usr/local/lib:/opt/freeware/lib

env "CC=gcc" \
CFLAGS="-DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR -DPAM_EXTERN=extern -D_LINUX_SOURCE_COMPAT" \
CPPFLAGS="-I/usr/local/bdb/include -I/usr/local/ssl/include -I/usr/local/include -I/usr/local" \
LDFLAGS="-L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib -L/usr/local/ssl/lib -L/usr/local/openldap/lib -L/usr/local/lib /usr/local/
lib/libiconv.a /usr/local/lib/libintl.a -liconv -L/usr/lib -lc" \
../configure --prefix=/usr/local/samba --with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap --with-pam --with-krb5=/usr/lo
cal/heimdal-krb5 --with-winbind --with-acl-support --with-utmp --with-quotas --with-sendfile-support --with-aio-support --enable-shar
ed=yes --disable-static --with-libiconv=/usr/local

/usr/local/bin/gmake
exit
/usr/local/bin/gmake install

for i in WINBIND pam_winbind.so; do
        if [ -f /usr/lib/security/$i ]; then
                mv /usr/lib/security/$i /usr/lib/security/$i.old
                chmod 555 nsswitch/$i
                cp nsswitch/$i /usr/lib/security
                rm /usr/lib/security/$i.old
        else
                cp nsswitch/$i /usr/lib/security
        fi
done

# Add to /usr/lib/security config file
#* PAM:
#*       program = /usr/lib/security/PAM
#
#WINBIND:
#        program = /usr/lib/security/WINBIND
#        options = authonly
#*        options = auth=PAM,db=BUILTIN