Previous Thread  Next Thread

chat icon Building blender with CMake and MSVS 2012 64 bit

jamesharrycrowther

Posted: Mon Mar 18, 2013 11:26 am
Joined: 18 Mar 2013
Posts: 7
Hi! Very Happy

I have read a few posts on building blender with CMake and visual studio. It seems the guide to building blender is out of date since many links are now broken Sad

Nevertheless, I am posting to see if we can get building to work with MSVS 2012 express version. Reading the guide to building blender

http://wiki.blender.org/index.php/Dev:Doc/Building_Blender

there seems to be a warning that MSVS 2008 is the only supported version (see http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Windows/Environment) however that doesn't mean it won't work Wink

I have managed to compile all but 4 modules of the 64 bit version of blender using the following setup:

MS windows 7 Home Premium, build 6.1.7600
Microsoft Visual Studio Express 2012 for Windows Desktop - version
11.0.51106.01 Update 1
Python 3.3 64 bit with numpy 1.7.0 (32 bit, 64 bit isn't stable?)
Blender_SVN blender Head revision 55366
Blender_SVN lib win64 Head revision 55366
Cmake 2.8.10.2

So what went wrong??

check the output from VS below, it was generated after running Cmake with the recommended options from the wiki build guides (above) and then attempting to build the ALL_BUILD target in MSVS after opening the blender.sln file that CMake generates.

Code:

3>------ Build started: Project: bf_render, Configuration: Release x64 ------
4>------ Build started: Project: buildinfo, Configuration: Release x64 ------
3>cl : Command line warning D9002: ignoring unknown option '/arch:SSE'
3>  rayobject_svbvh.cpp
4>  Generating C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/creator/buildinfo.h
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
3>  rayobject_qbvh.cpp
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
3>  rayobject_vbvh.cpp
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
3>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
3>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
3>  Generating Code...
4>  -- Found Subversion: C:/Program Files/TortoiseSVN/bin/svn.exe (found version "1.7.8")
5>------ Build started: Project: extern_libmv, Configuration: Release x64 ------
5>cl : Command line warning D9002: ignoring unknown option '/arch:SSE'
5>  resect.cc
6>------ Build started: Project: ge_logic_ketsji, Configuration: Release x64 ------
6>cl : Command line warning D9002: ignoring unknown option '/arch:SSE'
6>  BL_BlenderShader.cpp
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
6>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
6>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
6>          C:/Users/James/Desktop/GOL/Crowdrender/Blender_SVN/blender/source/blender/blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
6>  KX_CameraActuator.cpp
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
6>  KX_NavMeshObject.cpp
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
6>  KX_SteeringActuator.cpp
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(170): warning C4005: 'bool' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(57) : see previous definition of 'bool'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(193): warning C4005: 'false' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(58) : see previous definition of 'false'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(228): warning C4005: 'true' : macro redefinition
6>          c:\users\james\desktop\gol\crowdrender\blender_svn\blender\source\blender\blenlib\BLI_utildefines.h(59) : see previous definition of 'true'
6>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xkeycheck.h(242): fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
6>  Generating Code...
5>  tracks.cc
5>  brute_region_tracker.cc
5>  esm_region_tracker.cc
5>  hybrid_region_tracker.cc
5>  klt_region_tracker.cc
5>  logging.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  raw_logging.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  utilities.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  vlog_is_on.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  Generating Code...
5>c:\users\james\desktop\gol\crowdrender\blender_svn\blender\extern\eigen3\eigen\src\core\matrix.h(311): fatal error C1001: An internal error has occurred in the compiler.
5>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 211)
5>   To work around this problem, try simplifying or changing the program near the locations listed above.
5>  Please choose the Technical Support command on the Visual C++
5>   Help menu, or open the Technical Support help file for more information
7>------ Build started: Project: blender, Configuration: Release x64 ------
7>cl : Command line warning D9002: ignoring unknown option '/arch:SSE'
7>  buildinfo.c
7>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\bf_render.lib'
8>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
8>  Build all projects
9>------ Skipped Build: Project: PACKAGE, Configuration: Release x64 ------
9>Project not selected to build for this solution configuration
10>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------
10>Project not selected to build for this solution configuration
========== Build: 3 succeeded, 4 failed, 115 up-to-date, 3 skipped ==========


Looks like some #errors were defined in xkeycheck.h, not sure why, anybody got any ideas on this? Wink

Also something is wrong with vector, which is odd since it appears to be part of MSVS, check the path to it in the output above.

A fatal error occurs in Matrix.h C1001

Lastly LNK1181 can;t open the input file (again see output above).


If I have left out any detail, reply to this post and I'll re run and post what you need. Be great to get this happening in MSVS2012! Very Happy Very Happy
Reply with quote


jaison

Posted: Tue Mar 19, 2013 11:48 am
Joined: 19 Mar 2013
Posts: 3
Exactly the same mistake I did too!

What is it? or how to fix it?

My System is
Windows7 32bit

and Visual Studio 2012 Ultimate

Cmake 2.8.10.2
Python version 3.3.0

TortoiseSVN:

https://svn.blender.org/svnroot/bf-blender/trunk/blender/
(C:\build\blender)
&
https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows/
(C:\build\lib\windows)
Reply with quote


jamesharrycrowther

Posted: Wed Mar 20, 2013 1:00 am
Joined: 18 Mar 2013
Posts: 7
Hi Jaison,
well, Im not sure exactly what the issue is since I am new to coding in blender and this is my first time trying to build it. I know that strictly speaking the MSVS2012 express package is not supported by blender, but it could work since not supported doesn't mean, won't work! Wink

I might try this week to compile the 32 bit version. At least that way we'll know whether these errors are due to either version or not. At the moment its not clear since, although you used the 32bit version of the source code, you have a slightly different set up to me. To be safe I think it would be wise for me to try it in 32bits and see what the difference is.
Reply with quote


jaison

Posted: Wed Mar 20, 2013 10:19 am
Joined: 19 Mar 2013
Posts: 3
Hi jamesharrycrowther,
My English is not exactly perfect, is still at work Wink I'm from Germany.

I can successfully compile it with cmake and MinGW. With Visual Studio 2012, but still not. Somehow a little odd.

But since it comes with MinGW.

I now see a few potential problems, either what is not in the VS2012 in properly, or it's the support on the part of the source.

Or else what is missing.

Hmm I look at me look around in the code and do some testing times.

There must be in any case a solution.

I'll tell you my results in any case. And I thank you for the effort
Reply with quote


jaison

Posted: Wed Mar 20, 2013 10:32 am
Joined: 19 Mar 2013
Posts: 3
Ok now has cmake for Visual Studio 11 (Configure) no more errors after I

http://sourceforge.net/projects/numpy/?source=dlp

Have installed. Generate is also error-free

SVN revision 55377
Reply with quote


stiv

Posted: Wed Mar 20, 2013 2:55 pm
Joined: 05 Aug 2003
Posts: 3645
There has been some discussion on the mailing list and the #blendercoders IRC channel about VS 2012. I confess I have not been following it closely but issues are with building some of the dependencies. Official builds are still done with VS 2008.

Also, I was under the impression the free versions of VS did not compile 64 bit Blender... but what do I know!

You might drop into the #blendercoders channel on freenode.net during the day (euro time) if you can.. Our Win guys are usually around then.
Reply with quote


shadowrom

Posted: Thu Mar 21, 2013 11:06 pm
Joined: 21 Mar 2013
Posts: 29
stiv wrote:
There has been some discussion on the mailing list and the #blendercoders IRC channel about VS 2012. I confess I have not been following it closely but issues are with building some of the dependencies. Official builds are still done with VS 2008.

Also, I was under the impression the free versions of VS did not compile 64 bit Blender... but what do I know!

You might drop into the #blendercoders channel on freenode.net during the day (euro time) if you can.. Our Win guys are usually around then.


I tried to compile blender with vc 2012 recently and everything went well with much fiddling around with CMakeLists and the generated sln Files.
I ended up in recompiling many dependencies like boost, oiio, openexr and so on...
I gave up after some time... I'll definately try again Wink
Reply with quote


jamesharrycrowther

Posted: Wed Mar 27, 2013 1:45 pm
Joined: 18 Mar 2013
Posts: 7
Hi all,
thanks to shadowrom and stiv for dropping in on this thread. I haven't checked out the #blendercoders channel yet, but I am sure I will be heading there soon Wink.

I think I have made some progress. Picked up on some issues others have been having with MSVS2012 in general. Seems that they are doing away with Macroising keywords. This was causing several projects in blender to have issues with the xkeycheck.h file which spat out errors because in other areas of blender, keywords are used in #defines.

The solution to this is to find each project that causes the error and then go to its properties, go to the preprocessor definitions and enter the following
_ALLOW_KEYWORD_MACROS

That will clear the C1083 errors associated with keywords and macros.

THIS is the interesting part, all remaining errors bar one error in bmo_edgeloop_fill.c are to do with MSVS include files.

What i am hoping is that I can track down why MS own files are not behaving properly and I think my chances are pretty good since I've already seen a lot of talk about this on the net.

I'll let you all know if I manage to compile. Also looking at trying MSVS2010 as well. Will let you all know how that turn out!

Smile
Reply with quote


shadowrom

Posted: Thu Apr 04, 2013 3:15 pm
Joined: 21 Mar 2013
Posts: 29
Alright, I had some time to retry this compilation today...

Problem is:

First I had to recompile boost, no problem at all ... But boost 1.49 is not a good idea with VC 2012, so I upgraded my buildenv to boost 1.53...

And that is where hell broke loose.
Several external dependencies rely on boost and are compiled with 1.49, so I gathered sources and startet to recompile some libs.

No. 1: OpenEXR and IlmBase (No prob, had so fiddle with the sln files a bit)
No. 2: zlib a bit tricky, but no prob in the end
No. 3: OIIO This lib is lame! I don't even get through the buggy CMake routine
Many other libs are a pain in the *** to compile under windows and even more when trying to compile on windows 64 bits with VC 2012.
I can get Blender to compile with VS 2012, I'm sure. But I need help with these externals, desperately.
Reply with quote


jamesharrycrowther

Posted: Fri Apr 05, 2013 5:37 am
Joined: 18 Mar 2013
Posts: 7
shadowrom wrote:
Alright, I had some time to retry this compilation today...

Problem is:

First I had to recompile boost, no problem at all ... But boost 1.49 is not a good idea with VC 2012, so I upgraded my buildenv to boost 1.53...

And that is where hell broke loose.
Several external dependencies rely on boost and are compiled with 1.49, so I gathered sources and startet to recompile some libs.

No. 1: OpenEXR and IlmBase (No prob, had so fiddle with the sln files a bit)
No. 2: zlib a bit tricky, but no prob in the end
No. 3: OIIO This lib is lame! I don't even get through the buggy CMake routine
Many other libs are a pain in the *** to compile under windows and even more when trying to compile on windows 64 bits with VC 2012.
I can get Blender to compile with VS 2012, I'm sure. But I need help with these externals, desperately.


Ok, time for an update. This is interesting, I have been having issues with boost too, but slightly different.

First updates on how I went with MSVC 2012 so far. After being able to clear the C1189 errors associated with bf_compositor, bf_render and ge_logic_ketsji projects (see above, sorry I mislabeled those errors as C1083, that was incorrect Smile ) I then ran into a whole bunch of other errors.

This time the errors come from extern_libmv. They are actually included in the first post in this thread. I finally tracked down the culprit. Its Microsoft, well, it might be Microsoft. The file that has the errors in there is "vector" (note there is no file extension). This file is located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include

I've included the errors from this specific problem below, system setup was the same as at the start of this thread.

Code:
>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  raw_logging.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  utilities.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)
5>  vlog_is_on.cc
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2143: syntax error : missing ';' before '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2059: syntax error : '<'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2916): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2059: syntax error : 'public'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2065: '_Alloc' : undeclared identifier
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2923: 'std::vector' : '_Alloc' is not a valid template type argument for parameter '_Alloc'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C3203: 'vector' : unspecialized class template can't be used as a template argument for template parameter '_Arg', expected a real type
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2917): error C2955: 'std::vector' : use of class template requires template argument list
5>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655) : see declaration of 'std::vector'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2143: syntax error : missing ';' before '{'
5>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(2918): error C2447: '{' : missing function header (old-style formal list?)


I haven't got past this point yet, so I'm wondering, Shadowrom, if you got further than this? If so, did you get the same errors as me relating to extern_libmv?


Pumped to see this knocked over!! Very Happy
Reply with quote


shadowrom

Posted: Fri Apr 05, 2013 7:01 am
Joined: 21 Mar 2013
Posts: 29
Hi James,

No I had the same issue with libmv. This seems to be a problem with c++ stdlib.

I decided to disable modules that produce errors in CMake and try to reenable them when I got blender to build without it.

I am trying to rebuild a decent build environment right now using this:
http://web.archiveorange.com/archive/v/1bjALfV0SeM8FeYQDmZu
Reply with quote


Gunhorin

Posted: Sun Apr 07, 2013 9:48 pm
Joined: 07 Apr 2013
Posts: 5
I managed to compile blender with visual studio 2012 express but not will all the Cmake WITH_* options turned on yet. I take it a step at a time, turn on some of the cmake WITH_* options and see whats missing. The first time I tried to compile it with all the options and with libs from the repository led to the above mentioned errors and even a compiler crash so it's better to take it one step at a time and compile as much dependenties as possible with vs2012 (especially dependencies that rely on stl library because there where heavy modifications to that library with c++11)

Right now I compiled some libraries from source and some I borrowed from the current blender lib/win64 repository. My plan is to compile everything from source later on to be on the safe side. I keep some notes while I go.

This is what I compiled from source:
SDL:
- version 1.2.15
- use x64 build and change type from .dll to .lib
- Change /MD to /MT
python:
- version 3.3
- copy PCbuild/pyconfig.h to include dir
pthreads:
- used cvs version: anonymous@sourceware.org:/cvs/pthreads-win32
- some files had wrong line breaks, had to open them and resave them before I could compile.
- changed /MD to /MT then nmake
- Make sure to use x64 visual studio command promp else you will get x86 libs
freetype:
- just compiled from source, version 2.4.11
boost:
- use version 1.53.0
- use the buil.bat file from the blender lib reposotory and change the 1_49_0 references to

1_53_0


And this is that I copied from blenders precompiled library repository:
- release dir
- jpeg
- png
- thumbhandler (the project file doesn't seem up to date on this at all)
- wintab (these are just headers)
- zlib

With these libraries you can compile blender with (at least) the following options:
WITH_BOOST
WITH_COMPOSITOR
WITH_FREESTYLE
WITH_GAMEENGINE
WITH_IK_ITASC
WITH_IK_SOLVER
WITH_MOD_BOOLEAN
WITH_MOD_FLUID
WITH_MOD_ECEANSIM
WITH_MOD_REFRESH
WITH_MOD_SMOKE
WITH_OPENMP
WITH_PYTHON_INSTALL
WITH_RAYOPTIMIZATION
WITH_SDL

Also some changed to the cmake files where needed.
- WITH_SDL option needed to link to dxguid.lib (added to the setup_liblink macro in build_files/cmale/macros.cmake)
- Changed boost to link to 1.53.0 instead of 1.49
- Added the _ALLOW_KEYWORD_MACROS define to the following projects: compositor, render and Ketji

About the errors in with the vector files. I haven't got to that yet and problem could be with Microsoft. But the vector class is heavily templated so while the compiler says the error in in the vector file it could be just wrong template instantiation going on somewhere.

My next plan is to compile some of the libraries I borrowed from blenders precompiled libraries repository and then try to get WITH_CYCLES to work. I don't have that much time (mosty only on weekends) so it could take a while before you see an update. I hope that if some other people got the other dependencies to compile with vs2012 they could post instructions here so we can get there a step at a time.
Reply with quote


shadowrom

Posted: Mon Apr 08, 2013 6:48 am
Joined: 21 Mar 2013
Posts: 29
I got Blender to compile too but hat linker errors at the end due to erroneous compilation of my dependencies.
Going to start over building my build environment with more caution... Sad
Cycles compiles fine with VS 2012 but for Cycles_Kernel_CUDA you'll need VS2010 or VS2008 installed and set the platform toolset to one of those in order to compile.
Reply with quote


jamesharrycrowther

Posted: Mon Apr 08, 2013 7:21 am
Joined: 18 Mar 2013
Posts: 7
Gunhorin wrote:
I managed to compile blender with visual studio 2012 express but not will all the Cmake WITH_* options turned on yet. I take it a step at a time, turn on some of the cmake WITH_* options and see whats missing. The first time I tried to compile it with all the options and with libs from the repository led to the above mentioned errors and even a compiler crash so it's better to take it one step at a time and compile as much dependenties as possible with vs2012 (especially dependencies that rely on stl library because there where heavy modifications to that library with c++11)

Right now I compiled some libraries from source and some I borrowed from the current blender lib/win64 repository. My plan is to compile everything from source later on to be on the safe side. I keep some notes while I go.

This is what I compiled from source:
SDL:
- version 1.2.15
- use x64 build and change type from .dll to .lib
- Change /MD to /MT
python:
- version 3.3
- copy PCbuild/pyconfig.h to include dir
pthreads:
- used cvs version: anonymous@sourceware.org:/cvs/pthreads-win32
- some files had wrong line breaks, had to open them and resave them before I could compile.
- changed /MD to /MT then nmake
- Make sure to use x64 visual studio command promp else you will get x86 libs
freetype:
- just compiled from source, version 2.4.11
boost:
- use version 1.53.0
- use the buil.bat file from the blender lib reposotory and change the 1_49_0 references to

1_53_0


And this is that I copied from blenders precompiled library repository:
- release dir
- jpeg
- png
- thumbhandler (the project file doesn't seem up to date on this at all)
- wintab (these are just headers)
- zlib

With these libraries you can compile blender with (at least) the following options:
WITH_BOOST
WITH_COMPOSITOR
WITH_FREESTYLE
WITH_GAMEENGINE
WITH_IK_ITASC
WITH_IK_SOLVER
WITH_MOD_BOOLEAN
WITH_MOD_FLUID
WITH_MOD_ECEANSIM
WITH_MOD_REFRESH
WITH_MOD_SMOKE
WITH_OPENMP
WITH_PYTHON_INSTALL
WITH_RAYOPTIMIZATION
WITH_SDL

Also some changed to the cmake files where needed.
- WITH_SDL option needed to link to dxguid.lib (added to the setup_liblink macro in build_files/cmale/macros.cmake)
- Changed boost to link to 1.53.0 instead of 1.49
- Added the _ALLOW_KEYWORD_MACROS define to the following projects: compositor, render and Ketji

About the errors in with the vector files. I haven't got to that yet and problem could be with Microsoft. But the vector class is heavily templated so while the compiler says the error in in the vector file it could be just wrong template instantiation going on somewhere.

My next plan is to compile some of the libraries I borrowed from blenders precompiled libraries repository and then try to get WITH_CYCLES to work. I don't have that much time (mosty only on weekends) so it could take a while before you see an update. I hope that if some other people got the other dependencies to compile with vs2012 they could post instructions here so we can get there a step at a time.



Hi Gunhorin, we have now found that turning off WITH_LIBMV in Cmake solves the issue with errors in the vector include file. We are now encountering a LOT of link errors and will be working on these. Also we think we can solve the issue with extern_libmv. We noticed that other projects in the blender solution use vector as an include file as well, but they do not generate any errors. So there is a way to solve this issue with extern_libmv. Basically it comes down to seeing what the differences are between the two projects (we did this using Beyond COmpare on the two MSVC project files that Cmake generates for extern_libmv and bf_compositor since the latter includes vector and compiles with no errors).
I am sure that there will be a difference either in include files or compile settings that is causing the issue, just have to find it.

As for the linker errors, yes, we are also looking at recompiling external libraries to solve these since it seems it has been a while since they were compiled (with respect to the libs that come with blender source, circa 2009?).

Will let you know how we get on.
Reply with quote


shadowrom

Posted: Mon Apr 08, 2013 7:47 am
Joined: 21 Mar 2013
Posts: 29
I'm glad to hear that I am not alone Wink
I think we should join forces on this instead of working all on our own.
Maybe we could find a way to share recompiled libraries and patches to cmakelists etc...
In the end we may be able to submit our changes to the blender SVN and provide a decent basis for future blender builds.
What do you guys think?
Reply with quote


Goto page 1, 2, 3, 4  Next
 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group