Need a Windows 32bit SKIA dll

116 views
Skip to first unread message

leidos.n...@gmail.com

unread,
Nov 15, 2018, 12:15:48 PM11/15/18
to skia-discuss
Where can I find a recent Windows 32bit SKIA dll online? I searched everywhere for a recent version and could not find one. I have spent more than a week trying to build it on 32bit windows with Visual Studio and the toolchain provided and did not get far.

Thanks

Paul LeBeau

unread,
Nov 15, 2018, 1:40:10 PM11/15/18
to skia-discuss
I've been trying to build Skia on Windows today also.  I was able to build the x64 version no problem.  But am getting errors building for x86.

The build fails if target_cpu="x86". You get errors like the following:

..\depot_tools\ninja -C out\Win32

ninja: Entering directory `out\Win32'
[1/983] compile ../../third_party/externals/libjpeg-turbo/jaricom.c
FAILED: obj/third_party/externals/libjpeg-turbo/libjpeg.jaricom.obj
cmd /c C:/Program Files (x86)/Windows Kits/10/bin/SetEnv.cmd /x86 &&   "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC/Tools/MSVC/14.16.27023
/bin/HostX64/x86/cl.exe" /nologo /showIncludes /FC -DTURBO_FOR_WINDOWS -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNDEBUG "
-IC:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/include" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134
.0/shared" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um" "-IC:/Program
 Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt" -I../../third_party/libjpeg-turbo -I../../third_party/externals/libjpeg-turbo /w /bigobj /WX /utf-8 /O2
 /Zc:inline   /c ../../third_party/externals/libjpeg-turbo/jaricom.c /Foobj/third_party/externals/libjpeg-turbo/libjpeg.jaricom.obj /Fd"obj/third_party/libjpeg-
turbo/libjpeg_c.pdb"
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.

I don't seem to have a SetEnv.cmd in my C:/Program Files (x86)/Windows Kits/10/bin/


The gn cmd line I am using is:

.\bin\gn gen out\Win32 --args="is_official_build=true is_component_build=true skia_use_system_expat=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_icu=false skia_use_sfntly=false skia_use_piex=true skia_use_dng_sdk=false skia_enable_tools=false win_vc="""C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC""" target_os="""win""" target_cpu="""x86""" "


Also I am building on Windows 7. If that makes a difference.


Mike Klein

unread,
Nov 15, 2018, 1:43:29 PM11/15/18
to skia-d...@googlegroups.com
Yeah, I'm sorry, we basically don't support building 32-bit Skia for Windows.  It's not that it's impossible, it's just that it's difficult for us to maintain in GN given the way MSVC's toolchains work, and we don't have a lot of active users for that particular configuration.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

leidos.n...@gmail.com

unread,
Nov 15, 2018, 5:35:49 PM11/15/18
to skia-discuss
With 32bit I got farther along. I managed to get it to create a Visual Studio 2015 all.sln solution file. I needed to add depot_tools/bin to the system PATH variable. This allows it to know what ninja.exe is. Some of the components required me to edi the .ninja file by adding zlib. It seems they could not find zlib.h. I am stuck linking skia.dll. It complains that z.obj is missing. If I remove that it complains expat.obj is missing. If I remove that then it throws 32 linker errors.

1>  cmd /c C:\toolchain\depot_tools\win_toolchain\vs_files\5454e45bf3764c03d3fc1024b3bf5bc41e3ab62c\win_sdk/bin/SetEnv.cmd /x86 &&  C:\toolchain\depot_tools\win_toolchain\vs_files\5454e45bf3764c03d3fc1024b3bf5bc41e3ab62c\VC/Tools/MSVC/14.14.26428/bin/HostX64/x86/link.exe /nologo /IMPLIB:./skia.dll.lib /DLL /OUT:./skia.dll /PDB:./skia.dll.pdb @./skia.dll.rsp
1>     Creating library ./skia.dll.lib and object ./skia.dll.exp
1>pdf.SkDeflate.obj : error LNK2019: unresolved external symbol _Cr_z_deflate referenced in function "void __cdecl do_deflate(int,struct z_stream_s *,class SkWStream *,unsigned char *,unsigned int)" (?do_deflate@@YAXHPAUz_stream_s@@PAVSkWStream@@PAEI@Z)
1>libpng.pngwutil.obj : error LNK2001: unresolved external symbol _Cr_z_deflate
1>pdf.SkDeflate.obj : error LNK2019: unresolved external symbol _Cr_z_deflateEnd referenced in function "public: virtual __thiscall SkDeflateWStream::~SkDeflateWStream(void)" (??1SkDeflateWStream@@UAE@XZ)
1>libpng.pngwrite.obj : error LNK2001: unresolved external symbol _Cr_z_deflateEnd
1>libpng.pngwutil.obj : error LNK2001: unresolved external symbol _Cr_z_deflateEnd
1>pdf.SkDeflate.obj : error LNK2019: unresolved external symbol _Cr_z_deflateInit2_ referenced in function "public: __thiscall SkDeflateWStream::SkDeflateWStream(class SkWStream *,int,bool)" (??0SkDeflateWStream@@QAE@PAVSkWStream@@H_N@Z)
1>libpng.pngwutil.obj : error LNK2001: unresolved external symbol _Cr_z_deflateInit2_
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_ParserCreate_MM referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_SetEntityDeclHandler referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_SetElementHandler referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_SetCharacterDataHandler referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_SetUserData referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_GetBuffer referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_ParseBuffer referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_StopParser referenced in function "void __cdecl `anonymous namespace'::entity_decl_handler(void *,char const *,int,char const *,int,char const *,char const *,char const *,char const *)" (?entity_decl_handler@?A0x9c883764@@YAXPAXPBDH1H1111@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_GetErrorCode referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_GetCurrentLineNumber referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_GetCurrentColumnNumber referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_ParserFree referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>xml.SkXMLParser.obj : error LNK2019: unresolved external symbol __imp__XML_ErrorString referenced in function "public: bool __thiscall SkXMLParser::parse(class SkStream &)" (?parse@SkXMLParser@@QAE_NAAVSkStream@@@Z)
1>libpng.png.obj : error LNK2019: unresolved external symbol _Cr_z_inflateReset referenced in function _png_reset_zstream
1>libpng.pngrutil.obj : error LNK2001: unresolved external symbol _Cr_z_inflateReset
1>libpng.png.obj : error LNK2019: unresolved external symbol _Cr_z_adler32 referenced in function _png_compare_ICC_profile_with_sRGB
1>libpng.png.obj : error LNK2019: unresolved external symbol _Cr_z_crc32 referenced in function _png_calculate_crc
1>libpng.pngread.obj : error LNK2019: unresolved external symbol _Cr_z_inflateEnd referenced in function _png_destroy_read_struct
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflate referenced in function _png_inflate
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflateReset2 referenced in function _png_inflate_claim
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflateInit2_ referenced in function _png_inflate_claim
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflateValidate referenced in function _png_inflate_claim
1>libpng.pngwutil.obj : error LNK2019: unresolved external symbol _Cr_z_deflateReset referenced in function _png_deflate_claim
1>./skia.dll : fatal error LNK1120: 25 unresolved externals
1>  ninja: build stopped: subcommand failed.

Shawn Riordan

unread,
Nov 16, 2018, 12:48:20 AM11/16/18
to skia-discuss
Can you switch to msvc 2017?
It isn't a complete fix, but it can help.

Shannon Byrne

unread,
Nov 16, 2018, 12:47:17 PM11/16/18
to skia-d...@googlegroups.com
We cannot switch to VS 2017. We get linker errors from zlib it seems. Do you know what library contains these functions it cannot find?

1>pdf.SkDeflate.obj : error LNK2019: unresolved external symbol _Cr_z_deflate referenced in function "void __cdecl do_deflate(int,struct z_stream_s *,class SkWStream *,unsigned char *,unsigned int)" (?do_deflate@@YAXHPAUz_stream_s@@PAVSkWStream@@PAEI@Z)
1>libpng.pngwutil.obj : error LNK2001: unresolved external symbol _Cr_z_deflate
1>pdf.SkDeflate.obj : error LNK2019: unresolved external symbol _Cr_z_deflateEnd referenced in function "public: virtual __thiscall SkDeflateWStream::~SkDeflateWStream(void)" (??1SkDeflateWStream@@UAE@XZ)
1>libpng.pngwrite.obj : error LNK2001: unresolved external symbol _Cr_z_deflateEnd
1>libpng.pngwutil.obj : error LNK2001: unresolved external symbol _Cr_z_deflateEnd
1>pdf.SkDeflate.obj : error LNK2019: unresolved external symbol _Cr_z_deflateInit2_ referenced in function "public: __thiscall SkDeflateWStream::SkDeflateWStream(class SkWStream *,int,bool)" (??0SkDeflateWStream@@QAE@PAVSkWStream@@H_N@Z)
1>libpng.pngwutil.obj : error LNK2001: unresolved external symbol _Cr_z_deflateInit2_
1>libpng.png.obj : error LNK2019: unresolved external symbol _Cr_z_inflateReset referenced in function _png_reset_zstream
1>libpng.pngrutil.obj : error LNK2001: unresolved external symbol _Cr_z_inflateReset
1>libpng.png.obj : error LNK2019: unresolved external symbol _Cr_z_adler32 referenced in function _png_compare_ICC_profile_with_sRGB
1>libpng.png.obj : error LNK2019: unresolved external symbol _Cr_z_crc32 referenced in function _png_calculate_crc
1>libpng.pngread.obj : error LNK2019: unresolved external symbol _Cr_z_inflateEnd referenced in function _png_destroy_read_struct
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflate referenced in function _png_inflate
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflateReset2 referenced in function _png_inflate_claim
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflateInit2_ referenced in function _png_inflate_claim
1>libpng.pngrutil.obj : error LNK2019: unresolved external symbol _Cr_z_inflateValidate referenced in function _png_inflate_claim
1>libpng.pngwutil.obj : error LNK2019: unresolved external symbol _Cr_z_deflateReset referenced in function _png_deflate_claim
1>./skia.dll : fatal error LNK1120: 12 unresolved externals
1>  ninja: build stopped: subcommand failed.

Jake

unread,
Nov 19, 2018, 12:31:39 AM11/19/18
to skia-discuss
I was able to get skia 32 bit to build successfully using the vs2017 tools. I built it as a dll - you might be able to use it in a vs2015 project.

I tried to build using vs2015 but I was getting all kinds of language errors (constexpr related).

Jake

unread,
Nov 19, 2018, 2:24:17 AM11/19/18
to skia-discuss
I was able to build and execute the SkiaSDLExample.cpp example using the toolchain from vs 2015, skia.dll built with vs 2017 and sdl, all 32 bit.

I had to export a couple of skia symbols from skia.dll to get the example to run (it uses private apis). This was the only real issue I had.



On Friday, November 16, 2018 at 10:47:17 AM UTC-7, Shannon Byrne wrote:

Shannon Byrne

unread,
Nov 21, 2018, 10:20:53 AM11/21/18
to skia-d...@googlegroups.com
I eventually got it to build. It needs to be configured to not use the system zlib or expat.

Andrew Ivasiv

unread,
Nov 22, 2018, 10:57:42 AM11/22/18
to skia-discuss
Hello, I am trying to build a 32bit skia library and I am getting this error

FAILED: obj/src/gpu/gpu_for_real.GrAHardwareBufferImageGenerator.obj
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC/Tools/MSVC/14.16.27023/bin/HostX64/x86/cl.exe" /nologo /showIncludes /FC -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNDEBUG -DSKIA_DLL -DSK_GAMMA_APPLY_TO_A8 -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSK_ENABLE_DISCRETE_GPU -DSKIA_IMPLEMENTATION=1 "-IC:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/include" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um" "-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt" -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/docs -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu /bigobj /WX /utf-8 /O2 /Zc:inline  /GR- /c ../../src/gpu/GrAHardwareBufferImageGenerator.cpp /Foobj/src/gpu/gpu_for_real.GrAHardwareBufferImageGenerator.obj /Fd"obj/gpu_for_real_c.pdb"
c1xx: fatal error C1356: unable to find mspdbcore.dll

I configured this with the following command:

gn gen out/Release-32-dll --args="is_official_build=true is_component_build=true target_cpu=\"x86\" skia_enable_tools=false skia_use_dng_sdk=false skia_use_expat=false skia_use_icu=false skia_use_libwebp=false skia_use_system_libjpeg_turbo=false skia_use_libjpeg_turbo=true skia_use_system_libpng=false skia_use_libpng=true skia_use_sfntly=false skia_use_zlib=false skia_use_system_zlib=false skia_use_piex=false win_vc="""C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC""""

did you encounter a similar error? The dll is present in the C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC/Tools/MSVC/14.16.27023/bin/HostX86/x86/ folder but copying it to the .../HostX64/x86/ folder still gives an error

Shawn Riordan

unread,
Nov 22, 2018, 11:01:48 AM11/22/18
to skia-discuss
Are you using a 2015 developer's console?

Andrew Ivasiv

unread,
Nov 22, 2018, 12:12:53 PM11/22/18
to skia-discuss
Thanks for the tip. I was using the native x64 VS2017 dev prompt when I had to use x86_x64 cross tools prompt. It is building now in that prompt.

leidos.n...@gmail.com

unread,
Nov 26, 2018, 12:54:42 PM11/26/18
to skia-discuss
I got this error and resolved it. You cannot copy the dll in to that folder and get it to work because that dll is 64bit and the cl.exe is 32bit. To compile and link the 32bit version of SKIA you should use the cl.exe and link.exe located in the folder .../HostX64/x86/

leidos.n...@gmail.com

unread,
Nov 26, 2018, 12:55:16 PM11/26/18
to skia-discuss


On Thursday, November 15, 2018 at 12:15:48 PM UTC-5, leidos.n...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages