Skip to content

[vcpkg_build_qmake]Switch qmake build system to nmake in Windows.#7061

Closed
JackBoosY wants to merge 3 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/qmake_buildsystem_nmake
Closed

[vcpkg_build_qmake]Switch qmake build system to nmake in Windows.#7061
JackBoosY wants to merge 3 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/qmake_buildsystem_nmake

Conversation

@JackBoosY
Copy link
Copy Markdown
Contributor

Building system jom is very inefficient, try to switch to nmake.

Related: #4692.

@renshi-code
Copy link
Copy Markdown
Contributor

install_qt.cmake in qt5-base still uses jom

@Neumann-A
Copy link
Copy Markdown
Contributor

also we should pass some parallel build argumenet because else building qt takes forever.

@heydojo
Copy link
Copy Markdown
Contributor

heydojo commented Jun 28, 2019

Building system jom is very inefficient, try to switch to nmake.

Could you elaborate please?

https://wiki.qt.io/Jom

jom is a clone of nmake to support the execution of multiple independent commands in parallel.

As far as others are aware jom is the tool you use to build Qt.

@JackBoosY
Copy link
Copy Markdown
Contributor Author

@heydojo Take it easy, it's just a draft. If using nmake takes longer than jom, I will turn off this PR.

@MVoz
Copy link
Copy Markdown
Contributor

MVoz commented Jun 28, 2019

@Neumann-A flag /mp parallel build
nmake can't parallelize, but the compiler [cl.exe] itself is doing a good job

2019-06-28_223849

2019-07-10_220000

@ras0219-msft
Copy link
Copy Markdown
Contributor

ras0219-msft commented Jun 30, 2019

From the issue:

I have one PC (out of 3) where Jom consistently deadlocks (4 Jom process running without any progress for hours) within bigger builds of qt (e.g. qt5-base)

So the issue is not inefficiency (nmake will definitely be less efficient), but it appears there is a correctness issue in Jom on certain machines. Using /MP will be mandatory to have reasonable performance.

@MVoz
Copy link
Copy Markdown
Contributor

MVoz commented Sep 23, 2019

why closed?
code that works with the /MP flag

    if(CMAKE_HOST_WIN32)
        #vcpkg_find_acquire_program(JOM)
	find_program(NMAKE nmake)
        set(ENV{CL} /MP)
        set(INVOKE "nmake")
    else()
        find_program(MAKE make)
        set(INVOKE "${MAKE}")
    endif()

@JackBoosY
Copy link
Copy Markdown
Contributor Author

@voskrese

  1. After testing, the time to use nmake is greater than the time to use jom.
  2. According to @ras0219-msft said, we need to solve the jam problem of jom instead of replacing it with nmake.

@Neumann-A
Copy link
Copy Markdown
Contributor

@JackBoosY.
maybe a solution like the PREFER_NINJA solution in the CMake generator selection?
Let the user set e.g. VCPKG_AVOID_JOM in a triplet to force nmake instead of JOM

@MVoz
Copy link
Copy Markdown
Contributor

MVoz commented Sep 24, 2019

@JackBoosY
from JOM the known problem for a long time, at multithreading, it begins to compile the new file, without having compiled dependence, and as a result there is a conflict, dependence is not present, and compilation went, an error

and it can not be fixed, parameters, only changing the code of the JOM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants