Opened 5 months ago

Closed 5 months ago

#70208 closed defect (fixed)

c-ares now broken: error: ‘F_GETFL’ undeclared (first use in this function)

Reported by: barracuda156 Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: tiger, leopard, snowleopard Cc: ryandesign (Ryan Carsten Schmidt), catap (Kirill A. Korinsky), ballapete (Peter "Pete" Dyballa)
Port: c-ares

Description

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_dns_write.c: In function ‘ares_dns_write_rr’:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_dns_write.c:939: warning: passing argument 2 of ‘ares__buf_append_be16’ with different width due to prototype
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_dns_write.c:946: warning: passing argument 2 of ‘ares__buf_append_be16’ with different width due to prototype
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_dns_write.c:965: warning: passing argument 2 of ‘ares__buf_append_be16’ with different width due to prototype
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_dns_write.c:1048: warning: passing argument 2 of ‘ares__buf_append_be16’ with different width due to prototype
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c: In function ‘ares_event_configchg_init’:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:370: warning: implicit declaration of function ‘fcntl’
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:370: warning: nested extern declaration of ‘fcntl’
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:370: error: ‘F_GETFL’ undeclared (first use in this function)
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:370: error: (Each undeclared identifier is reported only once
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:370: error: for each function it appears in.)
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:371: error: ‘F_SETFL’ undeclared (first use in this function)
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c:371: error: ‘O_NONBLOCK’ undeclared (first use in this function)
:info:build make[2]: *** [src/lib/CMakeFiles/c-ares.dir/ares_event_configchg.c.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....

Issue upstream: https://github.com/c-ares/c-ares/issues/784 The issue is different from #70207

Attachments (2)

patch_src-lib-ares_event_configchg.c.diff (301 bytes) - added by ballapete (Peter "Pete" Dyballa) 5 months ago.
Patch to correct absence of sys/fcntl.h in src/lib/ares_event_configchg.c
main.log (1.0 MB) - added by ballapete (Peter "Pete" Dyballa) 5 months ago.
Main.log from PPC Leopard, Mac OS X 10.5.8, with patch applied

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:2 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

The missing macros are #define'd in /usr/include/sys/fcntl.h:

127:#define	O_NONBLOCK	0x0004		/* no delay */
188:#define	F_GETFL		3		/* get file status flags */
189:#define	F_SETFL		4		/* set file status flags */

The reason for this behaviour is clear, sys/fcntl.h is never included on __APPLE__ computers:

. ../../../c-ares-1.30.0/src/lib/ares_setup.h
.. ../../../build/ares_config.h
.. ../../../build/ares_build.h
... /usr/include/sys/types.h
.... /usr/include/sys/appleapiopts.h
.... /usr/include/sys/cdefs.h
.... /usr/include/machine/types.h
..... /usr/include/ppc/types.h
...... /usr/include/ppc/_types.h
.... /usr/include/sys/_types.h
..... /usr/include/machine/_types.h
.... /usr/include/machine/endian.h
..... /usr/include/ppc/endian.h
...... /usr/include/sys/_endian.h
.... /usr/include/sys/_structs.h
... /usr/include/sys/socket.h
.... /usr/include/machine/_param.h
..... /usr/include/ppc/_param.h
.. ../../../c-ares-1.30.0/include/ares_rules.h
.. ../../../c-ares-1.30.0/src/lib/setup_once.h
... /usr/include/stdio.h
.... /usr/include/_types.h
... /usr/include/stdlib.h
.... /usr/include/available.h
.... /usr/include/sys/wait.h
..... /usr/include/sys/signal.h
...... /usr/include/machine/signal.h
....... /usr/include/ppc/signal.h
........ /usr/include/ppc/_structs.h
...... /usr/include/sys/_structs.h
....... /usr/include/machine/_structs.h
........ /usr/include/ppc/_structs.h
......... /usr/include/mach/ppc/_structs.h
..... /usr/include/sys/resource.h
...... /usr/include/sys/_structs.h
.... /usr/include/alloca.h
... /usr/include/string.h
... /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdarg.h
... /usr/include/ctype.h
.... /usr/include/runetype.h
... /usr/include/errno.h
.... /usr/include/sys/errno.h
... /usr/include/sys/stat.h
.... /usr/include/sys/_structs.h
... /usr/include/sys/time.h
.... /usr/include/sys/_structs.h
.... /usr/include/time.h
..... /usr/include/_structs.h
...... /usr/include/sys/_structs.h
.... /usr/include/sys/_select.h
... /usr/include/unistd.h
.... /usr/include/sys/unistd.h
.... /usr/include/sys/select.h
..... /usr/include/sys/_structs.h
. ../../../c-ares-1.30.0/include/ares.h
.. ../../../c-ares-1.30.0/include/ares_version.h
.. ../../../c-ares-1.30.0/include/ares_build.h
.. ../../../c-ares-1.30.0/include/ares_rules.h
.. /usr/include/netinet/in.h
... /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h
... /usr/include/netinet6/in6.h
.. ../../../c-ares-1.30.0/include/ares_dns_record.h
. ../../../c-ares-1.30.0/src/lib/ares_private.h
.. ../../../c-ares-1.30.0/src/lib/ares_ipv6.h
.. ../../../c-ares-1.30.0/src/lib/ares__llist.h
.. ../../../c-ares-1.30.0/src/lib/ares__slist.h
.. ../../../c-ares-1.30.0/src/lib/ares__htable_strvp.h
.. ../../../c-ares-1.30.0/src/lib/ares__htable_szvp.h
.. ../../../c-ares-1.30.0/src/lib/ares__htable_asvp.h
.. ../../../c-ares-1.30.0/src/lib/ares__htable_vpvp.h
.. ../../../c-ares-1.30.0/src/lib/ares__buf.h
.. ../../../c-ares-1.30.0/src/lib/ares_dns_private.h
.. ../../../c-ares-1.30.0/src/lib/ares__iface_ips.h
.. ../../../c-ares-1.30.0/src/lib/ares__threads.h
.. ../../../c-ares-1.30.0/src/lib/ares_str.h
.. ../../../c-ares-1.30.0/src/lib/ares_strsplit.h
. ../../../c-ares-1.30.0/src/lib/ares_event.h
. /usr/include/notify.h
.. /usr/include/mach/message.h
... /usr/include/mach/port.h
.... /usr/include/mach/boolean.h
..... /usr/include/mach/machine/boolean.h
...... /usr/include/mach/ppc/boolean.h
.... /usr/include/mach/machine/vm_types.h
..... /usr/include/mach/ppc/vm_types.h
...... /usr/include/ppc/vmparam.h
... /usr/include/mach/kern_return.h
.... /usr/include/mach/machine/kern_return.h
..... /usr/include/mach/ppc/kern_return.h
.. /usr/include/AvailabilityMacros.h
. /usr/include/dlfcn.h
.. /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdbool.h

Here it only has:

#  include <sys/types.h>
#  include <unistd.h>
#  include <notify.h>
#  include <dlfcn.h>

comment:3 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

When CMake configures the software it checks for the existence of C header files, so sys/fcntl.h should be added to that list in, presumably, CMakeFiles/CMakeConfigureLog.yaml?

comment:4 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

This failure can easily be fixed with the attached patch:

[ 30%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_event_configchg.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build/src/lib && /usr/bin/gcc-4.2 -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -D_DARWIN_C_SOURCE -Dc_ares_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib -pipe -Os -DNDEBUG -I/opt/local/include -Wall -Wextra -Wcast-align -Wconversion -Wdeclaration-after-statement -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunused -Wvariadic-macros -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Qunused-arguments -std=gnu89 -arch ppc -mmacosx-version-min=10.5 -fPIC -MD -MT src/lib/CMakeFiles/c-ares.dir/ares_event_configchg.c.o -MF CMakeFiles/c-ares.dir/ares_event_configchg.c.o.d -o CMakeFiles/c-ares.dir/ares_event_configchg.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c
[ 31%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_event_epoll.c.o

but then new failures appear:

[ 83%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build/src/lib && /usr/bin/gcc-4.2 -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -D_DARWIN_C_SOURCE -Dc_ares_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib -pipe -Os -DNDEBUG -I/opt/local/include -Wall -Wextra -Wcast-align -Wconversion -Wdeclaration-after-statement -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunused -Wvariadic-macros -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Qunused-arguments -std=gnu89 -arch ppc -mmacosx-version-min=10.5 -fPIC -MD -MT src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o -MF CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o.d -o CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c:54:
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:31:29: error: os/availability.h: No such file or directory

The absence of os/availability.h produces a long list of errors better to be looked at in my main.log file.

Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

Patch to correct absence of sys/fcntl.h in src/lib/ares_event_configchg.c

comment:5 in reply to:  4 ; Changed 5 months ago by barracuda156

Replying to ballapete:

This failure can easily be fixed with the attached patch:

[ 30%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_event_configchg.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build/src/lib && /usr/bin/gcc-4.2 -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -D_DARWIN_C_SOURCE -Dc_ares_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib -pipe -Os -DNDEBUG -I/opt/local/include -Wall -Wextra -Wcast-align -Wconversion -Wdeclaration-after-statement -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunused -Wvariadic-macros -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Qunused-arguments -std=gnu89 -arch ppc -mmacosx-version-min=10.5 -fPIC -MD -MT src/lib/CMakeFiles/c-ares.dir/ares_event_configchg.c.o -MF CMakeFiles/c-ares.dir/ares_event_configchg.c.o.d -o CMakeFiles/c-ares.dir/ares_event_configchg.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_event_configchg.c
[ 31%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_event_epoll.c.o

but then new failures appear:

[ 83%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build/src/lib && /usr/bin/gcc-4.2 -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -D_DARWIN_C_SOURCE -Dc_ares_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib -pipe -Os -DNDEBUG -I/opt/local/include -Wall -Wextra -Wcast-align -Wconversion -Wdeclaration-after-statement -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunused -Wvariadic-macros -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Qunused-arguments -std=gnu89 -arch ppc -mmacosx-version-min=10.5 -fPIC -MD -MT src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o -MF CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o.d -o CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c:54:
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:31:29: error: os/availability.h: No such file or directory

The absence of os/availability.h produces a long list of errors better to be looked at in my main.log file.

This fixes everything and produces working binaries: https://github.com/macports/macports-ports/pull/24458

But now it takes forever to merge -_-

Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard, Mac OS X 10.5.8, with patch applied

comment:6 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

I wonder why CMake does not check the exitence of os/availability.h

comment:7 in reply to:  5 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

Replying to barracuda156:

But now it takes forever to merge -_-

You mean it takes a long time until the text appears in the browser's window? This is why encounter since some time…

comment:8 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

After removing os/availability.h GCC 4.2 reports:

In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c:54:
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:113: warning: no previous prototype for ‘dns_configuration_notify_key’
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h: In function ‘dns_configuration_notify_key’:

src/lib/thirdparty/apple/dnsinfo.h has the prototype – guarded by statements I do not know how to interpret:

__BEGIN_DECLS

/*
 * DNS configuration access APIs
 */
const char *
dns_configuration_notify_key    (void)				API_AVAILABLE(macos(10.4), ios(2.0));

dns_config_t *
dns_configuration_copy		(void)				API_AVAILABLE(macos(10.4), ios(2.0));

void
dns_configuration_free		(dns_config_t	*config)	API_AVAILABLE(macos(10.4), ios(2.0));

void
_dns_configuration_ack		(dns_config_t	*config,
				 const char	*bundle_id)	API_AVAILABLE(macos(10.8), ios(6.0));

__END_DECLS

Maybe GCC7 is an appropriate compiler?

comment:9 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

I tried to use another patch that includes fnctl.h instead od sys/fnctl.h – and it makes no (visible) difference…

comment:10 Changed 5 months ago by ballapete (Peter "Pete" Dyballa)

GCC7 is no solution (at least not yet):

[ 83%] Building C object src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build/src/lib && /opt/local/bin/gcc-mp-7 -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -D_DARWIN_C_SOURCE -Dc_ares_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib -pipe -Os -DNDEBUG -I/opt/local/include -Wall -Wextra -Wcast-align -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-coverage-mismatch -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wtrampolines -Wundef -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Wimplicit-fallthrough=3 -Werror=implicit-int -Werror=implicit-function-declaration -std=gnu90 -arch ppc -mmacosx-version-min=10.5 -fPIC -MD -MT src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o -MF CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o.d -o CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c:54:0:
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:113:1: warning: no previous prototype for 'dns_configuration_notify_key' [-Wmissing-prototypes]
 dns_configuration_notify_key    (void)    API_AVAILABLE(macos(10.4), ios(2.0));
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h: In function 'dns_configuration_notify_key':
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:113:43: error: expected declaration specifiers before 'API_AVAILABLE'
 dns_configuration_notify_key    (void)    API_AVAILABLE(macos(10.4), ios(2.0));
                                           ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:116:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'API_AVAILABLE'
 dns_configuration_copy  (void)    API_AVAILABLE(macos(10.4), ios(2.0));
                                   ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:119:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'API_AVAILABLE'
 dns_configuration_free  (dns_config_t *config) API_AVAILABLE(macos(10.4), ios(2.0));
                                                ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:123:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'API_AVAILABLE'
      const char *bundle_id) API_AVAILABLE(macos(10.8), ios(6.0));
                             ^~~~~~~~~~~~~

This not the C programming language I learned in last millenium!

comment:11 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

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

Pete, you don't need to do any further investigating. The problem is already solved in the PR mentioned above. Just wait for it to be merged.

comment:12 Changed 5 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 716024da0953ba766d759383640212bb0fa63665/macports-ports (master):

c-ares: fix for older systems: patch from upstream

Fixes: #70208
Fixes: #70207

Note: See TracTickets for help on using tickets.