Opened 14 years ago

Closed 14 years ago

#1335 closed defect (fixed)

g.region compilation fails with recent proj

Reported by: martinl Owned by: grass-dev@…
Priority: blocker Milestone: 6.4.1
Component: Compiling Version: svn-releasebranch64
Keywords: g.region, proj Cc: hamish
CPU: Unspecified Platform: Linux

Description

Using fresh proj4 from SVN I am getting error when compiling g.region, see also https://trac.osgeo.org/proj/ticket/98

gcc -I/usr/local/src/grass64_release/dist.i686-pc-linux-gnu/include  -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused    -I/usr/local/include -I/usr/local/include   -DPACKAGE=\""grassmods"\"  -I/usr/local/include -I/usr/local/src/grass64_release/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’
make: *** [OBJ.i686-pc-linux-gnu/printwindow.o] Error 1

Change History (7)

comment:1 by hamish, 14 years ago

Cc: hamish added

as per comments in https://trac.osgeo.org/osgeo4w/ticket/34,

  • does it build in 6.5svn and trunk? (see comment 3 in ticket # 34, and r45469 in 6.5svn)
  • does it build on wingrass if you use proj-4.7.0-3 from osgeo4w?

Apparently in proj4 trunk svn rev 1975 some headers were dropped from trunk/proj/src/Makefile.in, including the req'd projects.h.

I had hoped that would be delayed until we could determine another public way to get at the convergence angle, and for us to get our source updated & released.

Backporting r45469 to relbr64 is the partial quick-fix, but doesn't help solve the root of the problem, and that patch would need to have the #ifdef __MINGW32__ stuff removed.

:-/ Hamish

comment:2 by hamish, 14 years ago

try r45789 in 6.5svn and r45790 in trunk.

rebuild and g.region -n needs to be tested, I am concerned about multiple definitions of the function causing problems on systems not using proj4-trunk.

Hamish

in reply to:  2 ; comment:3 by martinl, 14 years ago

Replying to hamish:

try r45789 in 6.5svn and r45790 in trunk.

rebuild and g.region -n needs to be tested, I am concerned about multiple definitions of the function causing problems on systems not using proj4-trunk.

thanks, +1 for backport to relbr64. Martin

in reply to:  3 ; comment:4 by martinl, 14 years ago

Replying to martinl:

rebuild and g.region -n needs to be tested, I am concerned about multiple definitions of the function causing problems on systems not using proj4-trunk.

thanks, +1 for backport to relbr64. Martin

I would really vote for this backport, 6.4.1 is knocking on the door...

in reply to:  4 ; comment:5 by mmetz, 14 years ago

Replying to martinl:

Replying to martinl:

rebuild and g.region -n needs to be tested, I am concerned about multiple definitions of the function causing problems on systems not using proj4-trunk.

thanks, +1 for backport to relbr64. Martin

I would really vote for this backport, 6.4.1 is knocking on the door...

Tested in 6.5 with proj-4.7.0, working fine here.

in reply to:  5 comment:6 by martinl, 14 years ago

Replying to mmetz:

Tested in 6.5 with proj-4.7.0, working fine here.

Also works for me...

comment:7 by hamish, 14 years ago

Resolution: fixed
Status: newclosed

universal dropping of projects.h backported to relbr64 in r45878.

fingers crossed..

Hamish

Note: See TracTickets for help on using tickets.