Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#55963 closed defect (fixed)

wgrib2 build fail - log shows errors when compiling gctpc.c

Reported by: GeneralDuke9 Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: wgrib2

Description

I was updating MacPorts when building wgrib2 failed. It is a dependency for ncarg.

Going through the main.log (attached) it shows that it fails when compiling gctpc.c, it throws some errors about undeclared identifiers and then exits. I've tried installing an older version of both ncarg and wgrib2 (by downloading the git repo and checking out the appropriate commit) but it didn't work.

I'm running macOS High Sierra 10.13.3 (latest) and the latest version of MacPorts 2.4.2. I'm using gcc7 as default variant.

Attachments (1)

main.log (98.1 KB) - added by GeneralDuke9 7 years ago.
Debug log of building wgrib2

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by GeneralDuke9

Attachment: main.log added

Debug log of building wgrib2

comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)

Cc: tenomoto removed
Owner: set to tenomoto
Status: newassigned

comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

The missing symbols are defined in /opt/local/include/gctpc/proj.h.

The problem is that wgrib2 depends on proj, and proj provides the completely unrelated file /opt/local/include/proj.h which doesn't define those symbols, and the build system finds this file first, because the portfile supplies the -I flags to the build system in the wrong order.

proj was recently updated to version 5.0.0. Previous versions of proj did not provide a file called /opt/local/include/proj.h so the problem did not exist before.

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

Resolution: fixed
Status: assignedclosed

In 1faf2455a7cce0405d0e0d7a21ae5b7bbce9e0e2/macports-ports:

wgrib2: Fix order of -I flags

Fixes build with proj 5.

Closes: #55963

comment:4 Changed 7 years ago by GeneralDuke9

Thanks for the quick fix!

Note: See TracTickets for help on using tickets.