0

I really need your help. I am struggling to compile Xcom server files to install my Ubuntu Linux. Xcom server is a messaging server which is also helpful for a multiplayer game and as a messaging system.

When I type make command it returns error like:

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

I am in linux Ubuntu. The Makefile file is like that :

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:

I can send you all files as well please help me. It took my 4 days but still not succueded. The error looks like the following:

enter image description here

jhoepken
  • 1,842
  • 3
  • 17
  • 24
Orkhan Orkhan
  • 105
  • 2
  • 8

1 Answers1

0

DMD is a D language compiler from Digital Mars, I believe. Try to find it in the list of available packages and install, http://www.digitalmars.com/d/1.0/dmd-linux.html

UPDATE

ok, I've looked into issue a bit more.

DMD is indeed digital mars D compiler, but what you need is GDMD, which is imitation of DMD running on top of GNU D. I'm running Ubuntu 15.04, 64bit, GCC 4.9.2

  1. I've installed GNU D: apt-get install gdc
  2. I've downloaded GDMD from https://github.com/D-Programming-GDC/GDMD and installed it in /usr/bin as gdmd, and made it executable
  3. Checked, so gdmd in terminal prints a lot of options
  4. Got your files, unpacked and hit make
  5. Got errors about unquoted \0 and \n. Edited few places and put things in double quotes
  6. Got error about missing std/c/unix/unix.d. There is no such thing on my system, but quick search told me it is now called linux. So in few places replaced std.c.unix.unix to std.c.linux.linux
  7. NOw error is error: module date is in file 'std/date.d' which cannot be read

I gave up and passing torch to you

UPDATE II

actually dealing with quite a few missing 'std/date.d' is easy - replaced it with std.datetime. But then I got missing gc (garbage collector?), then missing md5 (hash?)

Severin Pappadeux
  • 18,636
  • 3
  • 38
  • 64
  • Thank you for your time and answer. I did this before actually but I guess I am doing wrong. there is one step like that : Put /dmd/linux/bin on your PATH, or copy the linux executables to /usr/local/bin I don't know how to do this exactly . Maybe I am doing worng on this step. – Orkhan Orkhan Mar 13 '16 at 17:48
  • Now I am trying to install on 32 bit machine maybe I got the result. – Orkhan Orkhan Mar 13 '16 at 18:25
  • What version of the Ubuntu do you have? – Severin Pappadeux Mar 14 '16 at 01:43
  • Looks like D compiler from mars (DMD) is now supposed to called `dmd`. Coud you could call `dmd` at the terminal? – Severin Pappadeux Mar 14 '16 at 01:45
  • I use Ubuntu 15 downloaded from offical website. what exactly you want me to write on termineal ? when I write dmd it returns : DMD 32 D COMPILER V 2.063.2 Copyright 1999-2013 by Digital Mars Written by Walter Bright Documentation : .... Usage: ..... and so on .. It means dmd is usable . Could you please look at the server files which I want to compile maybe there is something wring . www.speedyshare.com/6y4Tv/47d2b57d/xcom.zip I need that xcomm server to be installed on any linux machine ,but can't. There is doc folde inside the zip and written how to install. Thanks in Advance. – Orkhan Orkhan Mar 14 '16 at 08:52
  • I changed all gdmd to dmd in the Makefile and still not getting result . the outputs after changing dmd is : root@ubuntu:/opt/xcomm# make dmd -O -inline -Isrc -version=daemon -op -of./xcomm 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 -fPIC -q,-rdynamic -L-ldl Error: unrecognized switch '-q,-rdynamic' Makefile:35: recipe for target 'protocol-daemon' failed make: *** [protocol-daemon] Error 1 – Orkhan Orkhan Mar 14 '16 at 09:06
  • @OrkhanOrkhan is it you here? http://forum.dlang.org/post/tsgjswgqwehynxqrwabf@forum.dlang.org – Severin Pappadeux Mar 18 '16 at 03:35
  • @OrkhanOrkhan apparently you have gotten to GDMD. But if it doesn't work, the only way to make it for for me is to move `gdmd` from `/usr/local/bin` to '/usr/bin`. Use `sudo mv /usr/local/bin/gdmd /usr/bin/gdmd` and then in the terminal try `gdmd`, it should show a lot of options – Severin Pappadeux Mar 18 '16 at 03:38
  • Yes I am the same person from dlang. – Orkhan Orkhan Mar 18 '16 at 11:23
  • it works when I type gdmd . everything works fine but not compiling – Orkhan Orkhan Mar 19 '16 at 08:43
  • Thank you very much Severin Pappadeux! I appreciate your help . I got in touch where from I got the files and have seen that thw system of the machine is the UNIX! I don't know how to find the unix system and install because it is old project of 2008 year. so I need to install Unix system . That is the reason we are getting errors I guess. I am still trying. – Orkhan Orkhan Mar 19 '16 at 09:38
  • Most probably it uses solaris Unix. – Orkhan Orkhan Mar 19 '16 at 11:00
  • I can donate someone who can install this server on any Unix / Linux machine . The files are on this link : speedyshare.com/6y4Tv/47d2b57d/xcom.zip Thanks. – Orkhan Orkhan Mar 19 '16 at 12:38
  • So , I am sure it is Unix system rather than Linux. I am not sure but it might also be FreeBsd. Because neither solaris nor openbsd using gdmd. Only freebsd (Unix) supports gdmd . – Orkhan Orkhan Mar 19 '16 at 19:19
  • @OrkhanOrkhan ` it is old project of 2008 year. ` That was my feeling as well. If you check my updates, you could see that on reasonable recent Ubuntu system I'm unable to compile. I suspect it is due to fact, that when I installed `gdc/gdmd` on my Ubuntu, it tells that `version 2 of the D language` supported. And my feeling was I had to make too many changes, so I think code was written in D language version 1 (or something like this, earlier than v2). So problem, I think, is bigger - not only to compile, but either dig out D v1, or change code significantly – Severin Pappadeux Mar 20 '16 at 03:22
  • @OrkhanOrkhan I don't know about D language on solaris, but on freebsd/openbsd main compiler, I believe, is GCC so `GDC/GDMD` should be there as well in some package – Severin Pappadeux Mar 20 '16 at 03:24
  • this project is running in one server at the moment in Unix based machine. Maybe you are right I have to find earlier version of the gdmd but the main thing I am sure for now is about Unix. – Orkhan Orkhan Mar 20 '16 at 07:19
  • You are Right! there are some missing files . I am trying to get that files. Once I got the files will write here. thanks. – Orkhan Orkhan Mar 22 '16 at 16:32
  • Nothing missing , just there is some different versions. But it shoudl also work. – Orkhan Orkhan Mar 24 '16 at 07:55