Opened 8 years ago

Closed 7 years ago

#54218 closed defect (fixed)

gmt4-4.5.14_4+gdal fails to compile

Reported by: EJFielding (Eric Fielding) Owned by: florian@…
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: Cc: tenomoto (Takeshi Enomoto)
Port: gmt4

Description

Port gmt4-4.5.14_4+gdal+triangle fails to compile. It looks like it could be a problem with the gdal.h header. The main.log file is attached

Attachments (1)

main.log (23.2 KB) - added by EJFielding (Eric Fielding) 8 years ago.
main.log file

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by EJFielding (Eric Fielding)

Attachment: main.log added

main.log file

comment:1 Changed 8 years ago by EJFielding (Eric Fielding)

I should add that my active gdal is gdal @2.2.0_0+expat+geos+hdf4+hdf5+netcdf+openjpeg+postgresql95+sqlite3

comment:2 Changed 8 years ago by EJFielding (Eric Fielding)

Since I still had an older version of gdal installed, I tried "Activating gdal @2.1.3_0+expat+geos+hdf4+hdf5+netcdf+openjpeg+postgresql95+sqlite3". Now gmt4 builds without problems, so it seems that the problem is with gdal @2.2.0_0.

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

The log says:

:info:build In file included from /opt/local/include/gdal.h:42:
:info:build /opt/local/include/cpl_port.h:126:99: error: invalid token at start of a preprocessor expression
:info:build #if defined(GDAL_COMPILATION) && defined(__sun__) && __STDC_VERSION__ >= 201112L && _XOPEN_SOURCE < 600

So gdal's header assumes _XOPEN_SOURCE is a number. But gmt4's source files define it to empty: #define _XOPEN_SOURCE. As far as I can tell, gmt4 is wrong and this has already been fixed in gmt4 @4.5.15. See #54223 and http://gmt.soest.hawaii.edu/issues/817.

comment:4 Changed 8 years ago by mf2k (Frank Schima)

Cc: tenomoto added; florian@… takeshi@… removed
Owner: set to florian@…
Status: newassigned

comment:5 Changed 7 years ago by Ryan Schmidt <git@…>

Resolution: fixed
Status: assignedclosed

In 9c64c44305311dc2e7e2f4ab8991de19a74b1e9f/macports-ports:

gmt4: Update to 4.5.15

Closes: #54218
Closes: #54223

Note: See TracTickets for help on using tickets.