Compiling HEAD (currently 12931) Win XP VC9

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).
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

I checked out the pheonixstorm branch today (r12962) and compiled it with VC++ express 2008. It generates a vegastrikeRa.exe which when run on win7/64 starts as before with a red rectangle, then crashes with a runtime error "this application has requested the runtime to terminate it in an unusual way"

Googling the error doesn't lead me to any relevant info - there's a KB article from MS but it relates only to pre-VC++ 6.0 code, and to 32-bit OSs up to XP SP3.

The event log has the following to say about the crash:

Code: Select all

Log Name:      Application
Source:        Application Error
Date:          12/4/2010 12:21:58 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      PC
Description:
Faulting application name: vegastrikeRa.exe, version: 0.5.5.10, time stamp: 0x4cfa5027
Faulting module name: MSVCR90.dll, version: 9.0.30729.4974, time stamp: 0x4b7a226f
Exception code: 0x40000015
Fault offset: 0x0005beae
Faulting process id: 0x90c
Faulting application start time: 0x01cb93c74d3745a5
Faulting application path: D:\dls\vegastrike\svn\win32\bin\vegastrikeRa.exe
Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\MSVCR90.dll
Report Id: ff3cbf7b-ffca-11df-b3d9-f06a3f5a2edc
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2010-12-04T17:21:58.000000000Z" />
    <EventRecordID>7589</EventRecordID>
    <Channel>Application</Channel>
    <Computer>PC</Computer>
    <Security />
  </System>
  <EventData>
    <Data>vegastrikeRa.exe</Data>
    <Data>0.5.5.10</Data>
    <Data>4cfa5027</Data>
    <Data>MSVCR90.dll</Data>
    <Data>9.0.30729.4974</Data>
    <Data>4b7a226f</Data>
    <Data>40000015</Data>
    <Data>0005beae</Data>
    <Data>90c</Data>
    <Data>01cb93c74d3745a5</Data>
    <Data>D:\dls\vegastrike\svn\win32\bin\vegastrikeRa.exe</Data>
    <Data>C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\MSVCR90.dll</Data>
    <Data>ff3cbf7b-ffca-11df-b3d9-f06a3f5a2edc</Data>
  </EventData>
</Event>
I think this points to serious compatibility problems which prevents running of the 32-bit-compiled binary on a 64bit OS.

I am installing the Server2008+NET 3.5 SDK from http://blogs.msdn.com/b/windowssdk/arch ... -rtms.aspx so I get the 64-bit compiler and headers installed onto VC++, then I'll attempt a 64-bit build. Stay tuned.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Well I can't configure VC++ 2008 express to target 64-bit platforms. Even after following the guide at http://jenshuebel.wordpress.com/2009/02 ... t-targets/ I'm still unable to compile for 64-bit. Sucks.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

See if changing from multithreaded dll to to just multithreaded changes anything.

in the code generation section you can try non-dll or debug setups. I had not had a chance to update the solution for a debug build yet, but see if the debug dll makes any difference. If not works just revert back to the svn copy.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Compiled as multithread only (/MT) instead of MT-dll (/MD): bigger exe, same crash.
Multithread debug (/MTd) compiling now. Not much hope. These are all 32-bit binaries since I'm still unable to convince VS to use the 64-bit compiler.
(edit) debug build fails at linking stage with a few hundred "error LNK2001: unresolved external symbol __CrtDbgReportW" and a few
unresolved external symbol __calloc_dbg
unresolved external symbol __malloc_dbg
unresolved external symbol __free_dbg
Guess missing some debug libraries somewhere.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Still trying to compile a 64bit binary for win7/64. I got access for a while to an installation of the full version of VC++ 2010. Compiling the current svn revision of the pheonixstorm branch after converting the project to x64 gives countless errors

Code: Select all

pheonixstorm\vegastrike\src\posh.h(556): fatal error C1189: #error :  POSH cannot determine target CPU
It looks like POSH gets confused; I tried adding POSH_CPU_X86_64 in the project's preprocessor defines, but that doesn't make a difference.

(edit) I got over that by #defining __x86_64__ instead of POSH_CPU_X86_64; compiling now. Still getting many lines of "Unknown compiler version - please run the configure tests and report the results" in the output.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Result: 270 linker errors (attached below as text file since inline it exceeds max post size)
You do not have the required permissions to view the files attached to this post.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

looking at the error file I *think* that part of the problem is linking 32bit libraries with a 64bit program. Did you recompile python as 64bit or just using the current library files? Its one thought.. not sure what else though. Let me know.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

I noticed that, I'll try to get them one at a time by replacing the libraries with the 64bit ones.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

hope it works for you. Something else that was brought up in another thread though, latest ATI drivers don't like our shaders at all. Even no shader barfs for some reason.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

And therein lays another problem. My only win7/64 test system has an ATI video card. Can't change that either since it's a laptop. :)

Compiling now with python-2.6/64-bit. Let's see if at least I can reduce the number of linker errors, and which other libs need replacing.

(edit) I see a lot less "unknown compiler" messages, or maybe they are getting drowned in the warnings which seem to have multiplied exponentially. :(
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Damn.

Code: Select all

..\..\vegastrike\src\gfx\vsimage.cpp(326): error C3861: 'png_set_gray_1_2_4_to_8': identifier not found
What was the fix for that again? Lemme see if it goes away with a new png-lib.

(later)Gah! I forgot what a royal PITA is to build png on Windows. I cannot for the life of me build the 64-bit libpng-release. It keeps complaining that it can't find the zlib import library, even though I've placed it exactly where the docs say it should be...

Grrr. I give up for now. Try again later with a clear head - hopefully.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

(later - head cleared)

I managed to build libpng by setting all the directories manually.

But that doesn't clear the error:

Code: Select all

vegastrike\src\gfx\vsimage.cpp(326): error C3861: 'png_set_gray_1_2_4_to_8': identifier not found
That was supposed to be fixed a long time ago; why does it surface again?

(fwiw the libpng version is 1.4.4)
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

Did you make sure to update both the png.h and the other png*.h as well as updating the png.lib files? As per svn log I built the 1.44 png lib but forgot to move the files over.. oops, corrected that this morning.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

The png.h and pngconf.h from the build tree are both from libpng-1.4.4, so yes they are the same version as the newly built lib.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

The mystery deepens.

I have setup a virtual machine in vmware running on the host win7/64; the guest VM runs XP 32-bit. I have installed the VC++ redistributables in the guest (2005, 2008 and 2010, all latest versions) then downloaded the latest win32 svn of VS, as well as my own compiled binaries.

All of them crash with the same runtime error that I see on win7/64. At least the loading screens appear correctly before the crash, instead of a red rectangle.

The same binaries run fine on XP 32-bit non-virtualized.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

ok, post specs and a dxdiag file as well. Lets see if we can pinpoint where the problem might be... and link or post the error again.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Here's dxdiag.txt (posting from within the VM...) remember, all the hardware is emulated, including the video card. That said, I have succesfully run games in vmware, including 3D games.

The error is the same one I described in my earlier post in this thread. http://vegastrike.sourceforge.net/forum ... 15#p120230

What else do you need?
You do not have the required permissions to view the files attached to this post.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Sonofabitch!

The png_set_gray_1_2_4_to_8 problem is compiler-specific. It shows up if I compile the code in VS++ Pro 2010 32-bit or 64-bit. It does NOT show up if I compile the same code in VS++ express 2008.

Why, Microsoft? Why?

Well as a consolation I won't have the VS++ 2010 installation after today anymore. However I don't know what version I should go back to. Express 2008? 2005? It looks like no matter what I do I won't be able to get the 64-bit code compiled.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

If nothing else you can always try to get gcc installed and compile 64bit from there using cmake. I don't know how you would go about doing that though. For gcc I have only used QT Creator and DevC++

If it makes you feel any better I tried to compile a new vegastrike binary and now I get that error.... Will update to 1.5 I guess and see what that does.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by shenle »

Which toolchain are you using? Let's at least coordinate on using one version.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

Still running Visual Studio 2008 pro SP1

Going to make sure there are no other png.h files anywhere that are confusing the compile.

*EDIT* Its possible (though unlikely) that the png.h and pngconfig.h from vega-vc8 has things confused. Highly unlikely but will try zippig those files and rebuilding again.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

found the fix for the png issue.

The function name was changed after 1.29 This is not reflected in the VS code. In vsimage.cpp you will need to change line 326 from png_set_gray_1_2_4_to_8( png_ptr ); to png_set_expand_gray_1_2_4_to_8( png_ptr );

It eliminates the need for the ifdef else but when I do the commit I am going to leave it alone and just comment out and add the above line.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by pheonixstorm »

Trying out Profile Guided Optimization in VC9 Wonder if I can get any additional performance out of the code.... If I can't figure out how to run it correctly I will just go back to Whole Program Optimization.

Looks like the build time will be a lot longer. But, it was expected.. Need to check and see if VC express does this as well.
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: Compiling HEAD (currently 12931) Win XP VC9

Post by klauss »

pheonixstorm wrote:found the fix for the png issue.

The function name was changed after 1.29 This is not reflected in the VS code. In vsimage.cpp you will need to change line 326 from png_set_gray_1_2_4_to_8( png_ptr ); to png_set_expand_gray_1_2_4_to_8( png_ptr );
Actually, VS does use the new name, it was fixed in revision 12688, but later it was surrounded in ifdef win32 because, obviously, someone compiled for win32 and found he was using an old version of libpng.

If you're switching to the new one, the best thing would be to change the ifdef to check libpng versions.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: Compiling HEAD (currently 12931) Win XP VC9

Post by charlieg »

This underlines the importance of comments. Whoever implemented that ifdef should have commented on this in the code so it would not require klauss's explanation; it should already be there in the source.
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
Post Reply