On 3 January 2017 at 13:12, Dirk Hohndel <[email protected]> wrote: > On Tue, Jan 03, 2017 at 09:48:56AM +0100, Anton Lundin wrote: >> > > >> > > the exact cause was: >> > > In file included from C:\dev\subsurface\qt-models\filtermodels.cpp:8:0: >> > > C:/dev/subsurface/./desktop-widgets/mainwindow.h:16:27: fatal error: >> > > ui_mainwind >> > > ow.h: No such file or directory >> > > #include "ui_mainwindow.h" >> > > >> > > which i think means that it still hasn't build the desktop-widgets >> > > module, by the time it's used in qt-models\filtermodels.cpp. >> > >> > I have the same problem sometimes on Mac. The idiotic workaround? >> > >> > make -j 3 >> > >> > Somehow the second thread will magically create the missing files in time. >> > I tried to track this down and gave up :-( >> > >> >> I saw the same issue when testing to build subsurface from qtcreator. >> >> I never managed to find a solution without using using make from >> cmdline. > > Insomnia. Always fun. But good for Subsurface. > > Reading through the CMakeLists.txt and the generated Makefiles, build > files and explicit dependencies (hey, if that doesn't make me want to go > back to sleep, nothing will...) it strikes me that the problem is that > filtermodels.cpp includes mainwindow.h (which requires ui_mainwindow.h). > (hurray for the painfully obvious) > > Yet we don't tell cmake that the models depend on the generated ui. > > Lubomir, can you try this and see if it fixes the problem? > > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index f67d57168205..09936c834e32 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -294,6 +294,7 @@ elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES > "DesktopExecutable") > add_dependencies(subsurface_statistics subsurface_generated_ui) > add_dependencies(subsurface_interface subsurface_generated_ui) > add_dependencies(subsurface_profile subsurface_generated_ui) > + add_dependencies(subsurface_models subsurface_generated_ui) > add_dependencies(subsurface_generated_ui version) > endif() > > > It looks a little odd, but it does reflect the reality of our dependencies > as indicated by the error. And when I explicitly removed ui_mainwindow.h > and filtermodels.o, it did successfully recreate things both with a > non-parallel build from the commandline and from within QtCreator. > > This problem doesn't happen to me every time I build, so I'm not sure this > is the correct fix, but it seemed promising. > > But then again, it's 3am and this may be completely bogus :-) >
the fix works. lubomir -- _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
