[GRASS-dev] recent updates to Vlib break vectors in GRASS 7

I just updated from the svn trunk and tried to compile GRASS. I noticed that there have been very recent updates to Vlib. I also hit errors in Vlib that cascaded through all the rest of the vector modules. I wonder if this is an issue with compiling to 64 bit?

Compiling on Mac OS X 10.6. Here are the errors in Vlib.

cmb-MBP-3:grass70_dev cmbarton$

cmb-MBP-3:grass70_dev cmbarton$ cd /Users/Shared/grass_dev/grass70_dev/lib/vector/Vlib
cmb-MBP-3:Vlib cmbarton$ make
gcc -g -O2 -arch i386 -arch x86_64 -fno-common -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/GDAL.framework/Versions/1.7/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grasslibs"\" -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -o OBJ.i386-apple-darwin10.5.0/open_ogr.o -c open_ogr.c
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22: error: proj_api.h: No such file or directory
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:35: error: expected specifier-qualifier-list before ‘projPJ’
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22: error: proj_api.h: No such file or directory
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:35: error: expected specifier-qualifier-list before ‘projPJ’
lipo: can't figure out the architecture type of: /var/folders/AK/AKpYwDw1EoWI+fFF02nvRk+++TI/-Tmp-//cckHGdhr.out

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Mon, Dec 27, 2010 at 6:14 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

I just updated from the svn trunk and tried to compile GRASS. I noticed that there have been very recent updates to Vlib. I also hit errors in Vlib that cascaded through all the rest of the vector modules. I wonder if this is an issue with compiling to 64 bit?

Compiling on Mac OS X 10.6. Here are the errors in Vlib.

cmb-MBP-3:grass70_dev cmbarton$

cmb-MBP-3:grass70_dev cmbarton$ cd /Users/Shared/grass_dev/grass70_dev/lib/vector/Vlib
cmb-MBP-3:Vlib cmbarton$ make
gcc -g -O2 -arch i386 -arch x86_64 -fno-common -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/GDAL.framework/Versions/1.7/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grasslibs"\" -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -o OBJ.i386-apple-darwin10.5.0/open_ogr.o -c open_ogr.c
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22: error: proj_api.h: No such file or directory

-> No such file or directory

Did you
"make distclean"
and configure again?

Markus

I did make distclean, svn up, configure, and make

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 27, 2010, at 10:28 AM, Markus Neteler wrote:

On Mon, Dec 27, 2010 at 6:14 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

I just updated from the svn trunk and tried to compile GRASS. I noticed that there have been very recent updates to Vlib. I also hit errors in Vlib that cascaded through all the rest of the vector modules. I wonder if this is an issue with compiling to 64 bit?

Compiling on Mac OS X 10.6. Here are the errors in Vlib.

cmb-MBP-3:grass70_dev cmbarton$

cmb-MBP-3:grass70_dev cmbarton$ cd /Users/Shared/grass_dev/grass70_dev/lib/vector/Vlib
cmb-MBP-3:Vlib cmbarton$ make
gcc -g -O2 -arch i386 -arch x86_64 -fno-common -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/GDAL.framework/Versions/1.7/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grasslibs"\" -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -o OBJ.i386-apple-darwin10.5.0/open_ogr.o -c open_ogr.c
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22: error: proj_api.h: No such file or directory

-> No such file or directory

Did you
"make distclean"
and configure again?

Markus

Michael wrote:

In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22:
error: proj_api.h: No such file or directory

it's not finding the proj4 includes.

Hamish

On Tue, Dec 28, 2010 at 6:51 AM, Hamish <hamish_b@yahoo.com> wrote:

Michael wrote:

In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22:
error: proj_api.h: No such file or directory

it's not finding the proj4 includes.

On Linux 64bit I have no problems to compile.

Markus

On Dec 28, 2010, at 1:20 AM, Markus Neteler wrote:

On Tue, Dec 28, 2010 at 6:51 AM, Hamish <hamish_b@yahoo.com> wrote:

Michael wrote:

gcc -g -O2 -arch i386 -arch x86_64 -fno-common -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/GDAL.framework/Versions/1.7/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grasslibs"\" -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -o OBJ.i386-apple-darwin10.5.0/open_ogr.o -c open_ogr.c
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22:
error: proj_api.h: No such file or directory

it's not finding the proj4 includes.

On Linux 64bit I have no problems to compile.

It needs the PROJ include dir in the compile command. It'll work on Linux since all includes are in /usr/[local/]include. On OS X it's a separate PROJ framework.

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

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy

Thanks for finding the problem William. How can this be fixed?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 28, 2010, at 7:29 AM, William Kyngesburye wrote:

On Dec 28, 2010, at 1:20 AM, Markus Neteler wrote:

On Tue, Dec 28, 2010 at 6:51 AM, Hamish <hamish_b@yahoo.com> wrote:

Michael wrote:

gcc -g -O2 -arch i386 -arch x86_64 -fno-common -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/GDAL.framework/Versions/1.7/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grasslibs"\" -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -o OBJ.i386-apple-darwin10.5.0/open_ogr.o -c open_ogr.c
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22:
error: proj_api.h: No such file or directory

it's not finding the proj4 includes.

On Linux 64bit I have no problems to compile.

It needs the PROJ include dir in the compile command. It'll work on Linux since all includes are in /usr/[local/]include. On OS X it's a separate PROJ framework.

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

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy

It's VECT_INC and is set in one of the makefile fragments, I think. It used to be all in grass.make. Glynn's the master of all that makefile magic.

On Dec 28, 2010, at 8:36 AM, Barton Michael wrote:

Thanks for finding the problem William. How can this be fixed?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 28, 2010, at 7:29 AM, William Kyngesburye wrote:

On Dec 28, 2010, at 1:20 AM, Markus Neteler wrote:

On Tue, Dec 28, 2010 at 6:51 AM, Hamish <hamish_b@yahoo.com> wrote:

Michael wrote:

gcc -g -O2 -arch i386 -arch x86_64 -fno-common -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -D_FILE_OFFSET_BITS=64 -I/Library/Frameworks/GDAL.framework/Versions/1.7/Headers -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include -DPACKAGE=\""grasslibs"\" -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -I/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include -o OBJ.i386-apple-darwin10.5.0/open_ogr.o -c open_ogr.c
In file included from open_ogr.c:26:
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-darwin10.5.0/include/grass/gprojects.h:21:22:
error: proj_api.h: No such file or directory

it's not finding the proj4 includes.

On Linux 64bit I have no problems to compile.

It needs the PROJ include dir in the compile command. It'll work on Linux since all includes are in /usr/[local/]include. On OS X it's a separate PROJ framework.

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

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

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

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

William Kyngesburye wrote:

It's VECT_INC and is set in one of the makefile fragments, I think. It
used to be all in grass.make. Glynn's the master of all that makefile
magic.

VECT_INC has been empty for a long time now, and it never contained
$(PROJINC) directly or indirectly.

It was first added to Grass.make.in in r11189 on 2003-02-27, at which
time it had the value $(PQINCPATH). It stayed that way until r12781 on
2004-05-21, when it became empty. And it has been empty ever since.

Any code which uses PROJ headers should be using $(PROJINC).

You may be thinking of VECT_CFLAGS, which is defined as:

  VECT_CFLAGS = $(GDALCFLAGS) $(GEOSCFLAGS)

FWIW, I suspect that this issue may have been hidden in the past due
to "gdal-config --cflags" providing the necessary switches. GDAL
itself uses PROJ, although its headers don't require the PROJ headers.

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

So what changed to make it show up now?

The main question is how to fix it.

My configure string always has included a set of paths to proj. I'm using the same configure string now that I was using a few days back when GRASS 7 compiled without errors.

./configure --with-freetype --with-freetype-includes="/Library/Frameworks/FreeType.framework/unix/include/freetype2 /Library/Frameworks/FreeType.framework/unix/include" --with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib --with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config --with-proj --with-proj-includes=/Library/Frameworks/PROJ.framework/unix/include --with-proj-libs=/Library/Frameworks/PROJ.framework/unix/lib --with-proj-share=/Library/Frameworks/PROJ.framework/Resources/proj --with-geos=/Library/Frameworks/GEOS.framework/Programs/geos-config --with-jpeg-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-jpeg-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-png-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-png-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-tiff-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-tiff-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-cairo --with-cairo-includes="/Library/Frameworks/cairo.framework/unix/include/cairo /Library/Frameworks/cairo.framework/unix/include" --with-cairo-libs=/Library/Frameworks/cairo.framework/unix/lib --with-cairo-ldflags="-lcairo" --without-postgres --without-mysql --with-odbc --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-x --with-cxx --with-opengl=aqua --without-readline --prefix=/Applications/GRASS --enable-macosx-app --with-python --with-wxwidgets=/usr/local/lib/wxPython-unicode-2.8.11.0/bin/wx-config --with-tcltk-includes="/Library/Frameworks/Tcl.framework/Headers /Library/Frameworks/Tk.framework/Headers /Library/Frameworks/Tk.framework/PrivateHeaders" --with-tcltk-libs="/usr/local/tcltk_active/lib" --with-macosx-archs="i386 x86_64"

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 28, 2010, at 9:33 PM, Glynn Clements wrote:

William Kyngesburye wrote:

It's VECT_INC and is set in one of the makefile fragments, I think. It
used to be all in grass.make. Glynn's the master of all that makefile
magic.

VECT_INC has been empty for a long time now, and it never contained
$(PROJINC) directly or indirectly.

It was first added to Grass.make.in in r11189 on 2003-02-27, at which
time it had the value $(PQINCPATH). It stayed that way until r12781 on
2004-05-21, when it became empty. And it has been empty ever since.

Any code which uses PROJ headers should be using $(PROJINC).

You may be thinking of VECT_CFLAGS, which is defined as:

  VECT_CFLAGS = $(GDALCFLAGS) $(GEOSCFLAGS)

FWIW, I suspect that this issue may have been hidden in the past due
to "gdal-config --cflags" providing the necessary switches. GDAL
itself uses PROJ, although its headers don't require the PROJ headers.

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

On Dec 28, 2010, at 10:33 PM, Glynn Clements wrote:

William Kyngesburye wrote:

It's VECT_INC and is set in one of the makefile fragments, I think. It
used to be all in grass.make. Glynn's the master of all that makefile
magic.

VECT_INC has been empty for a long time now, and it never contained
$(PROJINC) directly or indirectly.

It was first added to Grass.make.in in r11189 on 2003-02-27, at which
time it had the value $(PQINCPATH). It stayed that way until r12781 on
2004-05-21, when it became empty. And it has been empty ever since.

Any code which uses PROJ headers should be using $(PROJINC).

You may be thinking of VECT_CFLAGS, which is defined as:

  VECT_CFLAGS = $(GDALCFLAGS) $(GEOSCFLAGS)

FWIW, I suspect that this issue may have been hidden in the past due
to "gdal-config --cflags" providing the necessary switches. GDAL
itself uses PROJ, although its headers don't require the PROJ headers.

gdal-config has never returned the PROJ inc flag as far as I can tell, at least for the OSX framework.

I suspect it's because r44722 added gprojects.h to Vlib, in particular that open_ogr.c where Michael got the error. There are a lot sources in vlib, so I didn't check if any others included gprojects.h indirectly.

So, the question then: add PROJINC to VECT_CFLAGS (for all vector stuff) or to the vlib makefile only?

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

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

William Kyngesburye wrote:

I suspect it's because r44722 added gprojects.h to Vlib, in particular
that open_ogr.c where Michael got the error.

Erm, yeah. That's sounds like the most likely explanation.

There are a lot sources in
vlib, so I didn't check if any others included gprojects.h indirectly.

So, the question then: add PROJINC to VECT_CFLAGS (for all vector stuff)
or to the vlib makefile only?

Vlib/Makefile only.

The reason for VECT_CFLAGS is that vector.h includes geos_c.h and
vect/dig_structs.h includes ogr_api.h, so *anything* which uses those
headers needs the appropriate -I switches or an error will occur, even
if the module doesn't actually use the structure or function
declarations which use the OGR/GEOS types.

But simply including the vector headers doesn't pull in the PROJ
headers, so there's no need for VECT_CFLAGS to contain $(PROJINC).

Ideally, -I switches (and to a lesser extent, -L switches) should be
kept to a minimum; the more directories in a search path, the greater
the chance of encountering conflicting file names.

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

Will this be difficult to fix?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 29, 2010, at 4:32 PM, Glynn Clements wrote:

William Kyngesburye wrote:

I suspect it's because r44722 added gprojects.h to Vlib, in particular
that open_ogr.c where Michael got the error.

Erm, yeah. That's sounds like the most likely explanation.

There are a lot sources in
vlib, so I didn't check if any others included gprojects.h indirectly.

So, the question then: add PROJINC to VECT_CFLAGS (for all vector stuff)
or to the vlib makefile only?

Vlib/Makefile only.

The reason for VECT_CFLAGS is that vector.h includes geos_c.h and
vect/dig_structs.h includes ogr_api.h, so *anything* which uses those
headers needs the appropriate -I switches or an error will occur, even
if the module doesn't actually use the structure or function
declarations which use the OGR/GEOS types.

But simply including the vector headers doesn't pull in the PROJ
headers, so there's no need for VECT_CFLAGS to contain $(PROJINC).

Ideally, -I switches (and to a lesser extent, -L switches) should be
kept to a minimum; the more directories in a search path, the greater
the chance of encountering conflicting file names.

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

Try it now.

On Jan 2, 2011, at 6:16 PM, Barton Michael wrote:

Will this be difficult to fix?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 29, 2010, at 4:32 PM, Glynn Clements wrote:

William Kyngesburye wrote:

I suspect it's because r44722 added gprojects.h to Vlib, in particular
that open_ogr.c where Michael got the error.

Erm, yeah. That's sounds like the most likely explanation.

There are a lot sources in
vlib, so I didn't check if any others included gprojects.h indirectly.

So, the question then: add PROJINC to VECT_CFLAGS (for all vector stuff)
or to the vlib makefile only?

Vlib/Makefile only.

The reason for VECT_CFLAGS is that vector.h includes geos_c.h and
vect/dig_structs.h includes ogr_api.h, so *anything* which uses those
headers needs the appropriate -I switches or an error will occur, even
if the module doesn't actually use the structure or function
declarations which use the OGR/GEOS types.

But simply including the vector headers doesn't pull in the PROJ
headers, so there's no need for VECT_CFLAGS to contain $(PROJINC).

Ideally, -I switches (and to a lesser extent, -L switches) should be
kept to a minimum; the more directories in a search path, the greater
the chance of encountering conflicting file names.

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

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

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

The equator is so long, it could encircle the earth completely once.

It compiled without errors. Thanks!

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Jan 2, 2011, at 5:57 PM, William Kyngesburye wrote:

Try it now.

On Jan 2, 2011, at 6:16 PM, Barton Michael wrote:

Will this be difficult to fix?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Dec 29, 2010, at 4:32 PM, Glynn Clements wrote:

William Kyngesburye wrote:

I suspect it's because r44722 added gprojects.h to Vlib, in particular
that open_ogr.c where Michael got the error.

Erm, yeah. That's sounds like the most likely explanation.

There are a lot sources in
vlib, so I didn't check if any others included gprojects.h indirectly.

So, the question then: add PROJINC to VECT_CFLAGS (for all vector stuff)
or to the vlib makefile only?

Vlib/Makefile only.

The reason for VECT_CFLAGS is that vector.h includes geos_c.h and
vect/dig_structs.h includes ogr_api.h, so *anything* which uses those
headers needs the appropriate -I switches or an error will occur, even
if the module doesn't actually use the structure or function
declarations which use the OGR/GEOS types.

But simply including the vector headers doesn't pull in the PROJ
headers, so there's no need for VECT_CFLAGS to contain $(PROJINC).

Ideally, -I switches (and to a lesser extent, -L switches) should be
kept to a minimum; the more directories in a search path, the greater
the chance of encountering conflicting file names.

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

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

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

The equator is so long, it could encircle the earth completely once.