Skip to content
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

Cmake parallel builds fail for examples most of the time #119

Open
doug1234 opened this issue Feb 6, 2024 · 4 comments
Open

Cmake parallel builds fail for examples most of the time #119

doug1234 opened this issue Feb 6, 2024 · 4 comments

Comments

@doug1234
Copy link
Contributor

doug1234 commented Feb 6, 2024

When --parallel is set to > 1 on the cmake command line during build I get fairly consistent errors in the examples. However, sometimes my build do work. Either not building parallel or not building the examples fixes my issues all the time.

My error looks something like:
[ 50%] Automatic MOC and UIC for target jkqtptest_styling
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
AutoMoc subprocess error

@jkriege2
Copy link
Owner

jkriege2 commented Feb 6, 2024

hi!

hmmm ... I never ran into such an issue ...

the CMake declarations for each example are rather simple: It is a single executable with a few source/ressource-files and links against the (already built) plotter library and a common test-library, that provides a few additional tools.

As all dependencies are simple and well-defined, your build-system should have no problems figuring out the order in which to evaluate ...

The error you postet sound more like it happens, when moc(.exe) is execute (the Qt utility) and that tries to access a ressource that is currently locked on your system.

Can you
(a) provide more info (JKQTPlotter Version, Qt Version, cmake generator you use)
(b) did you run into similar problems with other libs?
(c) if you generate e.g. UNIX makefiles ... does it work to call make .j8?

Sorry, I don't see, what else I can do at the moment, other than trying to poke around ...

BTW: I tried the --parallel in QtCreator (on Windows 11, using Qt6.4 and MinGW64) ... there it worked ...

Best,
JAN

@doug1234
Copy link
Contributor Author

(a) This was with the 4.0.2 tag, qt 5.15.10 and cmake 3.23.2 on rhel9. I don't have this issue building on windows.
(b) I have built other Qt libs without issue
(c) cmake build command looked like: --build . --target "all" --parallel $(nproc)

I know this is a tough one but i figured I would report it in case someone else runs into the same issue.

@jkriege2
Copy link
Owner

Do you know, which generator was used? Unix Makefiles? or Ninja?

@doug1234
Copy link
Contributor Author

Unix makefiles. Not currently using Ninja.

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

No branches or pull requests

2 participants