Build blender 2.71 in mingw and scons with gcc 4.6.2

Hey there,

I follow the steps from (http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Windows/MinGW/Scons) ,try to build blender2.71 in mingw/scons with gcc 4.6.2 but fail at “gcc/mingw32/4.6.2/include/xmmintrin.h”:


scons: `C:\BlenderDEV\build00\win32-mingw\lib\libbf_intern_cycles_sse2.a’ is up to date.
Compiling ==> ‘util_simd.cpp’
In file included from intern\cycles\util/util_optimization.h:107:0,
from intern\cycles\util/util_types.h:83,
from intern\cycles\util/util_simd.h:24,
from intern\cycles\util\util_simd.cpp:21:
c:\mingw\bin…/lib/gcc/mingw32/4.6.2/include/xmmintrin.h:32:3: error:#error “SSE instruction set not enabled” …

any suggestions?

Thanks a lot.

I’m getting the same problem with mingw 2.8.1

Edit: I made some changes to
blender\build_files\scons\config\win32-mingw.py lines 188 and 189

CCFLAGS = [ ‘-pipe’, ‘-funsigned-char’, ‘-fno-strict-aliasing’, ‘-msse’, ‘-msse2’]
CXXFLAGS = [’-msse’, ‘-msse2’]

this seems to repeat the BF_RAYOPTIMIZATION_SSE_FLAGS
but it took me to some new and more exciting compilation errors :stuck_out_tongue:

scons: `D:\blender-source\build\win32-mingw\lib\libextern_wcwidth.a’ is up to date.
Compiling ==> ‘logging.cc’
In file included from extern\libmv hird_party\glog\src\utilities.h:78:0,
from extern\libmv hird_party\glog\src\logging.cc:32:
extern\libmv hird_party\glog\src\windows/port.h:138:15: error: conflicting declaration ‘typedef DWORD pthread_t’
typedef DWORD pthread_t;

so I edited extern\libmv hird_party\glog\src\windows/port.h
I commented out everything under the //----------------THREADS comment and
I commented out the whole inline struct localtime_r

this brought me to the sad error:

Compiling ==> ‘btInternalEdgeUtility.cpp’
extern\bullet2\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp: In member function ‘virtual void btConnectivityProcessor: ProcessTriangle(btVector3*, int, int)’:
extern\bullet2\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp:310:2: internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://tdm-gcc.tdragon.net/bugs> for instructions.