[問題] samba移植 makefile出錯(talloc.o)
大家好,我還是linux dev新手 瞎子摸象中
很多白痴問題,還請大家幫幫忙
我想要移植samba 3.2.12 到嵌入式中
我只需要生出smbd這個執行檔
看看能不能像網站說的可以支援到win 7
http://wiki.samba.org/index.php/Windows7
首先我下載了samba 3.2.12 解開之後,在 source資料夾中
執行./configure
不是很清楚他到底在做什麼,但是我發現他會自動產生一個很複雜的Makefile
對於Makefile 小的只懂一點點簡單的
所以我就先試試看 在自己的pc(ubuntu)上 先編譯看看
以下是我的改法
.....
......
LIBS=-lcrypt -lresolv -lresolv -lnsl -ldl
#CC=gcc //make 掉這個
CC=/export/rtl819x_svn4/toolchain/rsdk-1.3.6-4181-EB-2.6.30-0.9.30/bin/
rsdk-linux-gcc //改用板子上的 gcc去編編看 這個簡單的我會改
SHLD=${CC} ${CFLAGS}
LIB_PATH_VAR=LD_LIBRARY_PATH
.....
........
make clean 後
make 卻得到一個錯誤
make
Using FLAGS = -O -O -D_SAMBA_BUILD_=3
-I/export/rtl819x_svn4/users/samba-3.2.12/source/popt
-I/export/rtl819x_svn4/users/samba-3.2.12/source/iniparser/src -Iinclude
-I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include
-I./libaddns -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I.
-I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc
-I./popt -I/include -I/export/rtl819x_svn4/users/samba-3.2.12/source/lib
-D_SAMBA_BUILD_=3
PICFLAG = -fPIC
LIBS = -lcrypt -lresolv -lresolv -lnsl -ldl
LDFLAGS = -pie -Wl,-z,relro -L./bin
DYNEXP = -Wl,--export-dynamic
LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-z,relro -L./bin
SHLIBEXT = so
SONAMEFLAG = -Wl,-soname=
Generating smbd/build_options.c
Building include/proto.h
creating /export/rtl819x_svn4/users/samba-3.2.12/source/include/proto.h
Building include/build_env.h
creating
/export/rtl819x_svn4/users/samba-3.2.12/source/winbindd/winbindd_proto.h
creating /export/rtl819x_svn4/users/samba-3.2.12/source/web/swat_proto.h
creating /export/rtl819x_svn4/users/samba-3.2.12/source/libnet/libnet_proto.h
creating /export/rtl819x_svn4/users/samba-3.2.12/source/client/client_proto.h
creating /export/rtl819x_svn4/users/samba-3.2.12/source/utils/net_proto.h
creating
/export/rtl819x_svn4/users/samba-3.2.12/source/utils/ntlm_auth_proto.h
Compiling lib/talloc/talloc.c
In file included from include/includes.h:105,
from lib/talloc/talloc.c:36:
./lib/replace/system/iconv.h:43:19: iconv.h: No such file or directory
In file included from include/includes.h:107,
from lib/talloc/talloc.c:36:
./lib/replace/system/network.h:87:21: stropts.h: No such file or directory
./lib/replace/system/network.h:126:21: ifaddrs.h: No such file or directory
In file included from lib/talloc/talloc.c:36:
include/includes.h:159:28: rpcsvc/yp_prot.h: No such file or directory
include/includes.h:162:27: rpcsvc/ypclnt.h: No such file or directory
include/includes.h:267:31: valgrind/memcheck.h: No such file or directory
In file included from ./nsswitch/winbind_nss.h:40,
from ./nsswitch/winbind_nss_config.h:49,
from ./nsswitch/winbind_client.h:1,
from include/includes.h:714,
from lib/talloc/talloc.c:36:
./nsswitch/winbind_nss_linux.h:25:17: nss.h: No such file or directory
In file included from include/includes.h:714,
from lib/talloc/talloc.c:36:
./nsswitch/winbind_client.h:30: warning: parameter has incomplete type
The following command failed:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/export/rtl819x_svn4/toolchain/rsdk-1.3.6-4181-EB-2.6.30-0.9.30/bin/rsdk-linux-gcc
-I. -I/export/rtl819x_svn4/users/samba-3.2.12/source -O -O -D_SAMBA_BUILD_=3
-I/export/rtl819x_svn4/users/samba-3.2.12/source/popt
-I/export/rtl819x_svn4/users/samba-3.2.12/source/iniparser/src -Iinclude
-I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include
-I./libaddns -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I.
-I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc
-I./popt -I/include -I/export/rtl819x_svn4/users/samba-3.2.12/source/lib
-D_SAMBA_BUILD_=3 -fPIC -c lib/talloc/talloc.c -o lib/talloc/talloc.o
make: *** [lib/talloc/talloc.o] Error 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
就是這個錯誤
在前面一點又有說 The following command failed:
我在猜是不是底下的makefile有錯誤?
我後來有驗證 改回 CC=gcc
是可以成功編譯出 bin檔
唉~~好困難的Makefile Q__Q
--
我很菜.....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.189.230
推
09/12 02:02, , 1F
09/12 02:02, 1F
→
09/12 02:04, , 2F
09/12 02:04, 2F
→
09/12 02:06, , 3F
09/12 02:06, 3F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):