0

我真的需要你的帮助。我正在努力编译 Xcom 服务器文件以安装我的 Ubuntu Linux。Xcom 服务器是一个消息服务器,对于多人游戏和消息系统也很有帮助。

当我键入make命令时,它会返回如下错误:

/bin/sh: 1: gdmd: not found
Makefile:35: recipe for target 'protocol-daemon' failed
make: ***[protocol-daemon] Error 127

我在linux Ubuntu中。Makefile文件是这样的:

DFLAGS_DEBUG=-debug=2 -g -Isrc
DFLAGS_DEBUG1=-debug=1 -g -Isrc
DFLAGS=-O -inline -Isrc

PROTOCOL_SRC=src/misc_util.d src/socket_base.d src/xcomm_sockets.d src/msgserver_core.d src/char_outbuffer.d src/logging.d src/xml_util.d src/plugins.d src/xcomm_protocol/*.d src/stork/*.d src/stork/*/*.d
PROTOCOL_LIBS=-fPIC -q,-rdynamic -L-ldl
PROTOCOL_OUTPUT=./xcomm
PROTOCOL_FLAGS=-c xcomm.conf

PLUGIN_LIBS=-fPIC -q,-rdynamic,-shared

defaulttarget: protocol-daemon plugins-opt
all: protocol-daemon plugins-opt
distclean: clean

protocol:
    gdmd $(DFLAGS_DEBUG) -op -of$(PROTOCOL_OUTPUT) $(PROTOCOL_SRC) $(PROTOCOL_LIBS)
    find . -name "*.o" -print0 | xargs -0 rm -f

protocol-debug1:
    gdmd $(DFLAGS_DEBUG1) -op -of$(PROTOCOL_OUTPUT) $(PROTOCOL_SRC) $(PROTOCOL_LIBS)
    find . -name "*.o" -print0 | xargs -0 rm -f

protocol-test: protocol plugins
    $(PROTOCOL_OUTPUT) $(PROTOCOL_FLAGS)

protocol-opt:
    gdmd $(DFLAGS) -op -of$(PROTOCOL_OUTPUT) $(PROTOCOL_SRC) $(PROTOCOL_LIBS)
    find . -name "*.o" -print0 | xargs -0 rm -f

protocol-opt-test: protocol-opt plugins-opt
    $(PROTOCOL_OUTPUT) $(PROTOCOL_FLAGS)

protocol-daemon:
    gdmd $(DFLAGS) -version=daemon -op -of$(PROTOCOL_OUTPUT) $(PROTOCOL_SRC) $(PROTOCOL_LIBS)
    find . -name "*.o" -print0 | xargs -0 rm -f

daemon-debug:
    gdmd $(DFLAGS_DEBUG) -version=daemon -op -of$(PROTOCOL_OUTPUT) $(PROTOCOL_SRC) $(PROTOCOL_LIBS)
    find . -name "*.o" -print0 | xargs -0 rm -f

protocol-debug: protocol plugins
    find . -name "*.o" -print0 | xargs -0 rm -f
    gdb --args $(PROTOCOL_OUTPUT) $(PROTOCOL_FLAGS)

plugins:
    gdmd $(DFLAGS_DEBUG) -op -ofplugins/random.so src/plugins/random.d $(PLUGIN_LIBS)
    gdmd $(DFLAGS_DEBUG) -op -ofplugins/game_sets.so src/plugins/game_sets.d $(PLUGIN_LIBS)

plugins-opt:
    gdmd $(DFLAGS) -op -ofplugins/random.so src/plugins/random.d $(PLUGIN_LIBS)
    gdmd $(DFLAGS) -op -ofplugins/game_sets.so src/plugins/game_sets.d $(PLUGIN_LIBS)

clean:
    find . -name "*.o" -print0 | xargs -0 rm -f
    rm -f *.log
    rm -f plugins/*.so
    rm -f src/test_clients/old_n_crufty
    rm -f src/test_clients/scripted
    rm -f src/test_clients/spammer
    rm -f src/test_clients/spammer2
    rm -f $(PROTOCOL_OUTPUT)

backup: distclean
    @if [ ! -e dist ]; then mkdir dist; fi
    tar c . --exclude=CVS --exclude=.svn --exclude=dist | bzip2 -9 > dist/xcomm-backup_`date +"%Y-%m-%d_%H%M"`.tar.bz2

# Create a release tarball.
dist: distclean
    @if [ "$(DISTVER)" = "" ]; then echo DISTVER not set - please set it to 1.0 or similar.; echo; exit 1; fi
    @if [ ! -e dist ]; then mkdir dist; fi
    tar c . --exclude=CVS --exclude=.svn --exclude=dist --exclude=debug.conf | bzip2 -9 > dist/xcomm-$(DISTVER).tar.bz2

.PHONY: protocol protocol-test protocol-opt protocol-opt-test protocol-daemon protocol-debug plugins plugins-opt clean dist distclean backup all defaulttarget
.NOTPARALLEL:

我也可以将所有文件发送给您,请帮助我。我花了 4 天时间,但仍然没有成功。错误如下所示:

在此处输入图像描述

4

1 回答 1

0

我相信 DMD 是来自 Digital Mars 的 D 语言编译器。尝试在可用软件包列表中找到它并安装,http://www.digitalmars.com/d/1.0/dmd-linux.html

更新

好的,我已经研究了更多问题。

DMD 确实是数字 mars D 编译器,但您需要的是 GDMD,它是在 GNU D 之上运行的模仿 DMD。我正在运行 Ubuntu 15.04、64bit、GCC 4.9.2

  1. 我已经安装了 GNU D:apt-get install gdc
  2. 我从https://github.com/D-Programming-GDC/GDMD下载了 GDMD并将其安装在 /usr/bin as 中gdmd,并使其可执行
  3. 检查,所以gdmd在终端打印了很多选项
  4. 得到你的文件,解压并点击make
  5. 得到关于未引用的 \0 和 \n 的错误。编辑了几个地方并将内容放在双引号中
  6. 收到关于缺少 std/c/unix/unix.d 的错误。我的系统上没有这样的东西,但快速搜索告诉我它现在称为 linux。所以在少数地方将 std.c.unix.unix 替换为 std.c.linux.linux
  7. 现在错误是错误:模块日期在文件“std/date.d”中,无法读取

我放弃了,把火炬传递给你

更新二

实际上处理很多丢失的“std/date.d”很容易——用std.datetime替换它。但后来我失踪了gc(垃圾收集器?),然后失踪了md5(散列?)

于 2016-03-13T14:41:25.323 回答