Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#34 closed defect (fixed)

proj: projects.h missing

Reported by: jef Owned by: warmerdam
Priority: minor Component: Package
Version: Keywords: pkg-proj
Cc: mloskot

Description

The proj package 4.6.1-1 is missing projects.h used for example by GRASS' g.region.

Change History (14)

comment:1 Changed 10 years ago by mloskot

Cc: mloskot added

I'm also interested in this issue. I would like to use projects.h included in OSGeo4W for building PostGIS using Visual C++ compiler.

comment:2 Changed 10 years ago by warmerdam

Component: DocumentationPackage
Keywords: pkg-proj added
Owner: changed from osgeo4w-dev@… to warmerdam

projects.h is considered to be a private include file. Can anyone comment on why it is used by g.region?

I'm going to work with the postgis team today to try and remove their dependency. I've also run into this with OGDI which depends on projects.h, but for my local efforts, I just copy it in to my local tree.

If it isn't practical to resolve these issues, I'll just add projects.h in the package.

comment:3 in reply to:  2 Changed 10 years ago by jef

Replying to warmerdam:

projects.h is considered to be a private include file. Can anyone comment on why it is used by g.region?

I'm going to work with the postgis team today to try and remove their dependency. I've also run into this with OGDI which depends on projects.h, but for my local efforts, I just copy it in to my local tree.

If it isn't practical to resolve these issues, I'll just add projects.h in the package.

It uses pj_factors() to calculate convergence (like proj(1) does): http://trac.osgeo.org/grass/browser/grass/trunk/general/g.region/printwindow.c#L573

comment:4 Changed 10 years ago by mloskot

Following Frank's advice, I recall my comment. This is no longer an issue in PostGIS as it's been fixed.

comment:5 Changed 8 years ago by hamish

Hi,

I've just been made aware of this bug. I'm responsible for adding the include projects.h to GRASS's g.region, to print the convergence angle (at the center of the current region bounds) as noted by Jürgen in comment:3. As projects.h ships with all the proj-dev packages I've ever come across, and grass has a rather intertwined code relationship with proto- and modern proj4, at the time mixing it up a bit more it didn't seem like it would be a problem.

this patch was prepared to work around the problem:

https://trac.osgeo.org/grass/attachment/ticket/1271/grass64svn_osgeo4w_gregion.patch

but I don't like cloning code unless it is absolutely necessary. is it?

thanks, Hamish

comment:6 in reply to:  4 Changed 8 years ago by jef

Replying to mloskot:

Following Frank's advice, I recall my comment. This is no longer an issue in PostGIS as it's been fixed.

The link doesn't work for me. http://trac.osgeo.org/postgis/ticket/126 PostGIS #126 does.

comment:7 Changed 8 years ago by warmerdam

Hamish, I'll look into removing projects.h from the list of installed headers. It should be treated as private and functions only available in projects.h are not really intended to be used by client applications.

If there is a function you think should be part of the public API let me know via ticket.

comment:8 in reply to:  7 ; Changed 8 years ago by hamish

Replying to warmerdam:

Hamish, I'll look into removing projects.h from the list of installed headers. It should be treated as private and functions only available in projects.h are not really intended to be used by client applications.

ok; to avoid mass breakage I'd request that we coordinate releasing GRASS 6.4.1 with this problem fixed before releasing a new version of PROJ.4 with the header removed.

If there is a function you think should be part of the public API let me know via ticket.

that would be projects.h's pj_factors(,,, &fact) to get access to fact.conv.

filed as PROJ.4 ticket # 98

https://trac.osgeo.org/proj/ticket/98

time flies like an arrow, fruit flies like a banana,

https://trac.osgeo.org/proj/changeset/804

thanks, Hamish

comment:9 in reply to:  8 ; Changed 8 years ago by martinl

Replying to hamish:

ok; to avoid mass breakage I'd request that we coordinate releasing GRASS 6.4.1 with this problem fixed before releasing a new version of PROJ.4 with the header removed.

what's the status? 6.4.1 is knocking on the door. I have no problem to copy part of the header and later to use pj_factor from public API.

comment:10 Changed 8 years ago by jef

Resolution: fixed
Status: newclosed

Um, apparently Frank fixed it months ago:

jef@xblade13:~$ ls -l osgeo4w/release/proj/proj-4.7.0-3.tar.bz2
-rw-r--r-- 1 warmerdam users 304919 Oct 20 17:42 osgeo4w/release/proj/proj-4.7.0-3.tar.bz2
jef@xblade13:~$ tar tjvf osgeo4w/release/proj/proj-4.7.0-3.tar.bz2 include/projects.h
-rw-r--r-- warmerda/None 14687 2010-10-20 17:43 include/projects.h

comment:11 Changed 8 years ago by martinl

OK, anyway when compiling GRASS module g.region http://trac.osgeo.org/grass/browser/grass/trunk/general/g.region/printwindow.c I getting

gcc  -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused   -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include   -I/usr/local/include -I/usr/local/include -DPACKAGE=\""grassmods"\"   -I/usr/local/include -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -I/usr/local/src/grass_trunk/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/printwindow.o -c printwindow.c
In file included from /usr/local/include/projects.h:248:0,
                 from printwindow.c:5:
/usr/local/include/proj_api.h:61:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/local/include/proj_api.h:82:34: error: expected ‘)’ before ‘const’
/usr/local/include/proj_api.h:95:30: error: expected ‘)’ before ‘int’
/usr/local/include/proj_api.h:96:35: error: expected ‘)’ before ‘const’
/usr/local/include/proj_api.h:108:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pj_get_default_ctx’
/usr/local/include/proj_api.h:109:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pj_get_ctx’
/usr/local/include/proj_api.h:110:26: error: expected declaration specifiers or ‘...’ before ‘projCtx’
/usr/local/include/proj_api.h:111:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pj_ctx_alloc’
/usr/local/include/proj_api.h:114:33: error: expected ‘)’ before ‘int’
/usr/local/include/proj_api.h:115:33: error: expected ‘)’ before ‘int’
/usr/local/include/proj_api.h:116:34: error: expected ‘)’ before ‘void’
/usr/local/include/proj_api.h:117:36: error: expected ‘)’ before ‘void’
/usr/local/include/proj_api.h:120:22: error: expected ‘)’ before ‘ctx’

comment:12 in reply to:  11 ; Changed 8 years ago by jef

Replying to martinl:

In file included from /usr/local/include/projects.h:248:0,

Isn't that a different proj installation? Or did you install OSGeo4W to /usr/local?

comment:13 in reply to:  9 Changed 8 years ago by hamish

Replying to martinl:

Replying to hamish:

ok; to avoid mass breakage I'd request that we coordinate releasing GRASS 6.4.1 with this problem fixed before releasing a new version of PROJ.4 with the header removed.

what's the status?

in proj4: see https://trac.osgeo.org/proj/ticket/98

in grass: experimental patch applied in 6.5svn and trunk, see https://trac.osgeo.org/grass/changeset/45469

in osgeo4w: as jef points out in comment:10 the missing file shouldn't be missing any more (caveat, see proj4 bug # 98), so is the current failure due to a stale osgeo4w install on the wingrass nightly build server, or..? do the 6.5svn and trunk builds work?

best, Hamish

comment:14 in reply to:  12 Changed 8 years ago by martinl

Replying to jef:

Replying to martinl:

In file included from /usr/local/include/projects.h:248:0,

Isn't that a different proj installation? Or did you install OSGeo4W to /usr/local?

sorry, this bug is not related to OSGeo4W. See https://trac.osgeo.org/grass/ticket/1335

Note: See TracTickets for help on using tickets.