Building skia under windows7 with VS2015 Problems & Questions

1,370 views
Skip to first unread message

Wanderer

unread,
Apr 16, 2017, 9:14:09 AM4/16/17
to skia-discuss
Hello
I am on win7 64bit and want use skia for my c++ application. I am beginer and git and depot_tools are new for me. I watching some tutorials for git, but still I have problems to get sln from depot_tools.

Is build instruction for how to build skia completed, or not? I follow all instruction but I was forced my own searching and by trail and error with install depot tools and what is going wrong. For example before run gclient I need install some git inside depot_tools folder, then runing gclient works ok.

bin/gn gen out/Static --args='is_official_build=true'

doesn't work until I go inside bin folder and run this code:
 gn gen out/Static --args="s_official_build=true"

code:
ninja -C out/Static

do something, but I get this:
ninja: Entering directory `out/Static'
[1/679] compile ../../../src/opts/SkOpts_avx.cpp
FAILED: obj/src/opts/avx.SkOpts_avx.obj
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo
/showIncludes /FC @obj/src/opts/avx.SkOpts_avx.obj.rsp /c ../../../src/opts/SkOp
ts_avx.cpp /Foobj/src/opts/avx.SkOpts_avx.obj /Fd"obj/avx_c.pdb"
CreateProcess failed: The system cannot find the file specified.
[2/679] compile ../../../src/c/sk_effects.cpp
FAILED: obj/src/c/effects.sk_effects.obj
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo
/showIncludes /FC @obj/src/c/effects.sk_effects.obj.rsp /c ../../../src/c/sk_eff
ects.cpp /Foobj/src/c/effects.sk_effects.obj /Fd"obj/effects_c.pdb"
CreateProcess failed: The system cannot find the file specified.
[3/679] compile ../../../src/effects/GrCircleBlurFragmentProcessor.cpp
FAILED: obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo
/showIncludes /FC @obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj.rsp
 /c ../../../src/effects/GrCircleBlurFragmentProcessor.cpp /Foobj/src/effects/ef
fects.GrCircleBlurFragmentProcessor.obj /Fd"obj/effects_c.pdb"
CreateProcess failed: The system cannot find the file specified.
ninja: fatal: ReadFile: PopisovaŔ nie je platnř.

I tried instruction for windows, but without help
python infra/bots/assets/win_toolchain/download.py -t C:/toolchain
I got error that I am not loged, and I need run cipd.bat, after run it show me some very long url and ask for activation code, but url doesn't work. (404 error page)

code:
 python gn/gn_meta_sln.py

give me this error:
ERROR: At least one GN directory must have been built with --ide=vs
and I have no clue what to do.
there are not lots of instruction inside how to build skia. They expected there are users with knowledge of depot_tools.

Is there way get skia without depot_tools? Like simple sln project or compiled dll files? Or are there more detailed instruction step by step how to prepare and build skia for windows 7 ? (with error solutions, if any appear)
I lost several days with searching and learning, but without any solutions, and I try it with this way. Thanks.

Hal Canary

unread,
Apr 16, 2017, 6:31:10 PM4/16/17
to skia-discuss
Which shell are you using?  Bash?  Cmd?  Powershell?  Our documentation assumes a posix-sh-like shell.

--
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+unsubscribe@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.

Hal Canary

unread,
Apr 16, 2017, 6:35:41 PM4/16/17
to skia-discuss
So, for instance, in Cmd.exe, you would do this:

    bin\gn.exe gen out\Static "--args=is_official_build=true"

instead of

    bin/gn.exe gen out/Static '--args=is_official_build=true'

in bash.

Wanderer

unread,
Apr 17, 2017, 4:30:22 AM4/17/17
to skia-discuss
I use cmd from git (git-cmd.exe)

Dňa pondelok, 17. apríla 2017 0:31:10 UTC+2 Hal Canary napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.

Cary Clark

unread,
Apr 17, 2017, 7:44:03 AM4/17/17
to skia-d...@googlegroups.com
I have had recent success using the cmd shell with admin privileges to install depot_tools. Once installed, I switch to git-bash for day to day work, although the cmd shell still works fine. I did not need to install git inside a depot_tools instruction or otherwise stray from the depot_tools installation steps. I am on Windows 7 64-bit.

I recommend starting over by deleting depot_tools and reinstalling from the steps on https://www.chromium.org/developers/how-tos/install-depot-tools using cmd with admin privileges.

Good luck!

Cary


To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.

Hal Canary

unread,
Apr 17, 2017, 9:54:06 AM4/17/17
to skia-discuss
You probably also have to set the `windk` variable in your `args.gn` file.  For me it looks like this:

    windk = "C:/dev/toolchain/depot_tools/win_toolchain/vs_files/d3cb0e37bdd120ad0ac4650b674b09e81be45616"

Since I installed my toolchain in "C:\dev\toolchain".


On Sun, Apr 16, 2017 at 9:14 AM, Wanderer <woi...@gmail.com> wrote:

--

Mike Klein

unread,
Apr 17, 2017, 10:03:03 AM4/17/17
to skia-discuss
If you installed Visual Studio in the normal location you don't have to change the default windk,
  "C:/Program Files (x86)/Microsoft Visual Studio 14.0".

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.

--
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.

Wanderer

unread,
Apr 18, 2017, 6:43:42 AM4/18/17
to skia-discuss
Thanks for tip. I start with new depot_tools instalation, run cmd with admin privileges and it start without problem until this error:
      1 [main] sh 2136 child_info::sync: wait failed, pid 1164, Win32 error 183
   
208 [main] sh 2136 fork: child 1164 - died waiting for dll loading, errno 11


/mingw64/libexec/git-core/git-sh-setup: fork: retry: Resource temporarily unavai
lable
301061698 [main] sh 2136 child_info::sync: wait failed, pid 320, Win32 error 183


301061960 [main] sh 2136 fork: child 320 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-setup: fork: retry: Resource temporarily unavailable
603143514 [main] sh 2136 child_info::sync: wait failed, pid 5584, Win32 error 183
603144023 [main] sh 2136 fork: child 5584 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-setup: fork: retry: Resource temporarily unavailable
907209569 [main] sh 2136 child_info::sync: wait failed, pid 5612, Win32 error 183
907211680 [main] sh 2136 fork: child 5612 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-setup: fork: retry: Resource temporarily unavailable
1215508751 [main] sh 2136 child_info::sync: wait failed, pid 5168, Win32 error 183
1215513329 [main] sh 2136 fork: child 5168 - died waiting for dll loading, errno 11
/mingw64/libexec/git-core/git-sh-setup: fork: Resource temporarily unavailable
Failed to update depot_tools.

I forgot mention, it was happend on all times when I tried install depot_tools.


Dňa pondelok, 17. apríla 2017 13:44:03 UTC+2 Cary Clark napísal(-a):

Cary Clark

unread,
Apr 18, 2017, 8:30:19 AM4/18/17
to skia-d...@googlegroups.com
I have not seen this error.

You may want to check out this Microsoft article:

Also, you may wish to take your question to chromium since depot_tools isn't maintained by skia.
Check https://groups.google.com/a/chromium.org/forum/#!forum/chromium-dev to see if someone else is having your problem installing depot_tools.
Check crbug.com for an existing similar bug; if there isn't one, file a new one.



To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.

Wanderer

unread,
Apr 26, 2017, 12:45:06 PM4/26/17
to skia-discuss
I think, instalation depot_tools is resolved, and trying build skia. As I wrote before, I got this messages when I run 
ninja -C out/Static
ninja
: Entering directory `out/Static'

[1/679] compile ../../../src/opts/SkOpts_avx.cpp
FAILED: obj/src/opts/avx.SkOpts_avx.obj
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo/showIncludes /FC @obj/src/opts/avx.SkOpts_avx.obj.rsp /c ../../../src/opts/SkOpts_avx.cpp /Foobj/src/opts/avx.SkOpts_avx.obj /Fd"obj/avx_c.pdb"

CreateProcess failed: The system cannot find the file specified.
[2/679] compile ../../../src/c/sk_effects.cpp
FAILED: obj/src/c/effects.sk_effects.obj
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo/showIncludes /FC @obj/src/c/effects.sk_effects.obj.rsp /c ../../../src/c/sk_effects.cpp /Foobj/src/c/effects.sk_effects.obj /Fd"obj/effects_c.pdb"

CreateProcess failed: The system cannot find the file specified.
[3/679] compile ../../../src/effects/GrCircleBlurFragmentProcessor.cpp
FAILED: obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo/showIncludes /FC @obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj.rsp

 /c ../../../src/effects/GrCircleBlurFragmentProcessor.cpp /Foobj/src/effects/ef
fects.GrCircleBlurFragmentProcessor.obj /Fd"obj/effects_c.pdb"
CreateProcess failed: The system cannot find the file specified.
ninja: fatal: ReadFile: PopisovaŔ nie je platnř.

Then I remember that I have VS installed on D:Programi\Visual Studio 2015\

I looked on the out\Static directory and discover that ninja files have bad path for visual studio. I tried change this manulay for toolchain.ninja file and try run ninja -C out/Static
I got this:
ninja: Entering directory `out\Static'
[4/679] compile ../../src/effects/Sk1DPathEffect.cpp
FAILED: obj/src/effects/effects.Sk1DPathEffect.obj
D:\Programi\Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.Sk1DPathEffect.obj.rsp /c ../../src/effects/Sk1DPathEffect.cpp /Foobj/src/effects/effects.Sk1DPathEffect.obj /Fd"obj/effects_c.pdb"
c:\program files (x86)\windows kits\10\include\10.0.10150.0\ucrt\corecrt.h(10):
fatal error C1083: Cannot open include file: 'vcruntime.h': No such file or directory
[5/679] compile ../../src/c/sk_effects.cpp
FAILED: obj/src/c/effects.sk_effects.obj
D:\Programi\Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/c/effects.sk_effects.obj.rsp /c ../../src/c/sk_effects.cpp /Foobj/src/c/effects.sk_effects.obj /Fd"obj/effects_c.pdb"
d:\programi\development\depot_tools\skia\include\c\sk_types.h(14): fatal error C
1083: Cannot open include file: 'stdint.h': No such file or directory
[6/679] compile ../../src/effects/Sk2DPathEffect.cpp
FAILED: obj/src/effects/effects.Sk2DPathEffect.obj
D:\Programi\Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.Sk2DPathEffect.obj.rsp /c../../src/effects/Sk2DPathEffect.cpp /Foobj/src/effects/effects.Sk2DPathEffect.obj /Fd"obj/effects_c.pdb"
d:\programi\development\depot_tools\skia\include\core\sktypes.h(21): fatal error
 C1083: Cannot open include file: 'ciso646': No such file or directory
[7/679] compile ../../src/effects/GrCircleBlurFragmentProcessor.cpp
FAILED: obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj
D:\Programi\Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj.rsp /c../../src/effects/GrCircleBlurFragmentProcessor.cpp /Foobj/src/effects/effects.GrCircleBlurFragmentProcessor.obj /Fd"obj/effects_c.pdb"
c:\program files (x86)\windows kits\10\include\10.0.10150.0\ucrt\corecrt.h(10):
fatal error C1083: Cannot open include file: 'vcruntime.h': No such file or dire
ctory
[8/679] compile ../../src/effects/GrAlphaThresholdFragmentProcessor.cpp
FAILED: obj/src/effects/effects.GrAlphaThresholdFragmentProcessor.obj
D:\Programi\Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.GrAlphaThresholdFragmentProcessor.obj.rsp /c ../../src/effects/GrAlphaThresholdFragmentProcessor.cpp /Foobj/src/effects/effects.GrAlphaThresholdFragmentProcessor.obj /Fd"obj/effects_c.pdb"
d:\programi\development\depot_tools\skia\include\core\sktypes.h(21): fatal error
 C1083: Cannot open include file: 'ciso646': No such file or directory
[9/679] compile ../../src/opts/SkOpts_avx.cpp
FAILED: obj/src/opts/avx.SkOpts_avx.obj
D:\Programi\Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/opts/avx.SkOpts_avx.obj.rsp /c ../../src/opts/SkOpts_avx.cpp/Foobj/src/opts/avx.SkOpts_avx.obj /Fd"obj/avx_c.pdb"
c:\program files (x86)\windows kits\10\include\10.0.10150.0\ucrt\corecrt.h(10):
fatal error C1083: Cannot open include file: 'vcruntime.h': No such file or dire
ctory
ninja: build stopped: subcommand failed.

It looks like, it compile 3 files and 4 it stopped because there are more ninja files with bad VS2015 path. How can I change the path for VS2015 in ninja without manulay rewrite all path inside ninja files?


Dňa utorok, 18. apríla 2017 14:30:19 UTC+2 Cary Clark napísal(-a):

Mike Klein

unread,
Apr 26, 2017, 12:49:17 PM4/26/17
to skia-discuss
Try overriding windk in your GN args?  The default is 
  windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"

Wanderer

unread,
Apr 26, 2017, 1:32:35 PM4/26/17
to skia-discuss
Thank, but for future will be good if you write more, because I allways must find where and how to I rewrite it. I found only: I go in to BUILD.gn file and rewrite it. And don't know if it is right way.

After this, when I build with ninja i got this:
ninja: Entering directory `out\Static'

[4/679] compile ../../src/effects/Sk1DPathEffect.cpp
FAILED: obj/src/effects/effects.Sk1DPathEffect.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.Sk1DPathEffect.obj.rsp /c ../../src/effects/Sk1DPathEffect.cpp /Foobj/src/effects/effects.Sk1DPathEffect.obj /Fd"obj/effects_c.pdb"
d:\programi\development\depot_tools\skia\include\private\sktlogic.h(17): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
[5/679] compile ../../src/effects/GrAlphaThresholdFragmentProcessor.cpp
FAILED: obj/src/effects/effects.GrAlphaThresholdFragmentProcessor.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.GrAlphaThresholdFragmentProcessor.obj.rsp /c ../../src/effects/GrAlphaThresholdFragmentProcessor.cpp /Foobj/src/effects/effects.GrAlphaThresholdFragmentProcessor.obj /Fd"obj/effects_c.pdb"
d:\programi\visual studio 2015\vc\include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
[6/679] compile ../../src/effects/GrCircleBlurFragmentProcessor.cpp
FAILED: obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.GrCircleBlurFragmentProcessor.obj.rsp /c ../../src/effects/GrCircleBlurFragmentProcessor.cpp /Foobj/src/effects/effects.GrCircleBlurFragmentProcessor.obj /Fd"obj/effects_c.pdb"
d:\programi\development\depot_tools\skia\include\private\sktlogic.h(17): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
[7/679] compile ../../src/opts/SkOpts_avx.cpp
FAILED: obj/src/opts/avx.SkOpts_avx.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/opts/avx.SkOpts_avx.obj.rsp /c ../../src/opts/SkOpts_avx.cpp /Foobj/src/opts/avx.SkOpts_avx.obj /Fd"obj/avx_c.pdb"
d:\programi\development\depot_tools\skia\include\private\sksafe_math.h(38): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
[8/679] compile ../../src/c/sk_effects.cpp
FAILED: obj/src/c/effects.sk_effects.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/c/effects.sk_effects.obj.rsp /c ../../src/c/sk_effects.cpp /Foobj/src/c/effects.sk_effects.obj /Fd"obj/effects_c.pdb"
d:\programi\development\depot_tools\skia\include\c\sk_types.h(15): fatal error C
1083: Cannot open include file: 'stddef.h': No such file or directory
[9/679] compile ../../src/effects/Sk2DPathEffect.cpp
FAILED: obj/src/effects/effects.Sk2DPathEffect.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/effects/effects.Sk2DPathEffect.obj.rsp /c ../../src/effects/Sk2DPathEffect.cpp /Foobj/src/effects/effects.Sk2DPathEffect.obj /Fd"obj/effects_c.pdb"
d:\programi\visual studio 2015\vc\include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory

ninja: build stopped: subcommand failed.

Now it looks like some file are missing, and now I am lost. Have no clue where should be stddef.h and other *.h files. Inside skia folder isn't.

Dňa streda, 26. apríla 2017 18:49:17 UTC+2 Mike Klein napísal(-a):

Wanderer

unread,
Apr 27, 2017, 4:29:07 AM4/27/17
to skia-discuss
Ok, I resolve it myself. But another problem appear:
It start compile until:
ninja: Entering directory `out\Static'
[94/679] compile ../../src/codec/SkPngCodec.cpp
FAILED: obj/src/codec/png.SkPngCodec.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/codec/png.SkPngCodec.obj.rsp /c ../../src/codec/SkPngCodec.cpp /Foobj/src/codec/png.SkPngCodec.obj /Fd"obj/png_c.pdb"
d:\programi\development\depot_tools\skia\src\codec\skpngcodec.cpp(24): fatal error C1083: Cannot open include file: 'png.h': No such file or directory
[98/679] compile ../../src/images/SkPNGImageEncoder.cpp
FAILED: obj/src/images/png.SkPNGImageEncoder.obj
D:/Programi/Visual Studio 2015/VC/bin/amd64/cl.exe /nologo /showIncludes /FC @obj/src/images/png.SkPNGImageEncoder.obj.rsp /c ../../src/images/SkPNGImageEncoder.cpp /Foobj/src/images/png.SkPNGImageEncoder.obj /Fd"obj/png_c.pdb"
d:\programi\development\depot_tools\skia\src\images\skpngimageencoder.cpp(23): fatal error C1083: Cannot open include file: 'png.h': No such file or directory
[99/679] compile ../../src/c/sk_paint.cpp

ninja: build stopped: subcommand failed.
And now I am really lost, because png.h is inside skia folder.

Dňa streda, 26. apríla 2017 19:32:35 UTC+2 Wanderer napísal(-a):

rubenvb

unread,
Apr 28, 2017, 2:44:10 AM4/28/17
to skia-discuss
I have a custom CMakeLists.txt to build Skia, optionally with all its dependencies. The Skia CMakeLists is located here: https://github.com/skui-org/skia/blob/m58/CMakeLists.txt
If you want to also build its (minimal) dependencies, check out the proper repo of the mother project: https://github.com/skui-org/3rdparty?files=1

I use it successfully to build Skia on Linux with GCC/Clang/ICC and on Windows with Visual Studio 2015 and 2017.

Wanderer

unread,
Apr 28, 2017, 4:34:54 PM4/28/17
to skia-discuss
Thanks, but unfornately it is not working for me. When I generate, CMake throw me some error with missing libraries.

On other side I finnaly build skia and resolve problems. But I got another problems with building simple program with skia library in this topic https://groups.google.com/forum/#!topic/skia-discuss/0L-wmHSbc2E

Dňa piatok, 28. apríla 2017 8:44:10 UTC+2 rubenvb napísal(-a):

Wanderer

unread,
Apr 28, 2017, 4:36:19 PM4/28/17
to skia-discuss
not unfornately but unfortunately

Dňa piatok, 28. apríla 2017 22:34:54 UTC+2 Wanderer napísal(-a):

md

unread,
Jul 24, 2017, 10:36:33 PM7/24/17
to skia-discuss
rubenvb - you are my hero.  I was able to use your cmake files to get this working on Windows.  

Previously had built it on a Mac, but needed to port my code to Windows and found myself here after 8 hours.

I was about to abandon skia after fooling around for 2 days trying to get vs2017 to compile the lib.  Skia isn't entrenched enough for me in my code, and I'd rather spend time working on replacement libs than fooling with ninja files that don't have the appropriate includes and can't build.

Skia authors:  

Please make the Windows build process smoother - this was a completely unnecessary hassle.  Python+ninja+hack+duct type+hack all on top of what is a very nice library otherwise.  Why such a mess when you have such a nice library?  Just supply rubenvb's cmake file and call it a day.

Hal Canary

unread,
Jul 25, 2017, 12:22:28 PM7/25/17
to skia-discuss
On Mon, Jul 24, 2017 at 10:36 PM, md <mde...@gmail.com> wrote:
[...]
Skia authors:  
Please make the Windows build process smoother - this was a completely unnecessary hassle.  Python+ninja+hack+duct type+hack all on top of what is a very nice library otherwise.  Why such a mess when you have such a nice library?

We (most of the core Skia team) like GN+Ninja.  Chrome uses GN+Ninja.

 Just supply rubenvb's cmake file and call it a day.

Keeping a CMakeLists.txt file up to date with with the BUILD.gn files is non-trivial.  Do you have any ideas?


Mike Klein

unread,
Jul 25, 2017, 1:15:37 PM7/25/17
to skia-discuss
A while back we wrote a pretty barebones GN-to-CMake script (gn/gn_to_cmake.py) for use with IDEs like CLion.  If you like CMake and are adventurous that might be a fun place to look.

Brian Osman

unread,
Jul 25, 2017, 1:28:20 PM7/25/17
to skia-d...@googlegroups.com
I'm also intending to start fresh on my home Windows machine. We've had several reports of people struggling to get a Windows build working, which doesn't match our experience. I'd like to verify that we're not missing something.

On Tue, Jul 25, 2017 at 1:15 PM, 'Mike Klein' via skia-discuss <skia-d...@googlegroups.com> wrote:
A while back we wrote a pretty barebones GN-to-CMake script (gn/gn_to_cmake.py) for use with IDEs like CLion.  If you like CMake and are adventurous that might be a fun place to look.
On Tue, Jul 25, 2017 at 12:22 PM 'Hal Canary' via skia-discuss <skia-d...@googlegroups.com> wrote:
On Mon, Jul 24, 2017 at 10:36 PM, md <mde...@gmail.com> wrote:
[...]
Skia authors:  
Please make the Windows build process smoother - this was a completely unnecessary hassle.  Python+ninja+hack+duct type+hack all on top of what is a very nice library otherwise.  Why such a mess when you have such a nice library?

We (most of the core Skia team) like GN+Ninja.  Chrome uses GN+Ninja.

 Just supply rubenvb's cmake file and call it a day.

Keeping a CMakeLists.txt file up to date with with the BUILD.gn files is non-trivial.  Do you have any ideas?


--
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+unsubscribe@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.

--
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+unsubscribe@googlegroups.com.

md

unread,
Jul 28, 2017, 1:29:10 PM7/28/17
to skia-discuss
@Hal

Apologies for the vent, was pretty frustrated at the time.  I really like the library, but was pretty unhappy about the porting process.  As for ideas, yes...  I have a few.

1. 

I understand your team prefers GN/ninja, that's great and I"m sure there are good reasons - I'm not familiar with that system.  However, I would say that the python/ninja magic you guys are doing (at least on the Windows side) is far more non-trivial than tagging some of your sources in a way that a quick python script can generate a cmake file later down the road and you can hand out.  The cmake file from rubenvb only had a few compiler switches, a few "if androids" and then a bunch of file globs for which files to include.  Not too complex from what I can tell, but I'm no cmake expert.

I'm not a cmake zealot, but it smoked the current deployment process on Windows.  

cmake found my compiler.  (gn/ninja has it hard-coded for "VS Professional" and I was using Community.  No mention in the build docs on that from what I could fine)
cmake found whatever includes/sdk's it needed.  Skia was hardcoded to an older windows SDK, buried in I think a different file than above.
cmake didn't need me to put a pre-bundled python interpreter into my windows path, which is pretty intrusive.
cmake built the first time.

2.  

Post the precompiled binaries for Win32 and Win64 from your CI/CD system to the site.  Note in your documentation "While skia definitely builds on Windows (we do it every day in our CI/CD system), our development team is all on Mac and Unix and the Windows process can be a bit daunting if you aren't up to speed on gn/ninja.  We don't run through the build process very often and there may be some issues.  Feel free to use these pre-compiled binaries if you don't feel the need to roll your own.  link here, link here"

3.

Schedule a quarterly "real-life" install, where someone on the team finds a willing co-worker (or intern) and tries to build skia on their Windows machine and truly live the process.  Building skia on an ansible-ised CI/CD VM with all the right dependencies just doesn't transfer to real-life.

4.

Really dig the library, sorry I came off as harsh, you guys do great work.  I built it on my Mac a few months back and it was great.  It's just really frustrating when the docs just say "Build on Windows, no problem" and it's just not the case and I was this close to moving on.

Mike Klein

unread,
Jul 28, 2017, 1:37:09 PM7/28/17
to skia-discuss
We generally don't host binaries because Skia has neither a stable ABI nor API.  We don't really maintain a version number in the sense you'd expect either.  We also expect clients to want to customize their builds of Skia to suit their needs, mostly around optional dependencies.  There's no stock Skia.

md

unread,
Jul 28, 2017, 2:14:16 PM7/28/17
to skia-discuss
I see.  Guess I'm a rare "stock" user.  :)  Packaged headers and a .lib would have worked for me.  But totally understand if it's an expectation that it's modified by the end user.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages