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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  Tons of errors compiling Smaugfuss 1.9 on Ubuntu
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Tons of errors compiling Smaugfuss 1.9 on Ubuntu

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


Posted by Slej   (6 posts)  [Biography] bio
Date Tue 04 Dec 2012 08:05 PM (UTC)
Message
I'm more than a bit new to this, so realize I've probably done (or not done) something obvious. This is smaugfuss 1.9 on Ubuntu 11.10. Attempts to compile result in tons of errors, all of which look very similar to the one-page sampling I'll post here:

imc.c:414:14: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
imc.c: In function 'char* imccapitalize(const char*)':
imc.c:525:35: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:527:35: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'char* imc_mudof(const char*)':
imc.c:597:37: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
imc.c: In function 'void imc_new_channel(const char*, const char*, const char*, const char*, const char*, bool, int, const char*)':
imc.c:1089:15: error: conversion to 'short int' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'int imcfread_number(FILE*)':
imc.c:1113:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1121:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1125:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1142:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'char* imcfread_line(FILE*)':
imc.c:1182:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1196:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1209:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'char* imcfread_word(FILE*)':
imc.c:1242:14: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1265:16: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'void imcfread_to_eol(FILE*)':
imc.c:1292:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c:1298:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'char imcfread_letter(FILE*)':
imc.c:1320:11: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'void imc_recv_broadcast(IMC_PACKET*, char*)':
imc.c:1901:9: error: the address of 'sender' will always evaluate as 'true' [-Werror=address]
imc.c: In function 'void imc_recv_chanwho(IMC_PACKET*, char*)':
imc.c:2028:14: error: the address of 'cwho' will always evaluate as 'true' [-Werror=address]
imc.c: In function 'void imc_process_finger(char*, char*)':
imc.c:2423:64: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
imc.c:2429:64: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
imc.c: In function 'void imc_recv_isalive(IMC_PACKET*, char*)':
imc.c:2640:25: error: the address of 'url' will always evaluate as 'true' [-Werror=address]
imc.c:2646:33: error: the address of 'version' will always evaluate as 'true' [-Werror=address]
imc.c:2652:33: error: the address of 'netname' will always evaluate as 'true' [-Werror=address]
imc.c:2664:27: error: the address of 'host' will always evaluate as 'true' [-Werror=address]
imc.c:2670:29: error: the address of 'iport' will always evaluate as 'true' [-Werror=address]
imc.c: In function 'void imc_request_keepalive()':
imc.c:2702:36: error: deprecated conversion from string constant to 'char*' [-Werror=write-strings]
imc.c: In function 'void imc_recv_iceupdate(IMC_PACKET*, char*)':
imc.c:2747:9: error: the address of 'chan' will always evaluate as 'true' [-Werror=address]
imc.c:2766:18: error: conversion to 'short int' from 'int' may alter its value [-Werror=conversion]
imc.c: In function 'void imc_process_authentication(char*)':
imc.c:3231:9: error: the address of 'rname' will always evaluate as 'true' [-Werror=address]
imc.c:3244:12: error: the address of 'pw' will always evaluate as 'true' [-Werror=address]
imc.c:3287:36: error: the address of 'encrypt' will always evaluate as 'true' [-Werror=address]
imc.c: In function 'void imc_readchannel(IMC_CHANNEL*, FILE*)':
I know enough to know that something is very wrong, but not enough to know exactly what. So any info would be appreciated.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 04 Dec 2012 08:58 PM (UTC)

Amended on Tue 04 Dec 2012 08:59 PM (UTC) by Nick Gammon

Message
I can certainly reproduce this. However it compiles cleanly on earlier versions of the compiler. They have tightened up a lot of the C validation, hence the errors you are getting.

See here for details:

http://gcc.gnu.org/gcc-4.4/porting_to.html


I've tried, but can't easily get rid of them.

My first suggestion is to post a query on the SmaugMUDs forum here:

http://www.smaugmuds.org/

Since they are distributing the code, they are probably aware of the issue. You could ask if they are fixing it, have fixed it, or are planning to fix it soon.

A couple of things that can help a bit:


  • Comment out the use of IMC in Makefile. That at least stops the errors in the imc.c file.

  • On the line "W_FLAGS" (in Makefile) remove: -Werror

    That stops warnings being treated as errors. You get further into the compile that way, but it doesn't succeed as such.


I fixed some of the problems by adding in "const" here and there (as suggested on the above page) but some of the stuff was a bit more complicated than that.

- Nick Gammon

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

Posted by Slej   (6 posts)  [Biography] bio
Date Reply #2 on Tue 04 Dec 2012 10:15 PM (UTC)
Message
Good to know it's not just me, if nothing else.

Hmm. I did actually try most of the above, apart from posting on the forums. I even tried running make with the -i flag just for kicks, and the number of errors that still came through was absolutely massive, and resulted in only one file being properly compiled.

I wonder if there's a way I could get an earlier version of the compiler that didn't put up such a fuss. I'm not too concerned about having the latest, and don't even use that box for much else, so am more concerned about getting this to work than having the latest G++.
[Go to top] top

Posted by Slej   (6 posts)  [Biography] bio
Date Reply #3 on Tue 04 Dec 2012 10:19 PM (UTC)
Message
My next thought: Given all this, how hard is it to have a precompiled distribution for the most common OS's? I've seen this done for other software, but don't know a lot about how difficult it is. I imagine there is a good reason many programs are distributed with their source code and the means to compile it.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 05 Dec 2012 03:45 AM (UTC)
Message
I think in theory you should be able to get an earlier version of the compiler installed. It might even be part of the Ubuntu repository for the purpose of legacy compilations.

- Nick Gammon

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

Posted by Slej   (6 posts)  [Biography] bio
Date Reply #5 on Wed 05 Dec 2012 04:07 AM (UTC)
Message
Could you give me the version number of a version of G++ that successfully compiles? I'll have a look around for a download of it. I'm pretty sure it's not in any repositories, unless there's a way to roll back to previous versions using apt-get that has so far alluded me, but I'm sure there must be a binary somewhere. I can't imagine we're the only ones having this problem.

Thanks again.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Wed 05 Dec 2012 04:37 AM (UTC)

Amended on Wed 05 Dec 2012 04:38 AM (UTC) by Nick Gammon

Message
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3

Oops, that is the one that doesn't compile.


- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Wed 05 Dec 2012 04:39 AM (UTC)
Message
This one:


gcc (Ubuntu 4.3.2-1ubuntu12) 4.3.2

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Wed 05 Dec 2012 04:47 AM (UTC)
Message
My more update-to-date Ubuntu server seems to have gcc 4.3 on the list of packages you can grab through Synaptic.

You might have to alter the Makefile to put a specific path to the compiler in, not sure how well that will work.

- Nick Gammon

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

Posted by Slej   (6 posts)  [Biography] bio
Date Reply #9 on Fri 07 Dec 2012 09:25 AM (UTC)
Message
I'm using Ubuntu server on a VPS, so synaptic doesn't exactly do much, however I did try to use apt-get to install G++ 4.3 and it didn't seem to find anything. I did stumble across this error though:
Package gcc-4.3 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Several google searches haven't gotten me anywhere either, though maybe I'm just not searching for the right things.
I realize this is stepping across the line to Linux usage though, so I'll only ask, is it possible to create a tarball of the compiled version for Ubuntu i386, or is this completely out of the question? It would seem that compiling it is nearly out of the question at this rate, though I'll keep looking and ask around on other forums to see if any fixed code and/or older G++ downloads exist.

Thanks a lot for your help.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #10 on Fri 07 Dec 2012 08:08 PM (UTC)
Message
What did the SmaugFUSS guys say? This will be an increasing problem for Smaug if they don't fix it themselves.

- Nick Gammon

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

Posted by Slej   (6 posts)  [Biography] bio
Date Reply #11 on Mon 10 Dec 2012 03:09 PM (UTC)
Message
Actually, I haven't gotten around to posting out there. I'll do that and let you know what kind o response I get.
[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.


5,794 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 FutureQuest]