Compil warning & compilers

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
vincele
Merchant
Merchant
Posts: 35
Joined: Mon Jul 04, 2011 5:32 pm

Compil warning & compilers

Post by vincele »

Hello,

I was curious about VS's compilability with llvm/clang and found it fairly good,
and the end result is working properly too. Good.

But the build is very noisy with piles of warnings all over the place, so that led
me to start "fixing" some of them, which resulted in a quilt series of 44 patches
that I posted in https://sourceforge.net/p/vegastrike/patches/66/ (some of those
may be overlapping with Nido Media's set in patches/65)

I did them finegrained to the extreme, so that they can be cherry picked independently
and the nonobvious ones may be easily postponed / discussed.

The end result is compile and runtime tested with debian's gcc-4.7.3-4, gcc-4.8.1-2
and clang 3.4-1~exp1 (nightly trunk). The gcc-4.8 bug discussed in
http://forums.vega-strike.org/viewtopic.php?f=5&t=18612
is fixed in newer versions, I stumbled upon it and verified that it is really fixed for VS.

Please advise if such work is useful or not.

I'm still contemplating the patches needed to fix the compil errors that I got with clang
because I'm not sure they're proper fixes or just bandaids...
vincele
Merchant
Merchant
Posts: 35
Joined: Mon Jul 04, 2011 5:32 pm

Re: Compil warning & compilers

Post by vincele »

If someone want a single patch for the full series, for example to test it on MS compilers, just ask...
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compil warning & compilers

Post by pheonixstorm »

I think some of the patches we may need a reference for on what warning(s) it fixes. Other than that these have been on the todo list for a bit so it will be nice to get some of the quicker fixes out and take a closer look at any of the more dangerous warnings (if any)
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
vincele
Merchant
Merchant
Posts: 35
Joined: Mon Jul 04, 2011 5:32 pm

Re: Compil warning & compilers

Post by vincele »

OK, should I bother writing real changelogs or a single-line explanation will be sufficient ?
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compil warning & compilers

Post by pheonixstorm »

single line would be fine. So just whatever warning code and maybe the actual warning message so it can be looked up. I don't see any need for anything more. May want to see if klauss chimes in on this just to be safe though.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
vincele
Merchant
Merchant
Posts: 35
Joined: Mon Jul 04, 2011 5:32 pm

Re: Compil warning & compilers

Post by vincele »

OK I'm currently finishing the individual changelogs for each patch, I hope they will be useful...
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compil warning & compilers

Post by pheonixstorm »

Everything is useful, even if we don't get to it for awhile or just can't use it.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
vincele
Merchant
Merchant
Posts: 35
Joined: Mon Jul 04, 2011 5:32 pm

Re: Compil warning & compilers

Post by vincele »

Yes but that's a huge amount of work, to get proper finegrained individual changelogs, I estimate the time to do that work to be 3-4 times the time to fix the code itself, and I hope that work not to be lost. I'm not in a hurry, and probably some of the patches will be wrong...

There's a lot of re-compiling done to get the warnings, ccache was of use, but its usefulness stops when a header file is touched that's included everywhere (often indirectly). I may want to give a try at fixing this next. Would it be useful work ? Splitting includes, not including inside .h, etc...

My main worry about such work is that I cannot test MS windows compil, as I don't have access to a MSdev box...
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compil warning & compilers

Post by pheonixstorm »

well we did have a ticket for all the windows compile errors.. Not sure what happened to it, may have been lost when sourceforge moved everyone over to its new system. If you want a list of all the VC10 warnings I can recompile with all warnings on. It was a big list though. I will try and go over the patch list this week for what you already have on the tracker. I guess for now just post whatever you think are the highest priority warnings. Not sure how many of the warnings will match up between win32 and linux.

As for header files... They can be really touchy. I once tried to add inclusion guards to a file (forget which) and then VS refused to compile. May want to start with some of the smaller ones before getting into the messier elements of the code ;)
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Compil warning & compilers

Post by klauss »

pheonixstorm wrote:single line would be fine. So just whatever warning code and maybe the actual warning message so it can be looked up. I don't see any need for anything more. May want to see if klauss chimes in on this just to be safe though.
I have a huuuuge backlog of things to check. I'll get around to it eventually, but other devs are welcome to review the patches in the meanwhile ;)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compil warning & compilers

Post by pheonixstorm »

I am hoping to get to it.. Finally finished rebuilding an older comp for my parents so that frees up some time. Or will once I get all the bookmarks and thunderbird data copied over.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
vincele
Merchant
Merchant
Posts: 35
Joined: Mon Jul 04, 2011 5:32 pm

Re: Compil warning & compilers

Post by vincele »

I have the series properly changelogged (hopefuly...) I'll update the bug report whortly
Post Reply