Opened 12 years ago

Closed 12 years ago

#34981 closed defect (fixed)

grass: projects.h not found

Reported by: quantum7@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: lucalelli, tenomoto (Takeshi Enomoto)
Port: grass

Description

I get the following error when trying to install grass:

--->  Cleaning grass
~ $ sudo port install grass
--->  Computing dependencies for grass
--->  Fetching archive for grass
--->  Attempting to fetch grass-6.4.0_1.darwin_10.x86_64.tbz2 from http://packages.macports.org/grass
--->  Fetching distfiles for grass
--->  Verifying checksum(s) for grass
--->  Extracting grass
--->  Applying patches to grass
--->  Configuring grass
--->  Building grass
Error: org.macports.build for port grass returned: command execution failed
Please see the log file for port grass for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_grass/grass/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port grass failed

The log suggests running make from the directory /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_grass/grass/work/grass-6.4.0/general/g.region

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_grass/grass/work/grass-6.4.0/general/g.region $ make
/usr/bin/gcc-4.2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_grass/grass/work/grass-6.4.0/dist.i386-apple-darwin10.8.0/include -I/opt/local/include -O2 -arch x86_64    -I/opt/local/include    -DPACKAGE=\""grassmods"\"  -I/opt/local/include -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_grass/grass/work/grass-6.4.0/dist.i386-apple-darwin10.8.0/include -o OBJ.i386-apple-darwin10.8.0/printwindow.o -c printwindow.c
printwindow.c:3:22: error: projects.h: No such file or directory
printwindow.c: In function ‘print_window’:
printwindow.c:485: error: storage size of ‘fact’ isn’t known
printwindow.c:572: error: ‘LP’ undeclared (first use in this function)
printwindow.c:572: error: (Each undeclared identifier is reported only once
printwindow.c:572: error: for each function it appears in.)
printwindow.c:572: error: expected ‘;’ before ‘lp’
printwindow.c:573: error: ‘lp’ undeclared (first use in this function)
make: *** [OBJ.i386-apple-darwin10.8.0/printwindow.o] Error 1

Some googling suggests that projects.h is a member of libproj4, but the error persists if I install the libproj4 package. So it's not a simple missing dependency, but a deeper build error.

I am running MacPorts base version 2.1.1 on OS 10.6.8.

Attachments (1)

main.log (5.2 MB) - added by quantum7@… 12 years ago.
Error log

Change History (12)

Changed 12 years ago by quantum7@…

Attachment: main.log added

Error log

comment:1 Changed 12 years ago by quantum7@…

Cc: quantum7@… added

Cc Me!

comment:2 Changed 12 years ago by lucalelli

i get the same error when building CDO with

sudo port clean cdo
sudo port install cdo
--->  Building cdo
Error: org.macports.build for port cdo returned: command execution failed

then the main.log has the following

:info:build grid.c:25:24: error: projects.h: No such file or directory

Same system as the OP: Macports 2.1.1, OS 10.6.8, Xcode 3.2.6, gcc 4.2.1

So before issuing a new ticket, i thick could be related.

comment:3 Changed 12 years ago by lucalelli

Cc: lelli.luca@… added

Cc Me!

comment:4 in reply to:  description Changed 12 years ago by lucalelli

Some googling suggests that projects.h is a member of libproj4, but the error persists if I install the libproj4 package.

I have the same error for CDO. Similar to GRASS, CDO relies on chartographic projections and the library libproj4. If i issue the command

port contents libproj4
Port libproj4 contains:
  /opt/local/bin/lproj4
  /opt/local/include/lib_proj.h
  /opt/local/lib/libproj4.a

there's no file 'projects.h', 'lib_proj.h' instead. AFAIK, Macports doesn't support manual dependencies, but i can surely be wrong.

comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: quantum7@… removed
Summary: Error compiling GRASS: project.h not foundgrass: project.h not found

Looks like "projects.h" was intentionally removed from proj in version 4.8.0, to which the proj port was recently updated. "projects.h" is a private proj header that other software should never have been using; now proj is enforcing this.

This ticket is about grass. File additional tickets for cdo and any other port that needs to be fixed. Each port needs to be fixed individually.

As a workaround for now, you could downgrade to proj 4.7.0. This might have other consequences though.

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: grass: project.h not foundgrass: projects.h not found

comment:7 in reply to:  5 Changed 12 years ago by lucalelli

Replying to ryandesign@…:

Looks like "projects.h" was intentionally removed from proj in version 4.8.0,

to which the proj port was recently updated. "projects.h" is a private proj header that other software should never have been using;

now proj is enforcing this.

Indeed, thanks for pointing this out.

This ticket is about grass. File additional tickets for cdo and any other port that needs to be fixed. Each port needs to be fixed individually.

Ok, i will.

As a workaround for now, you could downgrade to proj 4.7.0. This might have other consequences though.

It worked. Istalled proj revision 58983, activated it and reinstalled cdo.

So far no apparent consequences on other gis ports though (gmt, for instance).

Thanks a lot.

comment:8 Changed 12 years ago by quantum7@…

Thanks for the workaround, Ryan. So is this a bug that should be filed with the GRASS developers?

comment:9 Changed 12 years ago by tenomoto (Takeshi Enomoto)

Cc: takeshi@… added

Cc Me!

comment:10 Changed 12 years ago by tenomoto (Takeshi Enomoto)

I created a patch of proj (#35009). This is an adhoc fix. The developers of grass and cdo (#34991) should use the public header proj_api.h rather than the private header projects.h. I will ask the developers of cdo to see if they can address the problem.

comment:11 Changed 12 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed

Upon Ryan's comment, I abandoned the patch and created proj47 port. I also found that it does not work with clang. I allowed both openmotif and lesstif (#24960). Committed in r94769.

Note: See TracTickets for help on using tickets.