[QGIS-Developer] No rule to make target 'src/core/qgis_core_autogen/mocs_compilation.cpp'
Thomas Larsen Wessel
mrvelle at gmail.com
Wed Aug 21 06:43:30 PDT 2024
I have solved my problem. Doing a clean dry run of make on QGIS will fail,
even when the non-dry run would succeed. If first running a successful
"make", and dry running "make -n", the dry run will succeed.
Is that "normal"? I would consider it a kind of bug in the QGIS build code,
but my understanding/experience is limited.
I suspect that adding a '+' character to all the $(CMAKE_COMMAND) lines,
and maybe to more lines as well, would fix this problem.
On Wed, Aug 21, 2024 at 9:44 AM Thomas Larsen Wessel <mrvelle at gmail.com>
wrote:
> Even when doing a dry run (the -n flag):
>
> cd ~/b/QGIS
> git switch release-3_36
> git pull
> git status -s # yep, its up to date
> mkdir build-dry-3_36
> cd build-dry-3_36
> cmake .. > log_cmake.txt 2>&1
> make -n > log_make.txt 2>&1
>
> make fails with the following error:
>
> (...)
> cd /home/velle/b/QGIS/build-dry-3_36 && /usr/bin/cmake -E cmake_depends
> "Unix Makefiles" /home/velle/b/QGIS /home/velle/b/QGIS/src/core
> /home/velle/b/QGIS/build-dry-3_36
> /home/velle/b/QGIS/build-dry-3_36/src/core
> /home/velle/b/QGIS/build-dry-3_36/src/core/CMakeFiles/qgis_core.dir/DependInfo.cmake
> --color=
> make -s -f src/core/CMakeFiles/qgis_core.dir/build.make
> src/core/CMakeFiles/qgis_core.dir/build
> make[2]: *** No rule to make target
> 'src/core/qgis_core_autogen/mocs_compilation.cpp', needed by
> 'src/core/CMakeFiles/qgis_core.dir/qgis_core_autogen/mocs_compilation.cpp.o'.
> Stop.
> make[1]: *** [CMakeFiles/Makefile2:4401:
> src/core/CMakeFiles/qgis_core.dir/all] Error 2
> make: *** [Makefile:166: all] Error 2
>
> This happens with both release-3_34, release-3_36 and master.
> Using: Ubuntu 22.04, cmake 3.22.1, make 4.3.
>
> I first set it up to run a non-dry, which also failed (after a few hours),
> but unfortunately I discarded the error message. But I expect that if this
> error arises in a dry run it will also arise in a non-dry run.
>
> The odd thing is that I have compiled 3_36 before, and it feels like
> its no more than a month ago, without any issues. I don't understand what
> changed, if anything. But maybe I just forgot some detail this time?
>
> log files here:
> https://gist.github.com/velle/a9300a3e6d1a22f87ebbf913029efb6e
>
> Any advice on what to do? Sincerely, Thomas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240821/5bf2c04d/attachment-0001.htm>
More information about the QGIS-Developer
mailing list