# How long does it take to build vtk for linux in windows?

**URL:** https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640
**Category:** Support
**Created:** [February 8, 2023, 7:53am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640 "2023-02-08T07:53:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sagues](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@Sagues](https://discourse.vtk.org/u/Sagues)
#### Post date: [February 8, 2023, 7:53am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/1 "2023-02-08T07:53:07Z")

</div>

I am building vtk library for linux in windows (WSL).  
I have done the steps in the following page:  
[https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/dev/getting\_started\_linux.md](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/dev/getting_started_linux.md)  
However I did not use parameter `-GNinja`

After 16 hours it has only built the 51% of vtk library. Is it normal?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [February 8, 2023, 8:34am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/2 "2023-02-08T08:34:20Z")

</div>

Hi @Sagues

VTK does not officially supports WSL, so hard to say.

Why not building it on Windows directly ?

---

<div class="post-metadata">

### Author: ![Sagues](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@Sagues](https://discourse.vtk.org/u/Sagues)
#### Post date: [February 8, 2023, 8:36am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/3 "2023-02-08T08:36:26Z")

</div>

I compiled vtk for windows but I have to compile my application for linux too.

I don’t know if I should use -Gninja parameter. I don’t know if I should cancel the build operation and use -Gninja parameter.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [February 8, 2023, 8:38am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/4 "2023-02-08T08:38:38Z")

</div>

> [@Sagues](#):
>
> I have to compile my application for linux too.

Then use linux ?

> I don’t know if I should cancel the build operation and use -Gninja parameter.

Ninja will not speed up your first build, so I would not cancel.

---

<div class="post-metadata">

### Author: ![Sagues](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@Sagues](https://discourse.vtk.org/u/Sagues)
#### Post date: [February 8, 2023, 8:39am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/5 "2023-02-08T08:39:04Z")

</div>

ok thank you very much

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [February 8, 2023, 9:59am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/6 "2023-02-08T09:59:16Z")

</div>

Since compilation is very IO intensive, it should be done on a filesystem that is native to the compiler. Compiling with WSL onto an NTFS filesystem, for example, will be very slow. Compiling with WSL onto a virtual disk that is formatted with ext4 should be much faster.

A similar rule applies to containers like Docker. Binding to a filesystem that isn’t native to the container results in very poor IO performance.

---

<div class="post-metadata">

### Author: ![Sagues](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@Sagues](https://discourse.vtk.org/u/Sagues)
#### Post date: [February 8, 2023, 10:44am UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/7 "2023-02-08T10:44:38Z")

</div>

Thank you very much

---

<div class="post-metadata">

### Author: ![afa](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@afa](https://discourse.vtk.org/u/afa)
#### Post date: [February 15, 2023, 2:28pm UTC](https://discourse.vtk.org/t/how-long-does-it-take-to-build-vtk-for-linux-in-windows/10640/8 "2023-02-15T14:28:06Z")

</div>

I would also check WSL1 vs WSL2.  
WSL2 should improve performance except for file IO: [Windows 10 WSL1 vs WSL2 Disk Performance · Neil Bryan](https://neilbryan.ca/posts/win10-wsl2-performance/)

You can force WSL v1 though. I do not if that will help you
