Hi there, recently a few people have been complaining of MinGW failing to build blender.
While I fire up VirtualBox to test mingw once in a while, I didnt realize the default configuration would fail to build.
This morning I took a look into it and found cycles, libtiff and openexr dont work with Mingw at the moment, these are now disabled by default (for mingw only).
So nothing amazing but noticed people have been loosing time on this stuff so just a heads up you can follow these instructions to get a working windows build.
There are some weird issues new devs reported with Mingw so perhaps our troubleshooting section needs expanding, however someone who has the issues needs to resolve and document steps to fix (which is very much appretiated!).
Well it seems that some developers can get Mingw working with Cycles/Tiff/Exr, but not me. I get very cryptic linking errors even after clean mingw installs and setting my paths to point to mingw, updating lib/trunk, clearing local changes etc.
This is very strange since we both installed the same, latest mingw version - but I think I lost enough time on this already. (tracking down linking errors is not so hard but very slow on my VM so I will give it a miss for now :S )
My disabling of cycles/tiff/exr has been un-done.
Anyway, result of efforts is.
Some compiler warnings quieted.
Compiling with mingw older then 4.6 will give an error now
We know tiff/exr/cycles CAN cause problems but not yet why
Id really like to have this solved but cant justify spending more time on this so close to release when we have ~200 bugs open.
This is the error log incase anyone has more hints on whats going wrong:
ok, i dont have gcc 4.6 instead i tested with 4.7, i got this error:
scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> 'avi.c'
In file included from source\blender\avi\intern\avi.c:46:0:
source\blender\blenlib/BLI_winstuff.h:114:14: error: conflicting types for 'ssiz
e_t'
In file included from z:\development\compilers\mingw32\bin\../lib/gcc/i686-w64-m
ingw32/4.7.0/../../../../i686-w64-mingw32/include/stdlib.h:9:0,
from source\blender\avi\intern\avi.c:37:
z:\development\compilers\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../
../i686-w64-mingw32/include/_mingw.h:361:13: note: previous declaration of 'ssiz
e_t' was here
scons: *** [Z:\Development\blender\build\win32-mingw\source\blender\avi\intern\a
vi.o] Error 1
scons: building terminated because of errors.
hope it helps
i use windows 7 x64, scons, mingw32 with gcc 4.7.0.
Update: Antony Riakiotakis found the cause the issue I was having and its now resolved (Building works out of the box again!)
linking FFMPEG is needed for TIFF/EXR/CYCLES — This makes no sense and must be some strange mingw quirk - but at least its known and CMake gives function build, and unsupported options error out explaining why.
@bat3a, where did you get gcc 4.7 from? I tried the latest from mingw as of ~3 days ago and only got gcc4.6.2.
The error you get is strange and can probably be solved without editing the source by adding…
-D_SSIZE_T_
to your CMAKE_C_FLAGS and CMAKE_CXX_FLAGS
… this is a kludge, but I rather not try to make a patch unless I can test it.
where did you get gcc 4.7 from?
from HERE as the main site,specifically THIS folder, they even provide regular builds from mingw64, and many big project use them, BTW i mentioned this site on bf-commiters list before
-D_SSIZE_T_ to your CMAKE_C_FLAGS
as i said i tested with scons.
@bat3a, AFAIK mingw64 is not supported, expect minimum 3-5 dependencies need to be built for mingw64 before blender will build.
Your links are to the 64bit dir, in the 32bit dir I cant find gcc4.7, note that building GCC on win isnt so hard but I don’t have time for it atm.
As of two days ago my build platform isnt working anymore. I am on both a Win XP Pro 32 bit unit and a Win7 Pro 64 bit unit using MSVC 2008 (exp) + Scons. TortoiseSVN also. I am building 32 bit on both units.
I can confirm these oddities myself. I had to disable Cycles to be able to compile at the base level. I had suspicions about corrupted svn updates but I am not sure since ideasman42 seemed to have similar issues.