Opened 7 weeks ago
Closed 6 weeks ago
#70409 closed defect (fixed)
c-ares @1.32.2 does not build on PPC Tiger, Mac OS X 10.4.11, because of error: expected declaration specifiers before '__OSX_AVAILABLE_STARTING'?
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | tiger ppc | Cc: | toby@… |
Port: | c-ares |
Description
[ 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-apple-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.32.2 -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.32.2/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.32.2/src/lib -pipe -Os -DNDEBUG -I/opt/local/include -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -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 -Wunreachable-code -Wunused -Wvariadic-macros -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Qunused-arguments -Wno-long-long -std=gnu89 -arch ppc -mmacosx-version-min=10.4 -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.32.2/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.32.2/src/lib/ares_sysconfig_mac.c:61: /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.32.2/src/lib/thirdparty/apple/dnsinfo.h:106: 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.32.2/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.32.2/src/lib/thirdparty/apple/dnsinfo.h:106: error: expected declaration specifiers before '__OSX_AVAILABLE_STARTING' /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.32.2/src/lib/thirdparty/apple/dnsinfo.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__OSX_AVAILABLE_STARTING' /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.32.2/src/lib/thirdparty/apple/dnsinfo.h:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__OSX_AVAILABLE_STARTING' /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.32.2/src/lib/ares_sysconfig_mac.c:71: error: storage class specified for parameter 'dnsinfo_t' /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.32.2/src/lib/ares_sysconfig_mac.c:73: error: expected ')' before '*' token /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.32.2/src/lib/ares_sysconfig_mac.c:86: error: expected ')' before '*' token /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.32.2/src/lib/ares_sysconfig_mac.c:154: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token /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.32.2/src/lib/ares_sysconfig_mac.c:166: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token /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.32.2/src/lib/ares_sysconfig_mac.c:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token /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.32.2/src/lib/ares_sysconfig_mac.c:337: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token /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.32.2/src/lib/ares_sysconfig_mac.c:372: error: old-style parameter declarations in prototyped function definition /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.32.2/src/lib/ares_sysconfig_mac.c:372: error: expected '{' at end of input /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.32.2/src/lib/ares_sysconfig_mac.c:372: warning: no return statement in function returning non-void make[2]: *** [src/lib/CMakeFiles/c-ares.dir/ares_sysconfig_mac.c.o] Error 1 make[2]: Leaving directory `/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'
Attachments (1)
Change History (13)
Changed 7 weeks ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 7 weeks ago by tobypeterson
There were earlier failures about API_AVAILABLE, but apparently people are trying to build this on operating systems so old that they don't even have the older availability macros. Given that c-ares appears to only use this header internally, we can probably just delete the availability attributes entirely?
comment:2 Changed 7 weeks ago by tobypeterson
Can you try adding this before the uses of __OSX_AVAILABLE_STARTING
in dnsinfo.h?
#ifndef __OSX_AVAILABLE_STARTING #define __OSX_AVAILABLE_STARTING(_osx, _ios) #endif
comment:3 Changed 7 weeks ago by ballapete (Peter "Pete" Dyballa)
This might take a few days … I booted into Leopard
and am upgrading there. But it can happen that here the same error appears!
comment:4 Changed 7 weeks ago by ballapete (Peter "Pete" Dyballa)
On PPC Leopard
it built without problem…
c-ares @1.28.1_0 requested_variants='' platform='darwin 9' archs='ppc' date='2024-04-13T23:24:19+0200' c-ares @1.32.2_0 (active) requested_variants='' platform='darwin 9' archs='ppc' date='2024-07-21T23:11:39+0200'
comment:5 Changed 6 weeks ago by ballapete (Peter "Pete" Dyballa)
On PPC Tiger, Mac OS X 10.4.11
, it built with your addition, but the process finished with:
---> Cleaning c-ares ---> Removing work directory for c-ares ---> Computing dependencies for c-ares. Error: can't create directory "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares": permission denied Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_c-ares/c-ares/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port c-ares failed
although port
later tells me that c-ares is not outdated
and I have:
c-ares @1.28.1_0 requested_variants='' platform='darwin 8' archs='ppc' date='2024-04-30T04:58:06+0200' c-ares @1.32.2_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2024-07-24T13:59:11+0200'
comment:7 Changed 6 weeks ago by tobypeterson
Pushed a patch that adds the __OSX_AVAILABLE_STARTING
stuff above. Can you see if you're able to get past that permissions issue? If you can't, attach that main.log ...
comment:8 Changed 6 weeks ago by ballapete (Peter "Pete" Dyballa)
Nothing was left – because (some) success. I started a new build without selfupdate before but with -vd. Maybe I can see a bit more!
comment:9 Changed 6 weeks ago by ballapete (Peter "Pete" Dyballa)
I tried a few times but failed to reproduce the permission error. Without a patch file I first had to extract
, edit dnsinfo.h with sudo vi
, and then build
or directly upgrade
. On neither this nor that path the failure happened again. Tried each path twice.
comment:10 Changed 6 weeks ago by tobypeterson
Just to make absolutely sure - does it now build for you with the patch I added?
comment:11 Changed 6 weeks ago by ballapete (Peter "Pete" Dyballa)
Yes, it builds with your patch! First the update was invisible (same version number for Portfile), but then I saw the files subdirectory and its contents. The upgrade from the old saved version @1.28.1_0 to @1.32.2_0 worked once more.
comment:12 Changed 6 weeks ago by tobypeterson
Resolution: | → fixed |
---|---|
Status: | new → closed |
I didn't bump the revision because it doesn't change anything - build fix only. Anyway, thanks for double-checking. Closing this ticket.
Main.log from PPC Tiger, Mac OS X 10.4.11