Build a development windows binary for from r12552

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).
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

Ok hashmap isn't a wrapper. Thanks to chucks hints I've found the history on it. Vegastrike is built with a "local" hashtable implementation. The problem is only part of it is local. It then gets mixed with the implementation provided by the compiler. Some of the functions being called are failing in various ways depending on which pieces I use from where.


There seems to be one implementation or another depending on what compiler is used. There is a gcc-4 compiler for mingw, I updaded to the "upcoming" version, but it kept gcc-3 as the compiler. Too bad, because it used an installer that would make the "instructions" MUCH simpler.

If that doesn't work I'm going to try porting a working implementation from my Linux system.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Build a development windows binary for from r12552

Post by chuck_starchaser »

I sent Klauss an email with a link to your post, yesterday; but I guess he's away
for the weekend.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

Klauss responded to this particular issue in a post a page or so back, although I didn't understand it fully. It's making more and more sense. I have added a MINGW definition that gets detected and set when your run configure in a mingw environment.

Klauss's response
http://vegastrike.sourceforge.net/forum ... 9#pr113403

I upgraded to gcc-4.4. I received a different series of errors. Same issue though, mingw uses a different implementation of hash_map than veagastrike does (or is using or not using _WIN32 when it shouldn't or should. I'm fairly sure _WIN32 is set.

I'm surprised that is compiles on Linux. I'm going to study the linux implementation as well. The differences should point me in the right direction.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Build a development windows binary for from r12552

Post by safemode »

I mentioned in another forum post regarding this hash_map issue. I updated VS's hash_map features to use unordered_map transparently a year and a half ago. Any modern build of VS uses this backend found in STL TR1

The old hash_map code was/is used by early (no longer supported) boost builds, but the mac port required for certain versions of Mac's OS since they lock developers into specific versions of software depending on the OS release.

I'm surprised the VC8 svn repo doesn't allow you to build VS ? is there a reason you're not using that for the win32 build and are instead using a mingw setup? Are you going for an all free win32 environment? If you're going that route with g++, you might as well do cmake too, as that would configure your setup automatically (perhaps with some minor search path updates) and keep you in line with the unix side of things.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Build a development windows binary for from r12552

Post by chuck_starchaser »

The thing is, though, compiling windows with visual studio stopped working waaay back,
like two years ago. The last visual that worked was VC7. Klauss doesn't have VC7 anymore,
and he just can't compile anymore.
I mean, compile yes. I could compile with vc8 in xp too. But the game running is another
story... It would crash inexorably. Even the current windows binary, which is pretty old,
has serious problems in Windows Vista. It actually runs best in Linux, under Wine :)
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

Nice to see the VS forum back up.

I replied to your posts on the PU forum.
http://wcjunction.com/phpBB2/viewtopic. ... highlight=

In summary:
VCC is broken as far as I know and I didn't like the idea of using it anyway. I understand the historical reasons it was used though. Yes the idea with MinGW is a free environment. I did install cmake, but learning it was beyond me, and finding the documentation has been difficult too.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

Making progress with the cmake switch. Might be getting all the detecting this week, and then attempting a build. It detected and reported the issues I was having with the autotools build attempt. It also detected a few more that I don't understand. It's like is parses the code and reports what you need to hunt down prior to compiling. Also you can output build files for various compilers. I'll post details when I get stuck.

I never did find GOOD documentation, but we can write our own. It ability to provide code portability is VASTLY superior to autotools. It is also simpler to get started in. I think there are areas where autotools can be more flexible, but I can't imagine that flexibility being needed. The complexity behind autotools' seeming flexabilty is astounding too.


DEBUGGING THE INSTRUCTIONS:
The build instructions are out of date. Package names and download locations have changed a-bit. Some sections are under-documented. I think I've installed things that aren't needed. I'm using them to set-up a build environment on my native Windows system when I get time on it.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Build a development windows binary for from r12552

Post by chuck_starchaser »

Any news, Jason? Cubemap-enabled shaders are already in, now, plus some revamped models to go with them. See the DDS cubemap enabled shaders release announcement in my ubershader thread. But the graphics updates can't be ported to PU until we can produce a windows binary; so we're on your hands now. ;-)
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

No progress lately, I herniated a disk in my back. I couldn't do anything other than lay in bed for 5 days. I'm getting to where I can sit in normal chairs, and walk for short periods of time again. It isn't a new injury, but I managed to flare it up SO bad that it's worse than when I did it three years ago.

I'm in the process of following safemode's suggestions. I'm switching to cmake for building vegastrike. I need to add a few non-standard search paths (like for tr1/unordered_map). Take into account that the flags for WIN32 should be considered to be for VCC. Attempt to build the program as if it was on a *nix system, then handle the "windows" specific code with a compiler specific flag for mingw. Eventually migrating the WIN32 flags to VCC flags or something. It would make the code compiler specific, someone wanting to build VS with VCC could. They could even do it using cmake.

I've also found some bugs in my documentation, before my "injury". I was using some release candidate versions in the mingw stack that aren't available any more. I'm replacing them with the full versions that have been released (and are much better), also the manual install of mingw isn't necessary anymore. The automatic installer will work just fine.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Build a development windows binary for from r12552

Post by pheonixstorm »

Ouch, glad to hear that you are starting to get better though. If you need a revised vc2008 solution to work from let me know. I'm about half done on creating the new solution/projects. I think when its all over it will be nice to have 2 diff build systems for win32. One easy for windows users and one for former linuxs user forced to use windows (for one reason or another).
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Build a development windows binary for from r12552

Post by chuck_starchaser »

JsnMtth wrote:No progress lately, I herniated a disk in my back. I couldn't do anything other than lay in bed for 5 days. I'm getting to where I can sit in normal chairs, and walk for short periods of time again. It isn't a new injury, but I managed to flare it up SO bad that it's worse than when I did it three years ago.
Damn! At least you're not alone around here; I had surgery last Tuesday, the 26th, and I'm still swimming in pain; gone through half my morphine pills; wondering what'll happen when they run out...
But at least I know this should be the end of an old problem, and that cheers me. Your problem is a lot more serious. Advice rarely does anything, be it good or bad; and disk hernias are not my specialty, but for whatever it may be worth, here's a few pieces:
  • Forget "no pain; no gain". BAD philosophy. Avoid pain and give it a chance to heal.
  • Good key nutrients for cartilage are chondritine and glucosamine sulphate. Gorge yourself with them; but don't expect results overnight; might take a week for a first noticeable difference; months for full healing.
  • If you're a smoker (1st or 2nd hand) you need to know that some nicotine ends up in the spine, in the interface between bone and cartilage, where it weakens the bond.
  • The other key ingredient for healing is HGH (Human Growth Hormone), whose production decreases with the fourth power of age; --but you can trick its release: As soon as you wake up, on an empty stomach, take about 5 grams (e.g. 10 500mg capsules) of aminoacid L-arginine, one or two grams of vitamin C, and a large chewable or effervescent mulivitamin/mineral supplement. Wait at least 1/2 hour before eating breakfast. Won't get you high, but the night following your doing that you'll get a big shot of HGH poroduced and released.
  • So, before you go to bed have a steak and/or a salmon filet (and that wraps up the nutrients list, with proteins and fatty acids.
  • Avoid: sugar, white rice, white bread, white noodles, corn syrup, peeled potatoes, soda drinks, packaged foods, TV dinners, ......
  • Once partially recovered, to accelerate the process you'll need more HGH, but using chemical tricks every time is not fun. best exercise for column disk --this may surprise you-- is Standing Calf Raises, on an exercise machine, with the weight on your shoulders. There's no clearer message you can send to your disks to get stronger than to press them with a few hundred pounds of force. And it's a lot safer than calisthenics or aerobics.
  • X-rays, NMR, and all that, works; and doctors know a thing or two sometimes; but NEVER listen to nutritionists or gym trainers.
I'm in the process of following safemode's suggestions. I'm switching to cmake for building vegastrike. I need to add a few non-standard search paths (like for tr1/unordered_map). Take into account that the flags for WIN32 should be considered to be for VCC. Attempt to build the program as if it was on a *nix system, then handle the "windows" specific code with a compiler specific flag for mingw. Eventually migrating the WIN32 flags to VCC flags or something. It would make the code compiler specific, someone wanting to build VS with VCC could. They could even do it using cmake.

I've also found some bugs in my documentation, before my "injury". I was using some release candidate versions in the mingw stack that aren't available any more. I'm replacing them with the full versions that have been released (and are much better), also the manual install of mingw isn't necessary anymore. The automatic installer will work just fine.
Sounds good.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

I hope you feel better chuck. Surgery sucks, it doesn't look like I NEED it, I can't afford it anyway.

I used to eat like that before I got married... Well very close to it, I didn't mess with the HGH production. I'm 32, never smoked, I tried some bicycling before it started raining here and it seemed to go well. I think I can do that exercise to suggested at the gym in our apartment, I'll have to go look at the machine.

What is in the steak and salmon that I should get? I can't afford to eat like that every-night, but I do get a good amount of protein and could supplement anything else. As far as the processed foods go, other than a recent coca-cola addiction, I avoid them. I generally eat a peanut-butter sandwich on whole wheat bread for lunch. cereal for breakfast (Corn Flaks, Bran Flaks and such). I've been thinking about switching to green smoothies instead. Dinner is usually whatever my wife plans, but we do eat-out (fast food) too much. Fast food didn't phase me in my 20's.

My big vice is coffee, about a pot a day.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

pheonixstorm wrote:Ouch, glad to hear that you are starting to get better though. If you need a revised vc2008 solution to work from let me know. I'm about half done on creating the new solution/projects. I think when its all over it will be nice to have 2 diff build systems for win32. One easy for windows users and one for former linuxs user forced to use windows (for one reason or another).
I would be glad to get some instructions and changes on how you built a windows binary. Could you open a topic on it and document the process? I think chuck has wiki access. I got a segfaulting build several months ago when I first started with the project on VCC9. I don't agree about having two different build as systems being a good thing though. However, if your interested in maintaining the project files and build documentation for a native VCC build, it can only help. Currently there is VCC6-7 projects and instructions, Code::blocks instructions, autotools instructions cmake instructions, also separate project files for many of them. The developers on the project didn't test their changes on the other platforms. As far as I know, it doesn't build on mac anymore either. I don't know anything about VCC other than my experience with a Borland compiler for windows 14 years ago.

My goal is to make building vegastrike on windows free (as in speech). I've used gcc, mingw, and msys to set-up a emulated unix environment on windows that can build native windows applications. Initially I've been looking at updating the autotools project files to do this. At safemode's request I've switched to cmake, besides the autotools project is a huge mess anyway. The big advantage about cmake is it will allow one set of project files to be able to build the application on many platforms and compilers. So theoretically it can output a vcc makefile, We could sure use your help in getting that to go. This would also open the door for building windows binaries on a Linux system, since the developers seem to concentrate on Linux. This would allow them to test a build on windows without having to reboot or virtualize.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Build a development windows binary for from r12552

Post by pheonixstorm »

Its a sham you can't rebuild wine using the vista sdk and the leaked win98 source code or win2k.. I know win98 leaked but i'm not positive 2k was leaked. I'm trying to put together what I have down so far to give you a better idea where i'm at and what i'm doing. Most of it is in my win32 compile thread on r12614 (12613 really) so you can skim that until I get something easier to follow posted here. As soon as I can svn access I will post what I have to a private branch till I'm sure it will work with the main trunk.

I would say we drop vc7/8 since you can't download either, but I know vc8 will be far easier to find for a toolchain that 7. I don't know If I will push code:blocks, probably tell em to use VC express or cmake as win builds. Its all up in the air atm until I can get VS to compile on 3 different machines. http://vegastrike.sourceforge.net/forum ... =5&t=15171
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Build a development windows binary for from r12552

Post by safemode »

jsnsmith, it's very important that we hammer out a compile using unix tools in windows at roughly the same version as what's available and in-use in unix land. This way, all the arch specific code can easily be differentiated from VC code and we can separate them clearly and that would _greatly_ help not just the porting of code and future maintenance but help the VC people as their special code may change version to version and they can play with that as much as they like without effecting our ability to compile without VC.

Really, if you and pheonixstorm could somehow work together towards that goal first, it would no doubt help your individual projects rather than doing it after the fact. As i'm sure fixing the WIN32 defines will effect the VC project that pheonixstorm is working on ...and the fixing will occur.
Ed Sweetman endorses this message.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

safemode wrote:jsnsmith, it's very important that we hammer out a compile using unix tools in windows at roughly the same version as what's available and in-use in unix land. This way, all the arch specific code can easily be differentiated from VC code and we can separate them clearly and that would _greatly_ help not just the porting of code and future maintenance but help the VC people as their special code may change version to version and they can play with that as much as they like without effecting our ability to compile without VC.

Really, if you and pheonixstorm could somehow work together towards that goal first, it would no doubt help your individual projects rather than doing it after the fact. As i'm sure fixing the WIN32 defines will effect the VC project that pheonixstorm is working on ...and the fixing will occur.
Your absolutely right. We're on the same page. I'm not going to purchase a license for VCC though. As long as there is an active willing developer to maintain the VCC side of things, I'll gladly collaborate with them. God knows I was wishing for someone with VCC expertise 6 months ago. But, then ... I probably would be working on something else.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Build a development windows binary for from r12552

Post by pheonixstorm »

safemode wrote:jsnsmith, it's very important that we hammer out a compile using unix tools in windows at roughly the same version as what's available and in-use in unix land. This way, all the arch specific code can easily be differentiated from VC code and we can separate them clearly and that would _greatly_ help not just the porting of code and future maintenance but help the VC people as their special code may change version to version and they can play with that as much as they like without effecting our ability to compile without VC.
Alot of what I get are compiler warnings such as

Code: Select all

1>E:\Visual Studio Express 9.0\VC\include\limits.h(28) : warning C4005: 'UCHAR_MAX' : macro redefinition
1>        e:\source directory\vegastrike\r12613\vegastrike\src\gldrv/winsys.h(23) : see previous definition of 'UCHAR_MAX'
many of these redefs come from different libraries and not from the game code. There are other warning that DO come from the game source but those will be for another time.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: Build a development windows binary for from r12552

Post by safemode »

pheonixstorm wrote:
safemode wrote:jsnsmith, it's very important that we hammer out a compile using unix tools in windows at roughly the same version as what's available and in-use in unix land. This way, all the arch specific code can easily be differentiated from VC code and we can separate them clearly and that would _greatly_ help not just the porting of code and future maintenance but help the VC people as their special code may change version to version and they can play with that as much as they like without effecting our ability to compile without VC.
Alot of what I get are compiler warnings such as

Code: Select all

1>E:\Visual Studio Express 9.0\VC\include\limits.h(28) : warning C4005: 'UCHAR_MAX' : macro redefinition
1>        e:\source directory\vegastrike\r12613\vegastrike\src\gldrv/winsys.h(23) : see previous definition of 'UCHAR_MAX'
many of these redefs come from different libraries and not from the game code. There are other warning that DO come from the game source but those will be for another time.


You need to compile a unix binary, look at the config.h generated by cmake or autoconf. These warnings are likely caused by your win32 build missing "HAS_" defines in config.h

edit: Probably "HAVE_" defines rather.
Ed Sweetman endorses this message.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Build a development windows binary for from r12552

Post by pheonixstorm »

Actually no, there are several of the libraries that actually do the redefs in code. Glut i think does this as does zlib i think.

jason, check my CMake thread. I think we should work in that one for a CMake build and leave this and my compile thread for actual build problems. If CMake actually works to create a build enviornment it would be great! So far though.. too many errors. BTW the last binary I created crashes on game load at hull1.bmp (again) griping about how vs has asked the vc9 runtime to terminate in an unusual way. I havent tried to track it down yet.. getting ready for a reformat. I'm thinking it could be a library conflict between versions. Just need to hurry up and get the new VC solution up.

BTW, I got cubemaps into the win build, just need to find out if they work. How goes your progress?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Build a development windows binary for from r12552

Post by chuck_starchaser »

pheonixstorm wrote:BTW, I got cubemaps into the win build, just need to find out if they work.
That's great news.
If you svn up the data folder, that updates your shaders to cubemap shaders; so they'll crap out if you don't have cubemaps in the engine. Fly to any system that has either a mining base, agri station or diplomatic center, and look at the reflections of the environment on the glass parts.
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: Build a development windows binary for from r12552

Post by JsnMtth »

@pheonixstorm - sounds good to me. I'll read through your thread and post my status (no news lately).
Post Reply