Bug report #7338

Build fails with "No rule to make target staged-plugins"

Added by Radim Blazek over 7 years ago. Updated almost 4 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Build/Install
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:16321

Description

If cmake is configured with WITH_STAGED_PLUGINS=ON, build fails when building staged-plugins-on-build or if make staged-plugins-on-build is run directly with:

No rule to make target staged-plugins, needed by python/plugins/CMakeFiles/staged-plugins-on-build. Stop.

make staged-plugins however works well.

cmake version 2.8.2

Works well for others.

staged-plugins_cmake-patch.diff Magnifier (1.86 KB) Larry Shaffer, 2013-03-12 12:19 PM

History

#1 Updated by Sandro Santilli over 7 years ago

  • Category set to Build/Install

It works for me with cmake version 2.8.7

I'm not sure I understood though:
are you saing that "make staged-plugins" works for you while "make staged-plugins-on-build" fails ?

(I don't know what's the difference between the two supposed to be)

#2 Updated by Radim Blazek over 7 years ago

Sandro Santilli wrote:

I'm not sure I understood though:
are you saing that "make staged-plugins" works for you while "make staged-plugins-on-build" fails ?

Yes.

#3 Updated by Larry Shaffer over 7 years ago

Hi Radim,

Looking at the changelog for CMake since 2.8.2, it seems to have many fixes concerning targets. Can you upgrade CMake, as an initial possible fix? I've seen no problems with those targets on a Windows 7 VM still using Cmake 2.8.4, so that seems like the minimum to upgrade to, if you can.

Sandro Santilli wrote:

I'm not sure I understood though:
are you saing that "make staged-plugins" works for you while "make staged-plugins-on-build" fails ?

(I don't know what's the difference between the two supposed to be)

staged-plugins-on-build custom target has the ALL option set, and is keyed off of whether WITH_STAGED_PLUGINS is ON or TRUE, and it has staged-plugins as a dependency. staged-plugins is not part of ALL target, but should be created every time CMake generates the Makefiles (but not built). In Radim's case, it appears that staged-plugins is being built as a dependency, but staged-plugins-on-build isn't finding it (though it shouldn't be built unless it has found it, which is the perplexing part).

The only thing I can think of for a fix now is to move the staged-plugins-on-build target to a point after the plugins have populated the staged-plugins target with custom commands (see attached patch: staged-plugins_cmake-patch.diff). Before that, where the staged-plugins-on-build is now, the staged-plugins target is empty. This is where I think an older CMake may be having a problem.

#4 Updated by Nyall Dawson almost 4 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

Closing due to lack of feedback, and substantial changes since this was filed

Also available in: Atom PDF