0

我从官方网站获得了 DeleGate 9:http: //www.delegate.org/

但我未能在 Ubuntu 11.10 32 位上编译它。错误是什么?如果文件 libsubst.a 丢失,请告诉我如何安装它。我试着找到文件。但它不在那里..

错误如下:

<pre>
delegate9.9.7$ make
......
cc -O2 -x c++ -DQS  -I../gen -I../include  -c vsap.c`enter code here`
cc -O2 -x c++ -DQS  -I../gen -I../include  -c tcprelay.c
cc -O2 -x c++ -DQS  -I../gen -I../include  -c udprelay.center code here
cc -O2 -x c++ -DQS  -I../gen -I../include  -c ftpgw.c
cc -O2 -x c++ -DQS  -I../gen -I../include  -c filetype.c
rm -f ../lib/libdelegate.a
ar cr ../lib/libdelegate.a version.o ../srcsign.o editconf.o admin.o notify.o shutter.o abort.o form2conf.o process.o vaddr.o conf.o svport.o ddi.o textconv.o script.o param.o env.o thmain.o syslog.o log.o svstat.o iotimeout.o misc.o msg.o yshell.o shio.o db.o hostlist.o cond.o service.o svconf.o filter.o master.o qstest.o delegate.o caps.o spinach.o stls.o tsp.o sudo.o gacl.o access.o ident.o dgauth.o dgsign.o ccache.o cache.o distrib.o bcounter.o ipno.o inets.o uns.o rident.o inetd.o thruwayd.o dget.o urlfind.o mount.o url.o gopher.o icp.o icap.o http.o httpx.o httplog.o httphead.o httpd.o cgi.o ssi.o htaccept.o htccx.o htswitch.o htmlgen.o nntp.o nntplist.o nntpgw.o enews.o pop.o smtp.o telnet.o ftp.o xferlog.o X.o wais.o whois.o imap.o ldap.o smtpgate.o alias.o domain.o lpr.o sftp.o socks.o socks4.o sox.o cuseeme.o coupler.o vsap.o tcprelay.o udprelay.o ftpgw.o filetype.o
/usr/bin/ranlib ../lib/libdelegate.a
"/home/qi/delegate9.9.7/mkmake.exe" -touch "../lib/libdelegate.a"
cc -O2 -x c++ -DQS  -I../gen -I../include  -c embed.c -DADMINPASS=\"\" -DADMIN=\"redice@163.com\" \
                        -DIMPSIZE=10000
cc  -L../lib -o embed embed.o version.o ../srcsign.o \
                        ../lib/library.a ../lib/libcfi.a ../lib/libmimekit.a ../lib/libmd5.a \
                        -lnsl -ldl -lutil -lpthread -lstdc++ -lc ../lib/libsubst.a
../lib/libsubst.a(_-forkpty.o): In function `_Forkpty(int*, char*)':
_-forkpty.c:(.text+0x33): undefined reference to `forkpty'
../lib/libsubst.a(_-forkpty.o): In function `_ForkptyX(int*, char*, void*, void*)':
_-forkpty.c:(.text+0x1): undefined reference to `forkpty'
collect2: ld returned 1 exit status
make[2]: *** [embed] Error 1
make[2]: Leaving directory `/home/qi/delegate9.9.7/src'
make[1]: *** [start0] Error 2
make[1]: Leaving directory `/home/qi/delegate9.9.7/src'
mkmake: ERROR LOG is left at /home/qi/delegate9.9.7/src/mkmake.err
mkmake: ERROR LOG is left at /home/qi/delegate9.9.7/src/mkmake.err
make: *** [all] Error 2
</pre>

如下/home/qi/delegate9.9.7/src/mkmake.err

<pre>
        *** exit(2): -makeat at /home/qi/our_services/proxies/charge/delegate9.9.7/src
        [0] make
        [1] MKMAKE_SRC=
        [2] SHELL=/bin/sh
        [3] HDRDIRS=-I../gen -I../include 
        [4] LIBDIRS=-L../lib
        [5] MKMAKE=/home/qi/our_services/proxies/charge/delegate9.9.7/mkmake.exe
        [6] MKBASE=/home/qi/our_services/proxies/charge/delegate9.9.7
        [7] MKMKMK=/home/qi/our_services/proxies/charge/delegate9.9.7/mkmkmk.exe

        *** exit(2): -makeat at /home/qi/our_services/proxies/charge/delegate9.9.7/src
        [0] ./mkmake.exe
        [1] 
        [2] src
        [3] dg.exe
        [4] make
        [5] MKMAKE_SRC=
        [6] SHELL=/bin/sh
        [7] HDRDIRS=-I../gen -I../include 
        [8] LIBDIRS=-L../lib
</pre>
4

1 回答 1

1

我得到了这个问题的答案如果你收到错误

undefined reference to `forkpty'

所以在 maker 文件夹中编辑 _-forkpty.c 文件

vim maker/_-forkpty.c

并添加

#include <util.h>

make clean
make
于 2013-09-05T10:35:05.103 回答