New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parallel make (e.g. make -j2) failure #201

Closed
wants to merge 3 commits into
base: develop
from

Conversation

Projects
None yet
2 participants
@Aetf
Contributor

Aetf commented Feb 1, 2015

Parallel make may fail because dependencies among sub projects are not fully specified in the top level .pro file . Thus when building these targets will be built in arbitrary order.

@cloose

This comment has been minimized.

Show comment
Hide comment
@cloose

cloose Feb 1, 2015

Owner

Hi @Aetf,

what platform and compiler are you using? The following article suggest to not use config ordered for the exactly same reasons: http://blog.rburchell.com/2013/10/every-time-you-configordered-kitten-dies.html.

Thanks

Owner

cloose commented Feb 1, 2015

Hi @Aetf,

what platform and compiler are you using? The following article suggest to not use config ordered for the exactly same reasons: http://blog.rburchell.com/2013/10/every-time-you-configordered-kitten-dies.html.

Thanks

@Aetf

This comment has been minimized.

Show comment
Hide comment
@Aetf

Aetf Feb 2, 2015

Contributor

I'm using Archlinux with gcc 4.9.2, make 4.1, qmake 3.0, Qt 5.4.0. And this problem is reproducible with both v0.10.1 and current develop HEAD.

The problem is dependencies are not fully specified, so the back-end is free to rearrange the order how these targets get built. And while I'm not familiar with VS, I think it can't do a reliable parallel build because of lack of necessary information.

I read that post, and as I understand it:

a) to specify dependencies you use

  A.depends = B C
  B.depends = D

and let the program compute a correct order to work.

b) using ordered is a straightforward way to skip that compute and specify an order yourself. Then it's rely on you specifying a correct order to work. And this can be tricky (DBCA or DCBA is OK but not BDCA).

I have to admit that I have been a little lazy to figure out exact dependencies as I'm not quite familiar with the project. So I just use a worked order here. 😛

What I didn't thought before is that using ordered would effectively disable parallel build as the build system can only build the project in strict sequential order now. [1]

Anyway, I managed to figure out the dependencies and it works without ordered now. see 1508876.

My last concern: according to document, depends available only on platforms that use makefiles so it's maybe necessary to find another way to specify these for VS.

[1] https://aur.archlinux.org/packages/cutemarked/

Contributor

Aetf commented Feb 2, 2015

I'm using Archlinux with gcc 4.9.2, make 4.1, qmake 3.0, Qt 5.4.0. And this problem is reproducible with both v0.10.1 and current develop HEAD.

The problem is dependencies are not fully specified, so the back-end is free to rearrange the order how these targets get built. And while I'm not familiar with VS, I think it can't do a reliable parallel build because of lack of necessary information.

I read that post, and as I understand it:

a) to specify dependencies you use

  A.depends = B C
  B.depends = D

and let the program compute a correct order to work.

b) using ordered is a straightforward way to skip that compute and specify an order yourself. Then it's rely on you specifying a correct order to work. And this can be tricky (DBCA or DCBA is OK but not BDCA).

I have to admit that I have been a little lazy to figure out exact dependencies as I'm not quite familiar with the project. So I just use a worked order here. 😛

What I didn't thought before is that using ordered would effectively disable parallel build as the build system can only build the project in strict sequential order now. [1]

Anyway, I managed to figure out the dependencies and it works without ordered now. see 1508876.

My last concern: according to document, depends available only on platforms that use makefiles so it's maybe necessary to find another way to specify these for VS.

[1] https://aur.archlinux.org/packages/cutemarked/

@Aetf

This comment has been minimized.

Show comment
Hide comment
@Aetf

Aetf Feb 2, 2015

Contributor

I have simplified the dependencies a little. Tested on my box and it worked. Not sure if it's correct. Maybe @cloose you should look at it.

Contributor

Aetf commented Feb 2, 2015

I have simplified the dependencies a little. Tested on my box and it worked. Not sure if it's correct. Maybe @cloose you should look at it.

@cloose cloose self-assigned this Feb 2, 2015

@cloose cloose added this to the v0.11.0 milestone Feb 2, 2015

@cloose cloose added the bug label Feb 2, 2015

@cloose

This comment has been minimized.

Show comment
Hide comment
@cloose

cloose Feb 2, 2015

Owner

Merged and squashed your commits to the single commit ffe0469 in branch develop.

Thanks a lot!

Owner

cloose commented Feb 2, 2015

Merged and squashed your commits to the single commit ffe0469 in branch develop.

Thanks a lot!

@cloose cloose closed this Feb 2, 2015

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