[GRASS5] Whose oops?

  Building the weekly snapshot from last Friday (Sept. 7th), all goes well
until I try to make the postgres links:

/opt/grass/src.garden/grass.postgresql/d.rast.pg
  make -f OBJ.i686-pc-linux-gnu/make.rules

make[1]: Entering directory
/opt/grass/src.garden/grass.postgresql/d.rast.pg'
gcc -g -O2 -I/opt/grass/src/include -c buildInfxQry.c -o
OBJ.i686-pc-linux-gnu/buildInfxQry.o
gcc -g -O2 -I/opt/grass/src/include -c runInfxFile.c -o
OBJ.i686-pc-linux-gnu/runInfxFile.o
runInfxFile.c:6: libpq-fe.h: No such file or directory
make[1]: *** [OBJ.i686-pc-linux-gnu/runInfxFile.o] Error 1
make[1]: Leaving directory /opt/grass/src.garden/grass.postgresql/d.rast.pg'
make: *** [all] Error 2

  Is this a user error on my part or a bug in the latest source code?

Thanks,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
+ 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                 Making environmentally-responsible mining happen.

Rich Shepard wrote:

  Building the weekly snapshot from last Friday (Sept. 7th), all goes well
until I try to make the postgres links:

/opt/grass/src.garden/grass.postgresql/d.rast.pg
  make -f OBJ.i686-pc-linux-gnu/make.rules

make[1]: Entering directory
/opt/grass/src.garden/grass.postgresql/d.rast.pg'
gcc -g -O2 -I/opt/grass/src/include -c buildInfxQry.c -o
OBJ.i686-pc-linux-gnu/buildInfxQry.o
gcc -g -O2 -I/opt/grass/src/include -c runInfxFile.c -o
OBJ.i686-pc-linux-gnu/runInfxFile.o
runInfxFile.c:6: libpq-fe.h: No such file or directory

This is a standard PostgreSQL header. You probably need to re-run
configure with the --with-postgres-includes= switch.

make[1]: *** [OBJ.i686-pc-linux-gnu/runInfxFile.o] Error 1
make[1]: Leaving directory /opt/grass/src.garden/grass.postgresql/d.rast.pg'
make: *** [all] Error 2

  Is this a user error on my part or a bug in the latest source code?

Technically the former, but it was worked around until a few weeks ago
by configure automatically adding -I switches as it saw fit.
Unfortunately the workaround meant that certain systems (particularly
those using gcc in conjunction with the vendor's libc headers) could
not be made to build GRASS without manual hacking of the "head" file.

Currently, configure doesn't add any -I switches unless it is told to
by the --with-includes switch or the appropriate --with-*-includes
switch (apart from X_CFLAGS, which is set by AC_PATH_XTRA, typically
by running Imake).

At present, configure only generates warnings for missing libraries
(libpq normally goes in a standard directory; it's only the headers
which are "hidden"). I'll add warnings for missing headers.

--
Glynn Clements <glynn.clements@virgin.net>

On Mon, 10 Sep 2001, Glynn Clements wrote:

This is a standard PostgreSQL header. You probably need to re-run
configure with the --with-postgres-includes= switch.

  Thanks, Glynn. That did it.

  If anyone's interested, here are the contents of error.log:

[root@salmo grass]# less error.log
GRASS GIS compilation log
-------------------------
Start of compilation: Sun Sep 9 20:58:25 PDT 2001
Errors:
Compilation error in module: src/imagery/i.fft (ignored)
Compilation error in module: src/imagery/i.zc (ignored)
Compilation error in module: src/raster/r.in.png (ignored)
Compilation error in module: src/raster/r.out.png (ignored)
Compilation error in module: src/raster/r.surf.fractal (ignored)
Compilation error in module: src.contrib/CERL/imagery/i.shape (ignored)
End of compilation: Sun Sep 9 21:06:04 PDT 2001
DONE generating GRASS GIS binary code

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
+ 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                 Making environmentally-responsible mining happen.

Rich Shepard wrote:

  If anyone's interested, here are the contents of error.log:

Compilation error in module: src/imagery/i.fft (ignored)
Compilation error in module: src/imagery/i.zc (ignored)
Compilation error in module: src/raster/r.surf.fractal (ignored)
Compilation error in module: src.contrib/CERL/imagery/i.shape (ignored)

These all require the FFTW library (either for fft(), or for del2g()
which uses fft()). configure should have generated a warning if it
couldn't find it.

Compilation error in module: src/raster/r.in.png (ignored)
Compilation error in module: src/raster/r.out.png (ignored)

These both require the PNG library. Again, configure should have
generated a warning if it couldn't find it. If you have it, and
configure found it, I'd be interested in the actual error messages.

--
Glynn Clements <glynn.clements@virgin.net>

On Mon, 10 Sep 2001, Glynn Clements wrote:

These all require the FFTW library (either for fft(), or for del2g()
which uses fft()). configure should have generated a warning if it
couldn't find it.

Glynn,

  Where do I find a copy of the FFTW library so I can install it here?

These both require the PNG library. Again, configure should have
generated a warning if it couldn't find it. If you have it, and
configure found it, I'd be interested in the actual error messages.

  After 'make install' completed, I followed the directions to hand craft
the PNG capabilities. I assume, therefore, that these two error messages are
no longer valid.

  Since I have all the PNG libraries installed, I assume configure found
them; if not, there's a problem here. But, when I manually built them (with
gmake5, I believe) no error messages were generated.

  I'm heading out of town for most of the week so review of the config.log
will have to wait.

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
+ 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                 Making environmentally-responsible mining happen.

On Mon, Sep 10, 2001 at 06:04:27AM -0700, Rich Shepard wrote:

On Mon, 10 Sep 2001, Glynn Clements wrote:

> These all require the FFTW library (either for fft(), or for del2g()
> which uses fft()). configure should have generated a warning if it
> couldn't find it.

Glynn,

  Where do I find a copy of the FFTW library so I can install it here?

Rich,

you may have a look in REQUIREMENTS.html:
     * FFTW (library for computing the Discrete Fourier Transform)
       required for i.fft and i.ifft modules
       [http://www.fftw.org]

Installation should be easy. Sorry for this extra dependency, but the
copyright restrictions of "Numerical Receipes in C" are the reason.

[...]

Regards,

Markus

Rich Shepard wrote:

> These all require the FFTW library (either for fft(), or for del2g()
> which uses fft()). configure should have generated a warning if it
> couldn't find it.

  Where do I find a copy of the FFTW library so I can install it here?

  www.fftw.org

> These both require the PNG library. Again, configure should have
> generated a warning if it couldn't find it. If you have it, and
> configure found it, I'd be interested in the actual error messages.

  After 'make install' completed, I followed the directions to hand craft
the PNG capabilities. I assume, therefore, that these two error messages are
no longer valid.

  Since I have all the PNG libraries installed, I assume configure found
them; if not, there's a problem here. But, when I manually built them (with
gmake5, I believe) no error messages were generated.

There are two sets of programs which may require PNG: r.{in,out}.png
and PNGdriver. The first two are built by "make", and any error
messages will appear in error.log.

PNGdriver is only built if you follow the instructions and run
"gmake5" directly, as it requires GD. However, PNGdriver itself
doesn't require the PNG library, but the GD library does - sometimes.
Some versions of GD (e.g. the one shipped with RedHat 6.2, which I'm
using) can only write (non-LZW) GIF images; in this case, PNGdriver
can be built successfully without PNG being installed.

--
Glynn Clements <glynn.clements@virgin.net>