[GRASS-dev] [GRASS GIS] #625: make errors (missing demolocation)

#625: make errors (missing demolocation)
----------------------+-----------------------------------------------------
Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Keywords: | Platform: MSWindows Vista
      Cpu: x86-32 |
----------------------+-----------------------------------------------------
I get the following errors compiling trunk (r37704) though it worked fine
a couple days ago.

{{{
Errors in:
/src/trunk/db/db.columns
/src/trunk/db/db.connect
/src/trunk/db/db.copy
/src/trunk/db/db.createdb
/src/trunk/db/db.databases
/src/trunk/db/db.describe
/src/trunk/db/db.drivers
/src/trunk/db/db.dropdb
/src/trunk/db/db.droptable
/src/trunk/db/db.execute
/src/trunk/db/db.login
/src/trunk/db/db.select
/src/trunk/db/db.tables
/src/trunk/display/d.barscale
/src/trunk/display/d.colorlist
/src/trunk/display/d.colortable
}}}
... there's a lot more but they all have the same error message:

{{{
if [ "/src/trunk/dist.i686-pc-mingw32/bin/db.columns.exe" != "" ] ; then
GISRC=/src/trunk/dist.i686-pc-mingw32/demolocation/.grassrc70
GISBASE=/src/trunk/dist.i686-pc-mingw32 PATH="/src/trunk/dist.i686-pc-
mingw32/bin:$PATH" PYTHONPATH="c:\programs\gis\osgeo4w\usr\src\trunk\dist.
i686-pc-mingw32\etc\python;$PYTHONPATH" PATH="/src/trunk/dist.i686-pc-
mingw32/bin:/src/trunk/dist.i686-pc-mingw32/lib:/src/trunk/dist.i686-pc-
mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/PROGRA~1/COMMON~1/ULEADS~1/MPEG:/c/Programs/GIS/Subversion:/c/Program
Files/QuickTime/QTSystem/:/osgeo4w/apps/grass/bin:/bin:/c/Programs/Subversion"
LC_ALL=C /src/trunk/dist.i686-pc-mingw32/bin/db.columns.exe --html-
description < /dev/null | grep -v '</body>\|</html>' > db.columns.tmp.html
; fi
access: No such file or directory
ERROR: LOCATION << /src/trunk/dist.i686-pc-mingw32/demolocation >> not
        available
make: *** [db.columns.tmp.html] Error 1
rm db.columns.tmp.html
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by glynn):

Replying to [ticket:625 cnielsen]:
> I get the following errors compiling trunk (r37704) though it worked
fine a couple days ago.

I've been making quite a lot of changes to the build system over the last
couple of days.

> ... there's a lot more but they all have the same error message:
>
{{{
ERROR: LOCATION << /src/trunk/dist.i686-pc-mingw32/demolocation >> not
        available
}}}

Try this:
{{{
Index: include/Make/Grass.make

--- include/Make/Grass.make (revision 37704)
+++ include/Make/Grass.make (working copy)
@@ -48,7 +48,6 @@
  LIB_RUNTIME_DIR = $(GISBASE)/lib

  RUN_GISRC =
$(GISBASE)/demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
-RUN_GISBASE = $(GISBASE)

  #########################################################################
  # these define the various directories which contain GRASS programs
Index: include/Make/Platform.make.in

--- include/Make/Platform.make.in (revision 37704)
+++ include/Make/Platform.make.in (working copy)
@@ -41,6 +41,7 @@
  INST_DIR = @INSTDIR@

  GRASS_HOME = @GRASS_HOME@
+RUN_GISBASE = @GISBASE@

  GRASS_VERSION_MAJOR = @GRASS_VERSION_MAJOR@
  GRASS_VERSION_MINOR = @GRASS_VERSION_MINOR@
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by cnielsen):

New error:
{{{
Tue Jun 2 14:50:20 EDT 2009: STARTING make
include/Make/Vars.make:1: include/Make/Platform.make: No such file or
directory
make: *** No rule to make target `include/Make/Platform.make'. Stop.
include/Make/Vars.make:1: include/Make/Platform.make: No such file or
directory
make: *** No rule to make target `include/Make/Platform.make'. Stop.
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by glynn):

Replying to [comment:2 cnielsen]:
> New error:
{{{
include/Make/Vars.make:1: include/Make/Platform.make: No such file or
directory
}}}

Can you provide more detail on where this is originating from, i.e. which
Makefile is generating this error?

The error implies that MODULE_TOPDIR isn't being set.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by cnielsen):

I can't seem to reproduce the second error, meaning probably my error.
demolocation error fixed with the patch.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by cnielsen):

Sorry Glynn, I had rolled back to an earlier version and that is why the
demolocation error seemed fixed. In fact the patch had no effect, the
error is still present.

{{{
/src/trunk/db/db.columns
$ make
if [ "/src/trunk/dist.i686-pc-mingw32/bin/db.columns.exe" != "" ] ; then
GISRC=/src/trunk/dist.i686-pc-mingw32/demolocation/.grassrc70
GISBASE=c:/programs/gis/osgeo4w/usr/src/trunk/dist.i686-pc-mingw32
PATH="/src/trunk/dist.i686-pc-mingw32/bin:$PATH"
PYTHONPATH="c:\programs\gis\osgeo4w\usr\src\trunk\dist.i686-pc-
mingw32\etc\python;$PYTHONPATH" PATH="/src/trunk/dist.i686-pc-
mingw32/bin:/src/trunk/dist.i686-pc-mingw32/lib:/src/trunk/dist.i686-pc-
mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/PROGRA~1/COMMON~1/ULEADS~1/MPEG:/c/Programs/GIS/Subversion:/c/Programs/Online/QuickTime/QTSystem/:/osgeo4w/apps/grass/bin:/bin:/c/Programs/Subversion"
LC_ALL=C /src/trunk/dist.i686-pc-mingw32/bin/db.columns.exe --html-
description < /dev/null | grep -v '</body>\|</html>' > db.columns.tmp.html
; fi
access: No such file or directory
ERROR: LOCATION << /src/trunk/dist.i686-pc-mingw32/demolocation >> not
        available
make: *** [db.columns.tmp.html] Error 1
rm db.columns.tmp.html
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
------------------------------+---------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by glynn):

Replying to [comment:5 cnielsen]:
> Sorry Glynn, I had rolled back to an earlier version and that is why the
demolocation error seemed fixed. In fact the patch had no effect, the
error is still present.
>
{{{
ERROR: LOCATION << /src/trunk/dist.i686-pc-mingw32/demolocation >> not
        available
}}}

This should be fixed in r37808.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/625#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by hamish):

  * platform: MSWindows Vista => All
  * cpu: x86-32 => All

Comment:

Hi,

I can reproduce something similar on amd64 Linux with r37899.
(pretty new Debian/Lenny)

the problem seems to be that the system type is not detected properly
("unknown" or ""), and build dirs end up called bin./ and dist./.

there is: "config.status.x86_64-unknown-linux-gnu"

for releasebranch_6_4 on the same machine I get: bin.x86_64-unknown-linux-
gnu/ and dist.x86_64-unknown-linux-gnu/ and it builds ok.

error is:
{{{
[...]grass/svn/trunk/dist./bin/db.login --html-description < /dev/null |
grep -v '</body>\|</html>' > db.login.tmp.html ; fi
access: No such file or directory
ERROR: LOCATION <<
        /usr/src/grass/svn/trunk/dist.unknown/demolocation >> not
        available
make[2]: *** [db.login.tmp.html] Error 1
rm db.login.tmp.html
make[2]: Leaving directory `/usr/src/grass/svn/trunk/db/db.login'
make[1]: Leaving directory `/usr/src/grass/svn/trunk/db'
}}}

in the above note dist. != dist.unknown.

I had a look but couldn't see where in configure's uname magic it
determines the "unknown" type. Seems to be related to cross-compiling.

?,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by hamish):

same thing happens with develbranch6. relbr64 builds ok.

Platform.make's `ARCH =` line is empty.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:7 hamish]:

> I can reproduce something similar on amd64 Linux with r37899.
> (pretty new Debian/Lenny)
>
>
> the problem seems to be that the system type is not detected properly
("unknown" or ""), and build dirs end up called bin./ and dist./.

System detection is up to config.guess; we might need a newer version.

> there is: "config.status.x86_64-unknown-linux-gnu"

Are you sure that this isn't a leftover from a previous build?

> for releasebranch_6_4 on the same machine I get: bin.x86_64-unknown-
linux-gnu/ and dist.x86_64-unknown-linux-gnu/ and it builds ok.
>
> error is:
{{{
ERROR: LOCATION << /usr/src/grass/svn/trunk/dist.unknown/demolocation >>
not available
}}}
> in the above note dist. != dist.unknown.
>
>
> I had a look but couldn't see where in configure's uname magic it
determines the "unknown" type. Seems to be related to cross-compiling.
{{{
# Set ARCH

ARCH=
if test -z "${host}"; then
ARCH="unknown"
else
ARCH="${host}"
fi
}}}

Note that Platform.make.in has:
{{{
ARCH = @host@
}}}
Although configure.in has:
{{{
AC_SUBST(ARCH)
}}}
ARCH isn't used in Platform.make.

Also, SC_CONFIG_FLAGS uses uname (which means that cross-compiling can't
work), while everything else uses $host.

Which reminds me that SC_CONFIG_FLAGS should have been discarded for 7.0.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by hamish):

Replying to [comment:9 glynn]:
> System detection is up to config.guess; we might need a newer version.
>
> > there is: "config.status.x86_64-unknown-linux-gnu"
>
> Are you sure that this isn't a leftover from a previous build?

that's in the relbr6 (which builds). In devbr6 and trunk on the same
system it is called `config.status.unknown`.

>
{{{
> # Set ARCH
>
> ARCH=
> if test -z "${host}"; then
> ARCH="unknown"
> else
> ARCH="${host}"
> fi
}}}
>
> Note that Platform.make.in has:
{{{
> ARCH = @host@
}}}
> Although configure.in has:
{{{
> AC_SUBST(ARCH)
}}}
> ARCH isn't used in Platform.make.
>
> Also, SC_CONFIG_FLAGS uses uname (which means that cross-compiling can't
work), while everything else uses $host.
>
> Which reminds me that SC_CONFIG_FLAGS should have been discarded for
7.0.

ok, following config.guess:

{{{
timestamp='2008-04-14'
...
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown

echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}"
x86_64:Linux:2.6.26-2-amd64:#1 SMP Thu May 28 21:28:49 UTC 2009

...leads to
     x86_64:Linux:*:*)
         echo x86_64-unknown-linux-gnu
         exit ;;
}}}

I don't see where $host is set.

trunk$ ./configure reports:
{{{
checking host system type... x86_64-unknown-linux-gnu
...
Copying config.status to config.status.x86_64-unknown-linux-gnu

GRASS is now configured for: x86_64-unknown-linux-gnu
}}}

Platform.make now has:
{{{
ARCH = x86_64-unknown-linux-gnu
}}}

weird, this time it got it.
more tests tomorrow.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:10 hamish]:

> ok, following config.guess:

> I don't see where $host is set.

It's set by AC_CANONICAL_HOST from the output of config.guess.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by hamish):

I think I figured out how I was getting "config.status.unknown".

it was because I messed up the ./configure line:
{{{
CFLAGS="-ggdb -march=amdfam10 -Wall -Werror-implicit-function-declaration"
\
   ./configure \
     --with-tcltk-includes=/usr/include/tcl8.5 --with-cairo \
     --with-motif --with-python=/usr/bin/python2.5-config \
     --with-readline --with-cxx --with-odbc --with-sqlite \
     --with-freetype --with-freetype-includes=/usr/include/freetype2 \
     --without-postgres --with-proj-share=/usr/share/proj \
     --enable-64bit --with-pthread \
     --with-wxwidgets=/usr/lib/wx/config/gtk2-unicode-release-2.8 \
     \ #--with-ffmpeg --with-ffmpeg-includes=/usr/include/ffmpeg \
     --with-geos \
     2>&1 | tee config_log.txt
}}}

` \ #comment` is a problem.. causes this to happen when you run
./configure:

{{{
configure: warning: #--with-ffmpeg: invalid host type
checking host system type... Invalid configuration `#--with-ffmpeg':
machine `#--with' not recognized

checking for gcc... gcc
}}}

I don't really understand why ./configure continues weirdly, but if I get
rid of the `\ #--with-ffmpeg` line it all builds ok.

sorry for hijacking this bug with a stupid mistake,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by cnielsen):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:6 glynn]:
> This should be fixed in r37808.

Error resolved, closing ticket. (Good to see Hamish's error is resolved
too)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#625: make errors (missing demolocation)
-----------------------+----------------------------------------------------
  Reporter: cnielsen | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: critical | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:12 hamish]:

> ` \ #comment` is a problem.. causes this to happen when you run
./configure:
>
{{{
configure: warning: #--with-ffmpeg: invalid host type
}}}
>
> I don't really understand why ./configure continues weirdly, but if I
get rid of the `\ #--with-ffmpeg` line it all builds ok.

bash treats "\ "" as a literal space, not a word separator. This means
that the following # isn't at the beginning of a word, so it's treated as
a literal # character rather than starting a comment. The end result is an
argument of "{{{ #--with-ffmpeg}}}". As it's the first argument which
doesn't begin with a dash, it's treated as the host type.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/625#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>