一、
一开始编译的时候总是出错:
specified for parameter 'sendfile'
sysdeputil.c:186: error: storage class specified for parameter 'environ'
sysdeputil.c:187: error: storage class specified for parameter 's_proctitle_space'
sysdeputil.c:187: error: parameter 's_proctitle_space' is initialized
sysdeputil.c:188: error: storage class specified for parameter 's_proctitle_inited'
sysdeputil.c:188: error: parameter 's_proctitle_inited' is initialized
sysdeputil.c:189: error: storage class specified for parameter 's_p_proctitle'
sysdeputil.c:189: error: parameter 's_p_proctitle' is initialized
sysdeputil.c:201: error: storage class specified for parameter 'do_sendfile'
sysdeputil.c:202: error: storage class specified for parameter 'vsf_sysutil_setproctitle_internal'
sysdeputil.c:203: error: storage class specified for parameter 's_proctitle_prefix_str'
sysdeputil.c:398: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:436: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:474: error: storage class specified for parameter 'do_checkcap'
sysdeputil.c:478: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:497: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:514: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:527: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:604: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:641: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:796: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:803: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:809: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:856: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:889: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:930: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:935: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:976: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1012: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1128: error: storage class specified for parameter 's_uwtmp_inserted'
sysdeputil.c:1129: error: storage class specified for parameter 's_utent'
sysdeputil.c:1134: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1173: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
sysdeputil.c:1189: error: old-style parameter declarations in prototyped function definition
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:162: error: parameter name omitted
sysdeputil.c:1189: error: expected '{' at end of input
make: *** [sysdeputil.o] Error 1
二、
后来搜索到解决之道:
在Ubuntu下面手动编译vsftpd出现问题,竟然花了两个小时查找原因解决,在此记录一下。
一开始在vsftpd的官方FTP网站上下载vsftpd软件包,这个ftp站上面竟然没有vsftpd各个版本源码的tar.gz包,只有解压开的源码文件夹的形式(坑爹啊),为了方便只好用
Filezilla从FTP站上把源码包的整个文件夹下载下来,然后在windows下面压缩再传到虚拟机里面的Ubuntu进行解压缩。
打开后在Ubuntu下面编译总是会出现类似sysdeputil.c:xxx: error:的错误,在网上查到需要对sysdeputil.c文件打一下补丁才行,结果打补丁的时候又出现了以下错误:
pavel@pavel-desktop ~/test/vsftpd-2.0.6 $ patch sysdeputil.c attachment.bin
patching file sysdeputil.c
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED -- saving rejects to file sysdeputil.c.rej
又一次坑爹!!
下面记录完整正确的在Ubuntu下面编译vsftpd的过程:
1.从以下网址上下载需要的vsftpd源码的tar.gz包:http://gd.tuwien.ac.at/infosys/servers/ftp/vsftpd/
我在这里下载的是
2.在Ubuntu中解压缩后进入vsftpd-2.0.6目录进行make,仍然出现那个sysdeputil.c错误,
在以下地址下载sysdeputil.c文件的补丁文件:
http://linuxfromscratch.org/pipermail/lfs-dev/attachments/20061019/fd9b9f56/attachment.bin 然后对sysdeputil.c文件打补丁:patch sysdeputil.c attachment.bin
3.重新进行make后编译通过。
三、我的两个文件的下载地址
vsftpd压缩包:http://zh.sourceforge.jp/projects/sfnet_cross-stuff/downloads/cross-stuff/1.0/vsftpd-2.0.6.tar.gz/
四、两篇对这个解析的非常好的博文