diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-02 19:02:17 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-02 19:02:17 +0400 |
commit | 732c566f2fb5253c152b81ebbe76eb6a17862046 (patch) | |
tree | f63858393ec3b8f16dd7d9fcf2cfc251eaaf396b /build_files/scons/config | |
parent | 0fa08424b7a78bbf3fd6eb142d477feb0cca9806 (diff) |
Fix #35587: Cycles: image movie to single image crashing
Crash was happening on windows platforms only and was caused
by some specifics about how CRT works.
Basically, blender and all of the .dll are compiled with /MT
flag, which means blender.exe and all .dll are using separate
environments. This makes it impossible to pass file descriptors
from blender to other dll, because it becomes invalid in the dll.
And this is exactly what was happening: OIIO was trying to open
movie file with all known plugins and one of them was zlib. And
the way OIIO was using zlib API is opening the file using Boost
and passing a file descriptor to zlib. And since zlib was a
dynamic library this lead to general issues using this descriptor
in zlib code.
Solved by linking to zlib statically. This allows to safely pass
file descriptor to zlib API. Alternative would be to compile all
the stuff with /MD flag, but that's much bigger and less robust
way to fix the issue.
Tested on windows using msvc2008, scons plus cmake both 32 and 64
bit versions. Seems to be working fine.
Further tweaks for mingw and msvc2012 could be needed tho.
Diffstat (limited to 'build_files/scons/config')
-rw-r--r-- | build_files/scons/config/linuxcross-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/win32-mingw-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/win32-vc-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/win64-vc-config.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py index 925ca5bb889..5b958420f37 100644 --- a/build_files/scons/config/linuxcross-config.py +++ b/build_files/scons/config/linuxcross-config.py @@ -78,7 +78,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib' WITH_BF_ZLIB = True BF_ZLIB = LIBDIR + '/zlib' BF_ZLIB_INC = '${BF_ZLIB}/include' -BF_ZLIB_LIB = 'libz' +BF_ZLIB_LIB = 'libz_st' BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' WITH_BF_INTERNATIONAL = True diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py index be7198713b2..7e1dd3d10cf 100644 --- a/build_files/scons/config/win32-mingw-config.py +++ b/build_files/scons/config/win32-mingw-config.py @@ -78,7 +78,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib' WITH_BF_ZLIB = True BF_ZLIB = LIBDIR + '/zlib' BF_ZLIB_INC = '${BF_ZLIB}/include' -BF_ZLIB_LIB = 'libz' +BF_ZLIB_LIB = 'libz_st' BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' WITH_BF_INTERNATIONAL = True diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py index 955420c42a7..e43bb5336b8 100644 --- a/build_files/scons/config/win32-vc-config.py +++ b/build_files/scons/config/win32-vc-config.py @@ -82,7 +82,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib' WITH_BF_ZLIB = True BF_ZLIB = LIBDIR + '/zlib' BF_ZLIB_INC = '${BF_ZLIB}/include' -BF_ZLIB_LIB = 'libz' +BF_ZLIB_LIB = 'libz_st' BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' WITH_BF_INTERNATIONAL = True diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index ff77172b068..eb3533cdb8b 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -78,7 +78,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib' WITH_BF_ZLIB = True BF_ZLIB = LIBDIR + '/zlib' BF_ZLIB_INC = '${BF_ZLIB}/include' -BF_ZLIB_LIB = 'libz' +BF_ZLIB_LIB = 'libz_st' BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' WITH_BF_INTERNATIONAL = True |