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

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
However I did not use parameter -GNinja

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

Hi @Sagues

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

Why not building it on Windows directly ?

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.

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.

1 Like

ok thank you very much

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.

1 Like

Thank you very much

I would also check WSL1 vs WSL2.
WSL2 should improve performance except for file IO: Windows 10 WSL1 vs WSL2 Disk Performance · Neil Bryan

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

1 Like