Trying to compile blender for windows with errors

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Trying to compile blender for windows with errors

Post by Napoleon » Sat Oct 01, 2005 5:37 am

I followed the instruction on http://www.blender3d.com/cms/Building_B ... 117.0.html to enable me compile blender. I use MSVC7, python 2.4 and i think i have setup the directories correctly ie c:\blenderdev with sub directories blender and lib. I run the file vcvars32.bat to set the environment. then i go into C:\blenderdev\blender and type scons -j 2 release.

What i get is the followin result:

C:\blenderdev\blender>scons -j 2 release
KeyError: 'BULLET_INCLUDE':
File "SConstruct", line 1093:
SConscript (bs_globals.root_build_dir+'source/SConscript')
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 557:
return apply(method, args, kw)
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 494:
return apply(_SConscript, [self.fs,] + files, {'exports' : exports})
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 226:
exec _file_ in call_stack[-1].globals
File "source\SConscript", line 8:
SConscript (['gameengine/SConscript'])
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 557:
return apply(method, args, kw)
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 494:
return apply(_SConscript, [self.fs,] + files, {'exports' : exports})
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 226:
exec _file_ in call_stack[-1].globals
File "source\gameengine\SConscript", line 4:
SConscript(['BlenderRoutines/SConscript',
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 557:
return apply(method, args, kw)
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 494:
return apply(_SConscript, [self.fs,] + files, {'exports' : exports})
File "C:\Python24\scons-0.96.91\SCons\Script\SConscript.py", line 226:
exec _file_ in call_stack[-1].globals
File "source\gameengine\BlenderRoutines\SConscript", line 49:
kx_blenderhook_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE'])


How do i resolve this error please. I really want to do this. I can build in Linux but windows is a pain.

Thanks

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Sat Oct 01, 2005 10:26 am

If you have an old config.opts, do remove it, and rerun.

/Nathan

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Sat Oct 01, 2005 8:58 pm

thanks jesterking, it at least started compiling this time but the compile terminated with the following output:

cl /nologo /EHsc /J /W3 /Gd /MT /Og /Ot /Ob1 /Op /G6 /TP /DWIN32 /D_CONSOLE /DWI
TH_QUICKTIME /D_LIB /DUSE_OPENAL /DFTGL_LIBRARY_STATIC /DGAMEBLENDER=1 /DUSE_SUM
O_SOLID /DNDEBUG /DNOGUI /DELBEEM_BLENDER=1 /IC:\blenderdev\lib\windows\png\incl
ude /IC:\blenderdev\lib\windows\zlib\include /IC:\blenderdev\lib\windows\sdl\inc
lude /c intern\elbeem\intern\cfglexer.cpp /FoC:\blenderdev\build\win32\intern\el
beem\intern\cfglexer.obj
cfglexer.cpp
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(116) : warning C4244:
'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(116) : warning C4244:
'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(116) : warning C4244:
'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(191) : warning C4244:
'initializing' : conversion from 'double' to 'gfxReal', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(192) : warning C4244:
'initializing' : conversion from 'double' to 'gfxReal', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(193) : warning C4244:
'initializing' : conversion from 'double' to 'gfxReal', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_material.h(198) : warning C4244:
'=' : conversion from 'double' to 'gfxReal', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_triangle.h(166) : warning C4244:
'return' : conversion from 'double' to 'gfxReal', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_renderglobals.h(340) : warning C4
305: 'initializing' : truncation from 'double' to 'float'
c:\blenderdev\blender\intern\elbeem\intern\ntl_renderglobals.h(361) : warning C4
244: 'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_renderglobals.h(361) : warning C4
244: 'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_renderglobals.h(361) : warning C4
244: 'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_bsptree.h(69) : error C4226: nons
tandard extension used : 'near' is an obsolete keyword
c:\blenderdev\blender\intern\elbeem\intern\ntl_bsptree.h(69) : error C4226: nons
tandard extension used : 'far' is an obsolete keyword
bld-std-gcc40/src/cfgparser.cpp(1238) : warning C4065: switch statement contains
'default' but no 'case' labels
bld-std-gcc40/src/cfgparser.cpp(1270) : warning C4065: switch statement contains
'default' but no 'case' labels
scons: *** [C:\blenderdev\build\win32\intern\elbeem\intern\cfgparser.obj] Error
2
src/cfglexer.ll(179) : warning C4244: '=' : conversion from 'double' to 'float',
possible loss of data
scons: building terminated because of errors.
----------------------------------------------------------------

I hope someone can help. I'm really determined to compile blender on windows for the first time.

Thankx

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Sun Oct 02, 2005 10:19 pm

can't find blender/extern/extern.sln or blender/intern/intern.sln

Where are they located please.

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Sun Oct 02, 2005 11:42 pm

well i found the two files and tried building ot with MSVC7 ie extern.sln, intern.sln then blender.sln. extern was okay but intern gave some errors so did blender.sln.

I thought blender is supposed to compile easily with VC7. Whst all this hassle?

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Mon Oct 03, 2005 8:03 pm

I need help here. Is blender compilation as easy as its made out to be in the how to's or there is some programming involved? Right now it goes like this:

On windows create c:\blenderdev and download the sources from cvs. This shold create two subdirectories blender and lib. With the Quick time sdk, scons installed and using MSVC7 installed, I go into c:\blenderdev\blender and type {scons release} hit enter and blender is supposed to compile creating the exe's.

What about the errors? or is my MSVC7 different from what others use? Anyway thanks oh and BTW i is use python 2.4.

Bye

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip » Mon Oct 03, 2005 8:46 pm

Is configure.opts set up correctly by default? I don't use msvc nor scons so I don't know for sure,

LetterRip

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Tue Oct 04, 2005 9:50 am

Perhaps getting a fresh checkout from CVS helps - I got the feeling that this might solve most of your problems. The projectfiles are of no use if you want to compile with SCons.

/Nathan

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Tue Oct 04, 2005 10:35 pm

well i have just downloaded fresh cvs sources and compiled but the error is the same. Can sombody who has compiled with MSVC7, Python 2.4 and Scons give me abit more detail as to how they go about compiling please.

Thnx

bjornmose
Posts: 0
Joined: Tue Nov 25, 2003 5:27 pm
Location: Denzenberg, could walk to Hölderling-Tower
Contact:

Post by bjornmose » Tue Oct 04, 2005 11:15 pm

Napoleon wrote: 244: 'argument' : conversion from 'double' to 'float', possible loss of data
c:\blenderdev\blender\intern\elbeem\intern\ntl_bsptree.h(69) : error C4226: nons
tandard extension used : 'near' is an obsolete keyword
c:\blenderdev\blender\intern\elbeem\intern\ntl_bsptree.h(69) : error C4226: nons
tandard extension used : 'far' is an obsolete keyword
bld-std-gcc40/src/cfgparser.cpp(1238) : warning C4065: switch statement contains
'default' but no 'case' labels
bld-std-gcc40/src/cfgparser.cpp(1270) : warning C4065: switch statement contains
'default' but no 'case' labels
scons: *** [C:\blenderdev\build\win32\intern\elbeem\intern\cfgparser.obj] Error
2
src/cfglexer.ll(179) : warning C4244: '=' : conversion from 'double' to 'float',
possible loss of data
scons: building terminated because of errors.
----------------------------------------------------------------


Thankx
You're sure your vcvars32.bat points to MSVC7 ?
What does 'set' say on the cmd line ?

I get the errors when i try to compile with mcvc6
which doesn't like *near* *far* and *switch statements' only having a default

how to fix it for mscv6
--> http://projects.blender.org/pipermail/b ... 11952.html
BM

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Wed Oct 05, 2005 12:42 am

I don't exactly know how to use the information provided in the link you supplied.

Yes it points to MSVC7 alright. I find it strange that there seem to be no solution to this problem. Well i better give up now.

thanx

ascotan
Posts: 0
Joined: Thu May 29, 2003 10:32 pm
Location: Maryland, U.S.

Post by ascotan » Wed Oct 05, 2005 9:27 pm

Your not techincally using msvc7 - your using scons with the vc7 compiler.

From your original post:
KeyError: 'BULLET_INCLUDE':
means that your accessing a dictionary with a key that doesn't exist.

File "source\gameengine\BlenderRoutines\SConscript", line 49:
kx_blenderhook_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE'])

Is the source of the error.

user_options_dict does not contain the key (as in key:value) 'BULLET_INCLUDE'. The file that contains this is in source/gameengine/BlenderRoutines/SConscript
which is an Scons build file.

KX_Blenderhook is attempting to add the source path to the bullet directory but the key:value for this is absent. I don't know if this resides in config.opts in your /blender directory or in the SConstruct file in the /blender directory.

I don't know who the maintainer is for SCons/vc7 but it doesn't appear to be upto date.

BTW - you should be able to build the entire appliction by running 'scons' from the /blender directory. The information regarding building /extern and /intern applies to those running the full version of msvc7 without scons. (at least i'm pretty sure).

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Sat Oct 08, 2005 1:34 pm

I am trying to set up the Visual Toolkit C++ 2003. On http://www.blender3d.com/cms/Microsoft_ ... 276.0.html step 6, i am supposd to download and compile lib.c from http://sapdb.2scale.net/moin.cgi/MS_20C_2b_2b_20Toolkit. However this file is missing from the page.

Where is an alternative download source please and also what will be the full command to compile lib.c.

Thanx

Napoleon
Posts: 0
Joined: Tue Jan 27, 2004 6:08 pm

Post by Napoleon » Sat Oct 08, 2005 11:00 pm

Okay i managed to get the lib.c file so i now have a working visual tolkit C++ 2003 build environment. How ever i still have errors when i build. It is still to do with conversion. Find below:

intern\string\STR_String.h(144) : warning C4244: 'initializing' : conversion fro
m 'double' to 'float', possible loss of data
source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp(161) : warning C4244: 'arg
ument' : conversion from 'MT_Scalar' to 'DT_Scalar', possible loss of data
source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp(167) : warning C4244: 'arg
ument' : conversion from 'double' to 'DT_Scalar', possible loss of data
source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp(189) : warning C4244: 'arg
ument' : conversion from 'double' to 'DT_Scalar', possible loss of data
source\gameengine\Physics\Bullet\CcdPhysicsEnvironment.h(7) : fatal error C1083:
Cannot open include file: 'SimdVector3.h': No such file or directory
scons: *** [C:\blenderdev\build\win32\source\gameengine\Ketsji\KX_ConvertPhysics
Objects.obj] Error 2
source\gameengine\Ketsji\KX_ConstraintActuator.cpp(75) : warning C4244: '=' : conversion from 'MT_Scalar' to 'float', possible loss of data
source\gameengine\Ketsji\KX_ConstraintActuator.cpp(76) : warning C4244: '=' : conversion from 'MT_Scalar' to 'float', possible loss of data
source\gameengine\Ketsji\KX_ConstraintActuator.cpp(285) : warning C4244: '=' : conversion from 'MT_Scalar' to 'float', possible loss of data
source\gameengine\Ketsji\KX_ConstraintActuator.cpp(327) : warning C4244: '=' : conversion from 'MT_Scalar' to 'float', possible loss of data
scons: building terminated because of errors.


This is really frustrating. How come for the same source code and compilation tool, some are able to compile and others can't.

bjornmose
Posts: 0
Joined: Tue Nov 25, 2003 5:27 pm
Location: Denzenberg, could walk to Hölderling-Tower
Contact:

Post by bjornmose » Sun Oct 09, 2005 3:52 pm

Napoleon,
you're almost there.
I don't have the file 'SimdVector3.h' in my tree. But it is only needed to compile the gameengine with the new bullet physics. So you can choose to compile without gameengine in your config.opts file or compile the gameengine with solid for physics.
To use the solid engine comment out #define USE_BULLET in the file KX_ConvertPhysicsObject.h

BM

Post Reply