samba 2.2.7a 编译

今天在君正T20上编译samba 2.2.7a 遇到了一些问题,特此记录一下

1.自己写一个build.sh脚本,方便后续的再次编译

#!/bin/sh
#
export CFLAGS="-O2 -muclibc" 
export CPPFLAGS="-O2 -muclibc" 
export CXXFLAGS="-O2 -muclibc" 
export LDFLAGS="-O2 -muclibc"
#export CFLAGS='-O3 -w -isystem /home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/mips-linux-gnu/libc/usr/include'
#export CPPFLAGS='-O3 -w -isystem /home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/mips-linux-gnu/libc/usr/include'
export PATH=/home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/bin:$PATH
export COMPILE_TOOL=/home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/bin/mips-linux-gnu-
export CC=${COMPILE_TOOL}gcc
export AS=${COMPILE_TOOL}as
export AR=${COMPILE_TOOL}ar
export LD=${COMPILE_TOOL}ld
export RANLIB=${COMPILE_TOOL}ranlib
export STRIP=${COMPILE_TOOL}strip
export CPP=${COMPILE_TOOL}cpp
export LD_LIBRARY_PATH=/home/xuxuequan/Ingenicwork/Ingenic-SDK/rootfs/lib
#
MQARMDIR=/usr/samba
MQUSERDIR=/usr/samba/config
#
./configure --build=i686-build_pc-linux-gnu --host=mips-linux-gnu --target=mips-linux-gnu \
 --prefix=/home/xuxuequan/Ingenicwork/lib/libsource/samba-2.2.7a/install \
 --includedir=/home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/mips-linux-gnu/libc/uclibc/usr/include \
 --oldincludedir=/home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/mips-linux-gnu/libc/uclibc/usr/include \
 --disable-largefile \
 --enable-swat=no \
 --enable-smbtorture4=no \
 --enable-cups=no \
 --enable-iprint=no \
 --enable-pie=no \
 --enable-relro=no \
 --with-PACKAGE=no \
 --enable-external-libtalloc=no \
 --enable-external-libtevent=no \
 --enable-external-libtdb=no \
 --enable-fam=no \
 --enable-avahi=no \
 --with-libtalloc=no \
 --with-libtevent=no \
 --with-libtdb=no \
 --with-libnetapi=no \
 --with-libsmbsharemodes=no \
 --with-dmapi=no \
 --with-ldap=no \
 --with-ads=no \
 --with-dnsupdate=no \
 --with-pam=no \
 --with-pam_smbpass=no \
 --with-sys-quotas=no \
 --with-utmp=no \
 --with-cluster-support=no \
 --with-acl-support=no \
 --with-sendfile-support=no \
 --with-wbclient=no \
 --with-winbind=no \
 --with-included-popt=no \
 --with-included-iniparser=no \
 --bindir=$MQARMDIR/bin \
 --sbindir=$MQARMDIR/sbin \
 --localstatedir=$MQUSERDIR/var \
 --libdir=$MQARMDIR/lib \
 --with-privatedir=$MQUSERDIR/private \
 --with-rootsbindir=$MQARMDIR/bin \
 --with-lockdir=$MQUSERDIR/var/locks \
 --with-configdir=$MQUSERDIR \
 --with-logfilebase=$MQUSERDIR/var \
 --with-piddir=$MQUSERDIR/var


2.执行这个build.sh生成Makefile文件

3.修改/home/xuxuequan/Ingenicwork/lib/libsource/samba-2.2.7a/source/include/config.h

注释掉三个宏定义,增加下面红色的定义

/* The number of bytes in a int.  */
//#define SIZEOF_INT cross

/* The number of bytes in a long.  */
//#define SIZEOF_LONG cross

/* The number of bytes in a short.  */
//#define SIZEOF_SHORT cross

#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_SHORT 2
#define HAVE_GETTIMEOFDAY_TZ 1
#define USE_SETEUID 1
#define HAVE_IFACE_IFCONF 1


4.后续执行make即可在bin下面生成smbclient


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值