[GRASS-dev] compile error with vdigit nviz

Glynn Clements glynn at gclements.plus.com
Thu Dec 11 15:35:45 EST 2008


Martin Landa wrote:

> >>> ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python
> >>> --enable-64bit --with-readline
> >>> --with-readline-includes=/usr/include/readline --with-freetype
> >>> --with-freetype-includes=/usr/include/freetype2/
> >>> --with-wxwidgets=/usr/bin/wx-config --with-postgres
> >>> --with-postgres-includes=/usr/include/postgresql/
> 
> --with-cxx is missing...
> 
> > /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
> > /usr/local/work/build/grass6_devel/gui/wxpython/nviz
> >>> make
> > make: *** No rule to make target `default', needed by `first'.  Stop.
> 
> well, Makefile should be fixed, vdigit and nviz shouldn't be compiled
> when support for cxx/python/wxwidgets is disabled.

This was introduced in r34791.

The trunk (7.0) has had a fair number of changes to the build system,
so 7.0 Makefiles won't necessarily work in 6.4.

In this case, 7.0 has an empty "default" rule in Rules.make. This was
added to simplify Makefiles for modules which depend upon an optional
feature.

E.g. gui/wxpython/vdigit/Makefile has:

	ifneq ($(USE_WXWIDGETS),)
	ifneq ($(USE_PYTHON),)
	ifneq ($(strip $(CXX)),)
	default: install_vdigit
	endif
	endif
	endif

If wxWidgets, Python and C++ are enabled, the "default" rule invokes
the "install_vdigit" rule. If any of those features are disabled, in
7.0 it will invoke the empty "default" rule from Rules.make. 6.4
doesn't have that rule, so you get the above error.

It should suffice to add an empty "default" rule to the vdigit and
nviz Makefiles. You can have multiple rules for the same target (it
gets awkward if you have multiple rules for a target and they all have
commands, but that isn't an issue here). Or you can add it to
Rules.make.

However, some of the other build system changes are more fundamental,
and can't easily be back-ported.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list