Issues building blender and the BGE

Hi all,

I’ve been using C/C++ for over a year now and would like to have a go at toying with the BGE source, with the view of contributing later down the line. However, I’ve been trying to get Blender to build all day but I’ve had nothing but issues. I’ve been following the instructions on the wiki and have tried several times just to make sure that I’ve got everything right, but each time the results are the same.

I’m using cmake to create the build files (using the default setup as per the building blender guide), which works fine, but I can’t get a working copy of blender to compile. I’m running windows 7 65 bit, and can’t afford a full version of MSVC so all the versions I’ve tried are express.

I’ve used MSVC and 2010, 2011 beta and even minGW (I realise there’s a warning that it doesn’t work, but at this point I’m willing to try everything) but none of them actually produce blender.exe. Instead, the only output I get blender.pdb, makesdna.exe, makesdna.pdb, makesrna.pdb and makesrna.exe. MinGW complains about loads of unused variables so it’s impossible to find any helpful error messages, MSVC 2011 beta keeps saying that it cannot find loads of files with rna in the title. MSVC 2010 gives errors about a previously defined macro all relating to the file mscvprtd.lib.

I did manage to get Blender to build with MSVC 2008. However, the BGE keeps crashing, especially on exit. Furthermore, recast and detour don’t work, which is what I was planning on editing (I’ve not actually made any changes to the source code yet). Whenever I try and create a navmesh I just get errors in the console saying: “Error! Can’t find recast custom data” and “Can’t get vertices and indices from mesh” Does anyone have any ideas why the BGE might not be working and why recast and detour aren’t? According to the build log all the source files for recast and detour have compiled without issue.

I realise that I don’t have much information to give on what’s wrong, I really don’t know what to say, I’ve googled everything I can think of and there’s nothing that jumps out at me as a possible cause. If anyone’s got any requests for more info or error logs please let me know. Any help on resolving this, or guidance on beginning to troubleshoot would be greatly appreciated as I’m really going crazy-stressed over this!

Thanks in advance.

(on a somewhat unrelated note, as versions of MSVC get more recent the program takes longer to load and Blender longer to build!)

I have MSVC 2008 and MinGW working, MinGW should be able to build the BGE just fine.

But in VirtualBox in Arch Linux.

(Coming from a linux user take this with a grain of salt)

On windows I always find it incredibly difficult to troubleshoot problems like this, I have setup windows dev environments enough times - perhaps 8 or so, and offten got various different CRYPTIC error messages, which after hours of reading ended up being some header from an SDK that wasn’t documented as needed.,… or some DLL that only comes with an update.
Some of these issues took days to solve. :expressionless:

So I have updated the windows/cmake docs in the hope that others dont have these kinds of problems, adding notes on errors you may have when setting up a dev environment from a clean system.

But somehow windows seems to be a very poor build environment - Im sure its possible to setup correct but when it fails it fails baddly.

Suggest dual booting Linux and using this for dev.

This is my setup - http://wiki.blender.org/index.php/User:Ideasman42/CMakeQTCreatorLinux

Another reason to go with linux: http://markmail.org/message/xicneg3fm3nwfijy

Cheers for the input. I’d like to avoid the linux route if possible, but if all else fails then I’m going to give it a try. I’ve put in another day of compiling and threatening my laptop! At least this time I’ve gotten a tiny bit further and some error logs that might help in identifying the problem.

First off, I installed the windows 7.1 SDK so that I could use a 64bit compiler in MSVC express 2010. This meant that I could actually compile Blender in MSVC 2010, which it wouldn’t do yesterday. However, the same issues as compiling in MSVC 2008 exist: the BGE crashes on exit and recast & detour aren’t working. Again, the same message in the console about not being able to get or generate navmesh data. Furthermore, if I try and change the steering actuator behaviour with python the console pumps out error messages saying that the steering actuator has no attribute behaviour. Looking around on grahpicall, I’ve found a couple that have the same problems with the BGE.

How can I remove recast and detour from a build? Maybe that’s the cause of the BGE crash?

Here’s the log of warnings when compiling with MSVC express 2010 64bit (Blender builds, but the BGE is broken):
http://pastebin.com/5Jaz1sY7

Here’s the warnings when compiling with MSVC express 2008 32bit (Blender builds, but the BGE is broken):
http://pastebin.com/zUYCVHcx

EDIT: Here’s the warnings and errors when compiling with MSVC express 2010 32bit (Blender doesn’t build):
http://pastebin.com/xH8MKUUv

When building with mingw32 everything is fine up until it comes to putting together blender.exe then everything goes wrong. Here’s a screen shot of the stuff it prints out:


If anyone’s got time to scan through these and maybe see what I’m missing that would be a huge help.

Thanks again for any help/suggestions. I’ve been wanting to contribute to Blender for years, and now I finally feel I’m ready to get started it’s really frustrating to be hit by this stumbling block so early on.

EDIT: If I go the linux route, I’ll probably run it on Windows Virtual PC. Will that create any issues with the build environment?

I tried starting from scratch with a fresh copy of the repository and install of VC9 - sometimes reinstalling fixes things on windows. Still getting exactly the same errors. I’ve checked every step against all the guides I can find on the net and I’m still getting no where. I’ve also tried disabling/enabling various options in cmake, again, then same problem.

Furthermore, I’ve tried googling all the errors the different compilers kick up and found no real fixes (some searches return the error logs I put up on pastebin). So no help there.

I’m fast running out of things to try. Has anyone got any ideas?

To get mingw working, try disable every WITH_ option first, ofcourse many work, but just so you get something working - its a start.

as for running linux in a VM - it will work and I’ve know devs to do this to get access to some dev tools that only run on linux,
I have a few different OS’s on a VM for builing - so theres no problem with doing it, just wont get nicest experience/speed for dev.

edit: perhaps try install on an external USB hdd.

Cheers Ideasman! I’ll give that I try when I finish work, I’d much rather use mingw than MSVC. But I’m running windows 7 64 bit and the building guide on the wiki says that you can’t use mingw to do even a 32 bit build on a 64 bit system as it is highly unstable. I’ve found one post where someone claims they’ve had no issues, maybe I’ll get lucky!

I’ll look at using a VM at the weekend when I’ve got a bit more time.

I’ll also give dual booting some more consideration, looking on the blender.org forums there doesn’t seem much love for building on windows. My main concern is that I’m using a laptop and in the past whenever I’ve looked at running linux on my old laptop there seems to be a lot of issues with laptop specific drivers and getting it running.

my family has 3 laptops (not selected for linux compatibility) - and they all run ubuntu fine. this stuff can be hit and miss but is generally improving, suggest to google your model number and see if there are known driver issues - or just check a live CD works.

Right, I disabled everything in cmake and it finally compiled with mingw! :slight_smile: but when I open Blender it just crashes straight away saying a runtime had to close in an unusual way. I figured that something must be missing so I started adding things back into the build, one at a time. It was slow going however, I got it to compile with the following enabled:

  • CMAKE_GNUtoMS

  • WITH_GAMEENGINE

  • WITH_BULLET

  • WITH_PYTHONINSTALL
    Eventually, I could run Blender and the BGE seems stable - though I didn’t have much time to test it out fully. However, recast and detour still aren’t working. I get the same error messages in the console, saying:

  • Error! Can’t find recast custom data

  • Can’t get vertices and indices from mesh
    I’ve got visualisation enabled and the actors try to follow a path, and the path is within the confines of the navmesh, but the path they’re following is just a random mess. Also, any attempt to access the behaviour property of the steering actuator produces the error: KX_STEERING_ACTUATOR has no attribute behaviour. However, I can set the velocity through python and the seek and flee behaviours work fine.

I’ve come across other builds on graphicall with exactly the same problem. I think one of my next steps would be to contact who ever is responsible to for maintaining recast and detour in the BGE and see what they say. I can’t find any warnings that relate to recast and detour, so I’m at a loss as to what the problem might be. Any thoughts?

I’m going to continue adding one WITH_ option at a time to try and get as much functionality back as possible and narrow down the offending ones. Perhaps this might point me in the direction of what files my build environment is missing. Also, I came across a post where someone reported very similar linker warnings to what I’ getting when using Cmake. They solved the problem by simply using Scons, so I’m also going to give that a try.

I’ve also been doing some research around installing Linux on my laptop. The main issues seem to be around graphics drivers (ATI driveres, switchable graphics drives and particularly the Intel drivers), touch pad drivers and wireless drivers. I’m not too fussed about the touch pad as I rarely use it. Also, I mainly use the external graphics card, so getitng the Intel drivers working isn’t much of an issue. However, I do need the wireless working. I’m going to start out with VirtualBox and see how I get on before committing to a dual boot. I have a copy of Ubuntu on CD kicking around. But when I tried to install it on my other PC I had issues with the GRUB boot loader. Apparently some update caused it to break with new versions, there was a fix, but I could never get it to work.

Thanks again Ideasman for all your support! If you’ve got any other suggetions I’m happy to give them a try.

Happy days! :smiley:

The problem with the steering actuator is that something broken in the trunk at the moment. So I just grabbed a copy of the 2.62 release source and everything works fine. I’d love to be able to fix it, but I think it’s something a bit above me for the time being.

Removing most of the build options in Cmake allowed me to build Blender with minGW. I’ve slowly been adding them back in one at a time and I’ve got everything I need for the BGE to work. So far I’ve identified WITH_IMAGE_TIFF as an option that stops Blender building for me. I’m still having issues with all versions of MSVC, but I’d rather use minGW anyway, so I’m not bothered about trying to get Blender to compile with them.

I recently tried building Blender for the first time and have the same setup (windows 7 64, CMake, MinGW) and have a similar problem. For me it builds fine as long as Cycles and one or more of the Image options are disabled, I’m still trying to narrow down which Image options. The wiki says MSVC is needed for cycles, is that just for for the CUDA binaries or for cycles option itself? I only want to use cycles on the CPU.

I’m not sure, cycles built fine with MinGW for me. I couldn’t say about rendering options, I can only get CPU rendering working anyway even in official builds - I think it’s something to do with having an ATI graphics card.

I’m interested to hear what options cause your builds to fail.