[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  Dawn of Time
. -> [Folder]  Installing/compiling the server
. . -> [Subject]  Having trouble with Makefile on a heavily modified DoT code

Having trouble with Makefile on a heavily modified DoT code

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Tempest   (7 posts)  [Biography] bio
Date Fri 12 Nov 2021 06:18 PM (UTC)
Message
I know that the DoT code is no longer supported, however I am in need of some advice on how to get old DoT code to compile and make on newer servers. I can get it to compile, but when it comes to makefile, I get multiple definition, and undefined reference errors when it had compiled and makefile'd fine on the old server. Thank you very much in advance.
[Go to top] top

Posted by Fiendish   USA  (2,525 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Sun 14 Nov 2021 04:00 PM (UTC)
Message
Things we need from you:

Link to the code and build files.

Description of both your old and new servers including what kind of CPU they have and what operating system name and version they use.

What commands you tried to run, where you tried to run them from, and what output messages they produce.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Tempest   (7 posts)  [Biography] bio
Date Reply #2 on Sun 14 Nov 2021 06:58 PM (UTC)
Message
Unfortunately I'm unable to provide a link to the code. The previous server used Debian, the one that I'm on now is Linux, and hosted through Third Generation hosting. We're unsure what version the code is, however the server owners stated that they were able to get it to compile under GCC 4.1, I'm not having any luck however. White spaces were removed, and this is about 100 lines shorter than the original error screen I had. I can provide the file contents if needed, just trying not to blow this forum up and figured that someone might have come across these same kind of errors when trying to convert and could maybe point me in the right direction on where to look to try to fix it or if there is something that I need for my compiler that I don't have. Thank you!

/dawn/src$ make
g++ -c -Wall -g -O com_time.cpp -o obj/com_time.o
rm -f ../dawn
g++ -g -O -lz -o ../dawn \
(all obj files created here) com_time.o
obj/alias.o: In function `do_nickname(char_data*, char*)':
/dawn/src/alias.cpp:320: multiple definition of `do_nickname(char_data*, char*)'
obj/alias.o:/dawn/src/alias.cpp:320: first defined here
obj/alias.o: In function `do_unalias(char_data*, char*)':
/dawn/src/alias.cpp:264: multiple definition of `do_unalias(char_data*, char*)'
obj/alias.o:/dawn/src/alias.cpp:264: first defined here
obj/alias.o: In function `do_alias(char_data*, char*)':
/dawn/src/alias.cpp:161: multiple definition of `do_alias(char_data*, char*)'
obj/alias.o:/dawn/src/alias.cpp:161: first defined here
obj/alias.o: In function `substitute_alias(connection_data*, char*)':
/dawn/src/alias.cpp:27: multiple definition of `substitute_alias(connection_data*, char*)'
obj/alias.o:/dawn/src/alias.cpp:27: first defined here
obj/com_time.o: In function `get_compile_time(bool)':
/dawn/src/com_time.cpp:15: multiple definition of `get_compile_time(bool)'
obj/com_time.o:/dawn/src/com_time.cpp:15: first defined here
obj/com_time.o: In function `do_compile_time(char_data*, char*)':
/dawn/src/com_time.cpp:58: multiple definition of `do_compile_time(char_data*, char*)'
obj/com_time.o:/dawn/src/com_time.cpp:58: first defined here
obj/act_comm.o: In function `do_report(char_data*, char*)':
/dawn/src/act_comm.cpp:4298: undefined reference to `do_osay(char_data*, char*)'
obj/act_comm.o: In function `do_immerse(char_data*, char*)':
/dawn/src/act_comm.cpp:5997: undefined reference to `do_osay(char_data*, char*)'
/dawn/src/act_comm.cpp:5998: undefined reference to `do_odeaf(char_data*, char*)'
/dawn/src/act_comm.cpp:6004: undefined reference to `do_osay(char_data*, char*)'
/dawn/src/act_comm.cpp:6005: undefined reference to `do_odeaf(char_data*, char*)'
obj/act_comm.o: In function `quit_char(char_data*, char*, bool, bool)':
/dawn/src/act_comm.cpp:3094: undefined reference to `do_disguise(char_data*, char*)'
obj/act_info.o: In function `do_meditate(char_data*, char*)':
/dawn/src/act_info.cpp:13641: undefined reference to `element_table'
/dawn/src/act_info.cpp:13675: undefined reference to `element_table'
/dawn/src/act_info.cpp:13695: undefined reference to `element_table'
obj/ai.o: In function `thief_ai(char_data*, char_data*)':
/dawn/src/ai.cpp:595: undefined reference to `do_lunge(char_data*, char*)'
obj/handler.o: In function `affect_remove_things(char_data*, int)':
(continued in next post)
[Go to top] top

Posted by Tempest   (7 posts)  [Biography] bio
Date Reply #3 on Sun 14 Nov 2021 07:29 PM (UTC)
Message
(continued errors when Makefile)

dawn/src/handler.cpp:2303: undefined reference to `do_fakerace(char_data*, char*)'
obj/interp.o:(.data+0x1508): undefined reference to `do_otell(char_data*, char*)'
obj/interp.o:(.data+0x1588): undefined reference to `do_oreply(char_data*, char*)'
obj/interp.o:(.data+0x1908): undefined reference to `do_osay(char_data*, char*)'
obj/interp.o:(.data+0x1dc8): undefined reference to `do_alia(char_data*, char*)'
obj/interp.o:(.data+0x37c8): undefined reference to `do_camouflage(char_data*, char*)'
obj/interp.o:(.data+0x3808): undefined reference to `do_camouflage(char_data*, char*)'
obj/interp.o:(.data+0x4c48): undefined reference to `do_disguise(char_data*, char*)'
obj/interp.o:(.data+0x4e08): undefined reference to `do_doorway(char_data*, char*)'
obj/interp.o:(.data+0x5088): undefined reference to `do_decipher(char_data*, char*)'
obj/interp.o:(.data+0x5848): undefined reference to `do_familiar(char_data*, char*)'
obj/interp.o:(.data+0x7b88): undefined reference to `do_lunge(char_data*, char*)'
obj/interp.o:(.data+0x8dc8): undefined reference to `do_odeaf(char_data*, char*)'
obj/interp.o:(.data+0x8e88): undefined reference to `do_osay(char_data*, char*)'
obj/interp.o:(.data+0x8ec8): undefined reference to `do_osayto(char_data*, char*)'
obj/interp.o:(.data+0x9588): undefined reference to `do_plant(char_data*, char*)'
obj/interp.o:(.data+0x98c8): undefined reference to `do_powerfocus(char_data*, char*)'
obj/interp.o:(.data+0x9908): undefined reference to `do_powertransfer(char_data*, char*)'
obj/interp.o:(.data+0xb708): undefined reference to `do_shadowfold(char_data*, char*)'
obj/interp.o:(.data+0xb748): undefined reference to `do_shadowveil(char_data*, char*)'
obj/interp.o:(.data+0xb788): undefined reference to `do_shadowwalk(char_data*, char*)'
obj/interp.o:(.data+0xc088): undefined reference to `do_spackle(char_data*, char*)'
obj/interp.o:(.data+0xcc08): undefined reference to `do_oatell(char_data*, char*)'
obj/interp.o:(.data+0xcc48): undefined reference to `do_otell(char_data*, char*)'
obj/magic_tr.o: In function `spell_shapeshift(int, int, char_data*, void*, int)':
/dawn/src/magic_tr.cpp:47: undefined reference to `do_fakerace(char_data*, char*)'
obj/magic.o: In function `check_raise_element(char_data*, int, bool, int)':
/dawn/src/magic.cpp:2561: undefined reference to `element_table'
/dawn/src/magic.cpp:2570: undefined reference to `element_table'
obj/oedit.o: In function `show_obj_values(char_data*, obj_index_data*)':
/dawn/src/oedit.cpp:597: undefined reference to `element_table'
obj/oedit.o: In function `set_obj_values(char_data*, obj_index_data*, int, char*)':
/dawn/src/oedit.cpp:1726: undefined reference to `element_table'
/dawn/src/oedit.cpp:1735: undefined reference to `element_table'
obj/update.o: In function `char_update()':
/dawn/src/update.cpp:3537: undefined reference to `do_shadowveil(char_data*, char*)'
collect2: ld returned 1 exit status
make: *** [dawn] Error 1
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Mon 15 Nov 2021 06:52 AM (UTC)

Amended on Mon 15 Nov 2021 06:53 AM (UTC) by Nick Gammon

Message

I tried to compile DoT recently, to help someone else.

I got so many error messages that, in the end, I just gave up.

It ought to work, after all the server compiled and ran fine in the past.

However when code isn’t maintained for a few years it can suffer from problems because the compiler-writers tighten up the rules, generally being a good idea because that helps catch problems caused by ambiguous code.

I mention on this page that nothing much has happened since 2009 (12 years ago).

In my case, I wasn’t strongly motivated enough to spend days to work out what the issues were. If you are keen to get it working, then you can probably sort things out. :)

You seem to have problems with both multiple definitions of functions, and others not being defined at all. If you can solve one of those you can probably solve all of them.

Try doing a global search (eg. using grep) to find what is causing these.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Tempest   (7 posts)  [Biography] bio
Date Reply #5 on Mon 15 Nov 2021 01:20 PM (UTC)

Amended on Mon 15 Nov 2021 04:52 PM (UTC) by Tempest

Message
That's kind of what has me stumped to be honest. The undefined ones, are defined, but maybe not in a way the compiler wants them to be. I'm not going to give up though, and will do what you suggest. Thank you. :)

edited to add: Could this be a link complaint and not a case of multiple or undefined definitions?
[Go to top] top

Posted by Tempest   (7 posts)  [Biography] bio
Date Reply #6 on Mon 15 Nov 2021 06:35 PM (UTC)

Amended on Mon 15 Nov 2021 06:42 PM (UTC) by Tempest

Message
Example of my confusion - First line is what it spits out when doing a makefile. The rest is everywhere nickname appears in the code. I can only find it defined once. I'm pretty new to all of this, so any advice on where to go from here would be seriously appreciated. I came across something that said that linker errors could cause this, is that the case here? I'm not certain as it compiled before.


/dawn/src/alias.cpp:321: multiple definition of `do_nickname(char_data*, char*)'
obj/alias.o:/home/oblivion/dawn/src/alias.cpp:321: first defined here

/dawn/src$ grep -r "nickname"
act_info.cpp:		ch->printlnf("You will see %s along with short descriptions.",HAS_PCONFIG(ch,PCONFIG_NICKNAMES)?"nicknames":"actual names");
act_info.cpp:		ch->println("         config nicknames   - Toggles seeing nicknames instead of actual names");
act_info.cpp:		if (!str_prefix(argument,"nicknames")){
act_info.cpp:		ch->printlnf("Config for nicknames toggled %s.",HAS_PCONFIG(ch,PCONFIG_NICKNAMES)?"on":"off");

alias.cpp:		void do_nickname(char_data *ch, char *argument)
alias.cpp:			ch->println("You have no nicknames defined.");
alias.cpp:			ch->println("Your current nicknames are:");
alias.cpp:			ch->println("To delete nicknames, type 'nickname delete <character's actual name>'.");
alias.cpp:			ch->printlnf("Give `w%s `xwhat nickname?",capitalize(arg1));
alias.cpp:			ch->printlnf("The nickname '`w%s`x' cannot be found in your list.",capitalize(arg2));
alias.cpp:		//need to add check so two people can't have the same nickname
alias.cpp:			ch->println("You already have someone by that nickname");
alias.cpp:			ch->println("You can't give someone the nickname of an existing player.");
alias.cpp:			ch->println("You cannot give anyone this nickname.");
alias.cpp:			ch->printlnf("The nickname for `w%s`x has been changed to '%s'.",
alias.cpp:			if (!str_cmp(arg2,ch->pcdata->nick)){ // check if the nickname is already used
alias.cpp:			ch->printlnf("You are already using the nickname '`w%s`x' for `w%s`x.",
alias.cpp:			ch->println("Sorry, you have reached the limit for nicknames.");

dawn.h		#define PCONFIG_NICKNAMES (U)

handler.cpp:	bool has_nickname(char_data *ch,char_data *looker,char *nickname);
handler.cpp:		/*&& (!IS_NPC(ch) && !has_nickname(rch,ch,arg))*/)

interp.cpp:	{ "nickname",		do_nickname,		POS_DEAD,		 0,	LOG_NORMAL,		1, 0 },

interp.h:		DECLARE_DO_FUN( do_nickname			)

intro_ex.cpp:	bool has_nickname(char_data *ch,char_data *looker,char *nickname)
intro_ex.cpp:	char *get_nickname(char_data *looker, char_data *ch)
intro_ex.cpp:		sprintf(nick,"%s",get_nickname(looker,ch));
intro_ex.cpp:		|| has_nickname(ch,looker,ch->current_name(looker))))){

save.cpp:				ch->pcdata->nick[nickcount]        = fread_string(fp); //the nickname
tables.cpp:	{  "nicknames",				PCONFIG_NICKNAMES,				true},

[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Wed 17 Nov 2021 07:08 AM (UTC)
Message

It’s almost like the object is being linked twice. For example:

obj/alias.o: In function `do_nickname(char_data*, char*)':
/dawn/src/alias.cpp:320: multiple definition of `do_nickname(char_data*, char*)'
obj/alias.o:/dawn/src/alias.cpp:320: first defined here

That seems to be saying that it found a problem in alias.cpp line 320, that there was a duplicate, and the duplicate was in exactly the same file at the same place!

So, I would be looking more closely at how it links things.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Tempest   (7 posts)  [Biography] bio
Date Reply #8 on Wed 17 Nov 2021 11:01 PM (UTC)

Amended on Wed 17 Nov 2021 11:20 PM (UTC) by Tempest

Message
Well found the cause of all the alias and com_time errors, yay! Now to figure out the undefined errors and I think I might just get this thing to compile and make. It sure would have hurt to lose 17 years worth of work building areas etc. Having to learn to code to get it going is challenging, but hopefully worth it. Thank you for all of your help!
[Go to top] top

Posted by Tempest   (7 posts)  [Biography] bio
Date Reply #9 on Thu 18 Nov 2021 10:43 PM (UTC)

Amended on Fri 19 Nov 2021 12:14 AM (UTC) by Tempest

Message
I would just like to say.... I DID IT!!!!

The code compiled and made the dawn executable file, booted and hotrebooted.

I can not express the extent of my giddyness at the moment.

Thank you so much for your help Nick. Now I just get to figure out how to code classes, skills and spells to make this remake even better. <3 <3 <3
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Sat 20 Nov 2021 08:46 AM (UTC)
Message
For the benefit of future users who may hit the same issue, can you please document what you changed to make it work?

Thanks a lot, and congratulations!

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Gatewaysysop2   USA  (146 posts)  [Biography] bio
Date Reply #11 on Fri 26 Nov 2021 08:37 PM (UTC)

Amended on Fri 26 Nov 2021 08:41 PM (UTC) by Gatewaysysop2

Message
And to the surprise of exactly no one, the OP has now vanished after getting what they needed, with zero intention of giving anything back to the community.

True to form, they made certain to humble-brag about getting the code to compile and run properly before disappearing.

I'm sure that as soon as they hit the next snag and can't figure something else out, they'll be back to ask more questions from the same community that they just gave the finger to.

"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Fri 26 Nov 2021 11:31 PM (UTC)
Message
Perhaps the OP will prove you wrong by posting the amendments necessary to get the code to compile.

That would certainly help other people in the future.

Let's see shall we?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,759 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]