Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Compiling Issue

Compiling Issue

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


Posted by Findecano_Elendil   United Kingdom  (9 posts)  Bio
Date Tue 08 Sep 2009 07:51 PM (UTC)
Message
Hi Guys,
abit of a weird one.. probably something to do with my system. The server I'm on compiles our SmaugFUSS code fine, but when I go to compile on my linux machine the whole lot goes in 'funky town' mode.

I'm guessing its the GCC version im using... but is there anyway bypassing these errors? I'm on 4.4.1-2 where our server is on: 4.1.2-44


imc.c: In function ‘char* imccapitalize(const char*)’:
imc.c:525: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:527: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c: In function ‘char* imc_mudof(const char*)’:
imc.c:597: error: invalid conversion from ‘const char*’ to ‘char*’
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: warning: conversion to ‘short int’ from ‘int’ may alter its value
imc.c: In function ‘int imcfread_number(FILE*)’:
imc.c:1113: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1121: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1125: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1142: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c: In function ‘char* imcfread_line(FILE*)’:
imc.c:1182: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1196: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1209: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c: In function ‘char* imcfread_word(FILE*)’:
imc.c:1242: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1265: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c: In function ‘void imcfread_to_eol(FILE*)’:
imc.c:1292: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c:1298: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c: In function ‘char imcfread_letter(FILE*)’:
imc.c:1320: warning: conversion to ‘char’ from ‘int’ may alter its value
imc.c: In function ‘void imc_recv_broadcast(IMC_PACKET*, char*)’:
imc.c:1901: warning: the address of ‘sender’ will always evaluate as ‘true’
imc.c: In function ‘void imc_recv_chanwho(IMC_PACKET*, char*)’:
imc.c:2028: warning: the address of ‘cwho’ will always evaluate as ‘true’
imc.c: In function ‘void imc_recv_isalive(IMC_PACKET*, char*)’:
imc.c:2640: warning: the address of ‘url’ will always evaluate as ‘true’
imc.c:2646: warning: the address of ‘version’ will always evaluate as ‘true’
imc.c:2652: warning: the address of ‘netname’ will always evaluate as ‘true’
imc.c:2664: warning: the address of ‘host’ will always evaluate as ‘true’
imc.c:2670: warning: the address of ‘iport’ will always evaluate as ‘true’
imc.c: In function ‘void imc_recv_iceupdate(IMC_PACKET*, char*)’:
imc.c:2747: warning: the address of ‘chan’ will always evaluate as ‘true’
imc.c:2766: warning: conversion to ‘short int’ from ‘int’ may alter its value
imc.c: In function ‘void imc_process_authentication(char*)’:
imc.c:3231: warning: the address of ‘rname’ will always evaluate as ‘true’
imc.c:3244: warning: the address of ‘pw’ will always evaluate as ‘true’
imc.c:3287: warning: the address of ‘encrypt’ will always evaluate as ‘true’
imc.c: In function ‘void imc_readchannel(IMC_CHANNEL*, FILE*)’:
make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2



Many thanks for any help or advice!
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 08 Sep 2009 07:57 PM (UTC)
Message
The only one of these that's an error is the following:

imc.c: In function ‘char* imc_mudof(const char*)’:
imc.c:597: error: invalid conversion from ‘const char*’ to ‘char*’


You need to make sure that any const char* strings are not being improperly converted to char*.

These warnings/error are due to increased strictness in gcc 4.4. It's catching and complaining about sloppy/lazy programming and bad practice.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Findecano_Elendil   United Kingdom  (9 posts)  Bio
Date Reply #2 on Tue 08 Sep 2009 08:01 PM (UTC)
Message
Well that means, the whole of Smaug is doomed then? haha.
I guess, I should spend some time on the code and clean it up... one hell of a long job.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Tue 08 Sep 2009 08:22 PM (UTC)
Message
Why would it be doomed? There are still people maintaining these and fixing problems... But, yes, the code is full of sloppy mistakes and they'll need to get fixed if people want to use more modern compilers.

I think that the recent FUSS versions have cleaned up these errors; are you using the most recent FUSS download?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Findecano_Elendil   United Kingdom  (9 posts)  Bio
Date Reply #4 on Wed 09 Sep 2009 03:24 PM (UTC)
Message
I was using the word doomed fairy loosely, I meant doomed as in most of the code will soon have to be re-written... so it almost all of it would not be original code.

I am using SmaugFUSS1.9 which I believe is the latest version? Unless I'm a bit out of date. Which is probably more likely.

It isn't stock, however.. I don't think we've changed that much.... for it to suddenly stop working in newer versions of GCC.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #5 on Wed 09 Sep 2009 03:47 PM (UTC)
Message
The FUSS project has a habit of updating code without changing the version number at all, so having 1.9 from last week might mean something different from 1.9 from this week. The best way to tell is to download a fresh copy from their website, and see if it compiles. If it does, compare the relevant sections of code to get the fixes. If it doesn't, this should be brought up at www.smaugmuds.org as a bug report.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #6 on Wed 09 Sep 2009 09:28 PM (UTC)
Message
There seems to be a post on the SmaugMuds forum about "GCC 4.4 Compliance":

http://www.smaugmuds.org/index.php?a=topic&t=4112

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #7 on Wed 09 Sep 2009 09:38 PM (UTC)
Message
Ah, those are probably the changes you'll need to make. It's nice to have a nice list like that.

Note that 1.9:
http://www.smaugmuds.org/index.php?a=files&s=viewfile&fid=165
was last updated on July 29th, and that post was July 8th.

(Personally I find the versioning pretty confusing; you have to follow the forums and/or file updates to know if your copy is the most up to date download of the particular version.)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
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.


25,026 views.

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

Go to topic:           Search the forum


[Go to top] top

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