jkriege2 / JKQtPlotter

an extensive Qt5 & Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
http://jkriege2.github.io/JKQtPlotter/index.html
GNU Lesser General Public License v2.1
889 stars 190 forks source link

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

Open doug1234 opened 9 months ago

doug1234 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

(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 commented 9 months ago

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

doug1234 commented 9 months ago

Unix makefiles. Not currently using Ninja.