vsftp make失败
来源: 互联网 发布时间:2017-02-03
本文导语: gcc -c main.c -O2 -Wall -W -Wshadow -idirafter dummyinc gcc -c utility.c -O2 -Wall -W -Wshadow -idirafter dummyinc gcc -c prelogin.c -O2 -Wall -W -Wshadow -idirafter dummyinc gcc -c ftpcmdio.c -O2 -Wall -W -Wshadow -idirafter dummyinc gcc -c postlogin.c ...
gcc -c main.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c utility.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c prelogin.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ftpcmdio.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c postlogin.c -O2 -Wall -W -Wshadow -idirafter dummyinc
postlogin.c: In function ‘process_post_login’:
postlogin.c:459: warning: passing argument 3 of ‘vsf_cmdio_write’ from incompatible pointer type
postlogin.c: In function ‘load_forward_info’:
postlogin.c:1036: warning: comparison between signed and unsigned
postlogin.c:1049: warning: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
postlogin.c:1055: warning: comparison between signed and unsigned
postlogin.c: In function ‘ftp’:
postlogin.c:1177: warning: comparison between signed and unsigned
postlogin.c:1243: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
postlogin.c:1250: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
postlogin.c:1260: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
gcc -c privsock.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c tunables.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ftpdataio.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c secbuf.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ls.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c postprivparent.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c logging.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c str.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c netstr.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sysstr.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c strlist.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c banner.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c filestr.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c parseconf.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c secutil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ascii.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c oneprocess.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c twoprocess.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c privops.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c standalone.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c hash.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c tcpwrap.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ipaddrparse.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c access.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c features.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c readwrite.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c opts.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ssl.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sslslave.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ptracesandbox.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ftppolicy.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sysutil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c sysdeputil.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -o cwftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o -Wl,-s `./cwf_findlibs.sh`
/bin/sh: ./cwf_findlibs.sh: Permission denied
sysdeputil.o: In function `vsf_sysdep_adopt_capabilities':
sysdeputil.c:(.text+0xa83): undefined reference to `cap_init'
sysdeputil.c:(.text+0xa9e): undefined reference to `cap_set_proc'
sysdeputil.c:(.text+0xab6): undefined reference to `cap_free'
sysdeputil.c:(.text+0xaf1): undefined reference to `cap_set_flag'
sysdeputil.c:(.text+0xb15): undefined reference to `cap_set_flag'
sysdeputil.c:(.text+0xb4a): undefined reference to `cap_set_flag'
sysdeputil.c:(.text+0xb6e): undefined reference to `cap_set_flag'
sysdeputil.o: In function `vsf_sysdep_has_capabilities':
sysdeputil.c:(.text+0xb91): undefined reference to `cap_get_proc'
sysdeputil.c:(.text+0xb9b): undefined reference to `cap_free'
sysdeputil.o: In function `vsf_sysdep_check_auth':
sysdeputil.c:(.text+0xc28): undefined reference to `pam_start'
sysdeputil.c:(.text+0xc60): undefined reference to `pam_set_item'
sysdeputil.c:(.text+0xc81): undefined reference to `pam_set_item'
sysdeputil.c:(.text+0xc96): undefined reference to `pam_end'
sysdeputil.c:(.text+0xcad): undefined reference to `pam_end'
sysdeputil.c:(.text+0xcd3): undefined reference to `pam_set_item'
sysdeputil.c:(.text+0xcec): undefined reference to `pam_authenticate'
sysdeputil.c:(.text+0xd05): undefined reference to `pam_acct_mgmt'
sysdeputil.c:(.text+0xd1e): undefined reference to `pam_setcred'
sysdeputil.c:(.text+0xd40): undefined reference to `pam_end'
sysdeputil.c:(.text+0xd65): undefined reference to `pam_end'
sysdeputil.c:(.text+0xd97): undefined reference to `pam_open_session'
sysdeputil.c:(.text+0xdb7): undefined reference to `pam_setcred'
sysdeputil.o: In function `vsf_auth_shutdown':
sysdeputil.c:(.text+0xe00): undefined reference to `pam_close_session'
sysdeputil.c:(.text+0xe15): undefined reference to `pam_setcred'
sysdeputil.c:(.text+0xe2a): undefined reference to `pam_end'
collect2: ld returned 1 exit status
make: *** [cwftpd] Error 1
vsf_findlib.sh 是这样的:
#!/bin/sh
# Cheesy hacky location of additional link libraries.
locate_library() { [ ! "$1*" = "`echo $1*`" ]; }
find_func() { egrep $1 $2 >/dev/null; }
if find_func hosts_access tcpwrap.o; then
echo "-lwrap";
locate_library /lib/libnsl.so && echo "-lnsl";
fi
# Look for PAM (done weirdly due to distribution bugs (e.g. Debian) or the
# crypt library.
if find_func pam_start sysdeputil.o; then
locate_library /lib/libpam.so.0 && echo "/lib/libpam.so.0";
locate_library /usr/lib/libpam.so && echo "-lpam";
# HP-UX ends shared libraries with .sl
locate_library /usr/lib/libpam.sl && echo "-lpam";
# AIX ends shared libraries with .a
locate_library /usr/lib/libpam.a && echo "-lpam";
else
locate_library /lib/libcrypt.so && echo "-lcrypt";
locate_library /usr/lib/libcrypt.so && echo "-lcrypt";
fi
# Look for the dynamic linker library. Needed by older RedHat when
# you link in PAM
locate_library /lib/libdl.so && echo "-ldl";
# Look for libsocket. Solaris needs this.
locate_library /lib/libsocket.so && echo "-lsocket";
# Look for libnsl. Solaris needs this.
locate_library /lib/libnsl.so && echo "-lnsl";
# Look for libresolv. Solaris needs this.
locate_library /lib/libresolv.so && echo "-lresolv";
# Look for libutil. Older FreeBSD need this for setproctitle().
locate_library /usr/lib/libutil.so && echo "-lutil";
# For older HP-UX...
locate_library /usr/lib/libsec.sl && echo "-lsec";
# Look for libcap (capabilities)
if locate_library /lib/libcap.so.1; then
echo "/lib/libcap.so.1";
else
locate_library /usr/lib/libcap.so && echo "-lcap";
locate_library /lib/libcap.so && echo "-lcap";
fi
# Solaris needs this for nanosleep()..
locate_library /lib/libposix4.so && echo "-lposix4";
locate_library /usr/lib/libposix4.so && echo "-lposix4";
# Tru64 (nanosleep)
locate_library /usr/shlib/librt.so && echo "-lrt";
# Solaris sendfile
locate_library /usr/lib/libsendfile.so && echo "-lsendfile";
# OpenSSL
if find_func SSL_library_init ssl.o; then
echo "-lssl -lcrypto";
fi
exit 0;
请问大家是怎么回事?
|
错误明显:/bin/sh: ./cwf_findlibs.sh: Permission denied
1 是否 sh文件无可执行权限,这类错误占绝大多数
2 干嘛这样写?
3 直接执行这个脚本看输出有没有问题,初步看没有问题的话复制到你的gcc连接命令行上执行!
4 有进一步error贴出来
1 是否 sh文件无可执行权限,这类错误占绝大多数
2 干嘛这样写?
3 直接执行这个脚本看输出有没有问题,初步看没有问题的话复制到你的gcc连接命令行上执行!
4 有进一步error贴出来