[GRASS-user] configure: error: *** Could not determine External PROJ.4 version."

Hi,

I am trying to install Grass 6.3 from sources on Mac OSX 10.5 and I get the following error:

"checking External PROJ.4 version... configure: error: *** Could not determine External PROJ.4 version."

In the config.log file, I see:

configure:6805: checking for location of External PROJ.4 includes
configure:6831: checking for proj_api.h
configure:6839: gcc -E -I/opt/proj/include conftest.c >/dev/null 2>conftest.out
configure:6873: checking External PROJ.4 version
configure:6893: gcc -o conftest.dSYM -g -O2 -I/opt/proj/include conftest.c 1>&5
configure: failed program was:
#line 6881 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <proj_api.h>
int main(void) {
  FILE *fp = fopen("conftestdata","w");
  fprintf(fp, "%d", PJ_VERSION);
  return 0;
}

I have the Proj library installed in /opt/proj, and I've run the checks that come with the Proj installation package, and as far as I can tell it is installed correctly (it passes all of the included tests).

Does anybody have any suggestions on what to do?

thank you,
Laura

On Sep 9, 2008, at 4:21 PM, Laura Toma wrote:

configure:6873: checking External PROJ.4 version
configure:6893: gcc -o conftest.dSYM -g -O2 -I/opt/proj/include conftest.c 1>&5

There are problems when configuring with the default CFLAGS (-g -O2 above). The debug flag causes trouble with configure in some cases. Set CFLAGS and CXXFLAGS explicitly before running configure, like:

export CFLAGS=-Os
export CXXFLAGS=-Os

(-Os is the standard OSX optimization)

If you really want debug symbols, then you must edit platform.make after configuring to add -g to CFLAGS and CXXFLAGS.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."

- Marvin

Laura Toma wrote:

I am trying to install Grass 6.3 from sources on Mac OSX 10.5 and I
get the following error:

"checking External PROJ.4 version... configure: error: *** Could not
determine External PROJ.4 version."

In the config.log file, I see:

configure:6893: gcc -o conftest.dSYM -g -O2 -I/opt/proj/include conftest.c 1>&5

Does anybody have any suggestions on what to do?

As William says, set CFLAGS to something without -g when running
configure. Onc configure has finished, you can use e.g.

  make CFLAGS1='-g -O2'

to override the CFLAGS value passed to configure.

A detailed description of the issue can be found in:

http://lists.osgeo.org/pipermail/grass-dev/2008-May/037803.html

This has been fixed in the 6.4/7.0 development versions.

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

On Sep 9, 2008, at 6:45 PM, Glynn Clements wrote:

As William says, set CFLAGS to something without -g when running
configure. Onc configure has finished, you can use e.g.

  make CFLAGS1='-g -O2'

to override the CFLAGS value passed to configure.

Oh, neat. Better than editing platform.make.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy