Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is configure so slow in MSYS?

Tags:

msys

When I use MSYS to compile something, the ./configure step can take longer than the make. However, the same process in Linux has a fast configure and slow make. Is this just some setting in MSYS that is bogging down my system? Does anyone have a solution?

like image 547
User1 Avatar asked Feb 13 '10 02:02

User1


Video Answer


1 Answers

Typical configure scripts do a lot of starting small subprocesses. On Unix-like operating systems, this is done with the fork() and exec() function calls, which have very particular semantics that need to be preserved (for example, copy-on-write shared memory after forking). On Windows, subprocesses are created with CreateProcess() which has very different semantics (eg. completely separate memory space from the parent). In order to execute Unix-like scripts and programs correctly, MSYS needs to do a lot of emulation work to make creating new processes on Windows work like fork()/exec() on Unix. This ends up being slower than an OS that offers those function calls natively.

like image 120
Greg Hewgill Avatar answered Sep 22 '22 17:09

Greg Hewgill