所需软件包:
samba-3.3.3.tar.tar
环境变量:
export LD_LIBRARY_PATH=/root/cs_rootfs_1.0.3/cross_rootfs/lib
export CPPFLAGS=-I/root/cs_rootfs_1.0.3/cross_rootfs/include
export CFLAGS=-I/root/cs_rootfs_1.0.3/cross_rootfs/include
export CC=mipsel-linux-gcc
export AR=mipsel-linux-ar
cd /root/samba-3.3.3/source
./configure --host=i686 --target=mipsel-linux
错误修改之:
cannot run test program while cross compiling
修改以下文件:
1】
--- samba-3.3.3/source/configure 2009-04-01 20:19:36.000000000 +0800
+++ ../c-programm/samba-3.3.3/source/configure 2009-04-15 13:49:11.000000000 +0800
@@ -13061,6 +13061,7 @@
{ $as_echo "$as_me:$LINENO: checking that the C compiler understands negative enum values" >&5
$as_echo_n "checking that the C compiler understands negative enum values... " >&6; }
+samba_cv_CC_NEGATIVE_ENUM_VALUES=stz
if test "${samba_cv_CC_NEGATIVE_ENUM_VALUES+set}" = set; then
$as_echo_n "(cached) " >&6
Else
2】先运行configure后,在修改
--- samba-3.3.3/source/include/config.h 2009-04-15 16:09:57.000000000 +0800
+++ ../c-programm/samba-3.3.3/source/include/config.h 2009-04-15 15:02:58.000000000 +0800
-#define HAVE_LBER_H 1
+#define HAVE_LBER_H 0
-#define HAVE_LBER_LOG_PRINT_FN 1
+#define HAVE_LBER_LOG_PRINT_FN 0
-#define HAVE_LDAP_H 1
+#define HAVE_LDAP_H 0
板子配置文件:
mkdir -p /usr/local/samba/lib/
mkdir -p /usr/local/samba/var/locks/
mkdir /usr/local/samba/private/
cp /tango/samba-configure/samba/smb.conf /usr/local/samba/lib/
cp /tango/samba-configure/smbd /sbin/
cp /tango/samba-configure/nmbd /sbin/
cp /tango/samba-configure/smbpasswd /sbin/
测试:
运行smbpasswd –a root命令
转载于:https://my.oschina.net/stz/blog/726043