Compiling Error in Ubuntu but not CentOS

Posted by Moroj on Sat 29 Jul 2017 06:14 PM — 7 posts, 32,454 views.

#0
Okay I have a unique issue. I have a dedicated Ubuntu machine that I want to use to develop the MUD and run it on in the beginning. I've downloaded the DBSaga codebase from smaugmuds.org but have been unable to run the make file without errors.

(https://www.smaugmuds.org/files/DBSC-252-152/)

Here are the last five lines that appear in the console after running make after running make clean:

collect2: error: ld returned 1 exit status
Makefile:74: recipe for target 'dbs' failed
make[1]: *** [dbs] Error 1
Makefile:71: recipe for target 'all' failed
make: *** [all] Error 2

Interestingly enough I also have a CentOS7 virtual machine that I have for testing and it is able to compile just fine without issues. I really don't want to have to copy everything over to a virtual machine each time I need to compile the code. I know that CentOS is based on Red Hat but I would think they should both be able to compile the code. Can someone help me out?
USA Global Moderator #1
Quote:
Here are the last five lines

That's not how compile errors work. If anything, we need the lines from where it first begins to error. That means you'll need to learn how to identify what a build error looks like.
Amended on Sat 29 Jul 2017 08:26 PM by Fiendish
#2
I didn't want to post the entirety of the make command output because it was allot of information, but here it is. Due to the the output being over 6000 characters I've provided a link to the file below:

https://uploadfiles.io/pmxws

Like I mentioned in my first post CentOS compiles fine so there shouldn't be any issues with the files themselves. I just cant run the make file on my Ubuntu machine.
Amended on Sat 29 Jul 2017 09:35 PM by Moroj
USA Global Moderator #3
Quote:
Like I mentioned in my first post CentOS compiles fine so there shouldn't be any issues with the files themselves.

Yeah, but compilers change over time and sometimes across distributions as well, and different versions of compilers treat different things as errors by default.

It looks like your problems may already be addressed in other SMAUG codebases. Start with these links...

https://www.mushclient.com/forum/?id=10316
https://www.smaugmuds.org/index.php?a=topic&t=4150&p=18638#p18638
Amended on Sun 30 Jul 2017 04:40 PM by Fiendish
#4
I tried the recommendations on the last two replies of Mushclient forum post you mentioned. The makefile doesn't contain '-Werr' anywhere in make file, and I also tried commenting out IMC in Makefile. I got the exact same results as before.

As for the Smaugmuds post I wasn't able to fine anything in that post that applied to the issue I'm having.
USA Global Moderator #5
The smaugmuds link has the fix for all those "the address of X will always evaluate as ‘true’" warnings.

For the link errors...do you have libm and libz installed?

It builds in Debian 10.
Amended on Sun 30 Jul 2017 07:53 PM by Fiendish
#6
Okay I see what your talking about now, but if I'm understanding it correctly I would have to edit that line out of 65 separate c files before I could compile without getting that warning.

Libz is currently installed and I believe libm should be as well.