[MacPorts] #71560: exim fails to build: exim.h: error: unknown type name 'res_state'
MacPorts
noreply at macports.org
Thu Dec 19 06:13:33 UTC 2024
#71560: exim fails to build: exim.h: error: unknown type name 'res_state'
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords:
Port: exim |
---------------------------+--------------------
Comment (by ryandesign):
Replying to [ticket:71560 barracuda156]:
> Initially the build fails if Xcode gcc is used:
> {{{
> exim.h:438: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘os_get_dns_resolver_res’
> macro_predef.c:84: error: ‘for’ loop initial declaration used outside
C99 mode
> }}}
> The first error remains even if `-std=c99` flags is used
That's not possible. Enabling C99 mode will resolve that problem. However,
if you had tried to add this in `configure.cflags`, then I would guess
that the build system doesn't honor CFLAGS or the Portifle hasn't been
programmed to pass them along. (I see the Portfile uses a custom configure
phase.) I see from a buildbot log, for example, that `-Os`, which should
be used since it is in our default CFLAGS, is not present. So this bug
needs to be solved first.
> Modern gcc does not accept `-no-cpp-precomp`:
> {{{
> gcc-mp-14: error: unrecognized command-line option '-no-cpp-precomp'
> }}}
> So I removed that flag.
Yes, gcc 2.95 is the last version where that flag did anything; it should
be removed.
https://www.mistys-internet.website/blog/blog/2013/10/19/no-cpp-precomp-
the-compiler-flag-that-time-forgot/
> Then the build still fails on this:
> {{{
> exim.h:438:1: error: unknown type name 'res_state'
> 438 | res_state os_get_dns_resolver_res(void);
> | ^~~~~~~~~
> }}}
`res_state` should be defined in resolv.h. exim.h does include resolv.h on
line 424 so I wouldn't expect this error.
--
Ticket URL: <https://trac.macports.org/ticket/71560#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list