Opened 8 years ago
Closed 8 years ago
#53975 closed defect (fixed)
GnuTLS @3.5.11 fails to build to PPC Tiger, Mac OS X 10.4.11, because of unavailable Availability.h C header file
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.1 |
Keywords: | tiger | Cc: | |
Port: | gnutls |
Description
libtool: compile: /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/opt/local/share/locale\" -I./../gl -I./../gl -I./includes -I./x509 -I./includes -I./includes -I./x509 -I/opt/local/include/p11-kit-1 -I./opencdk -I/opt/local/include -fno-common -W -Wabi -Waddress -Wall -Wattributes -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wcomments -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wextra -Wformat-extra-args -Wformat-security -Wformat-zero-length -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-prototypes -Wmultichar -Wnested-externs -Wnonnull -Wold-style-definition -Woverflow -Woverride-init -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wreturn-type -Wsequence-point -Wshadow -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-macros -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnormalized=nfc -Wno-missing-field-initializers -Wno-missing-field-initializers -Wno-unused-parameter -fdiagnostics-show-option -I/opt/local/include/p11-kit-1 -pipe -Os -arch ppc -MT system/certs.lo -MD -MP -MF system/.deps/certs.Tpo -c system/certs.c -fno-common -DPIC -o system/.libs/certs.o cc1: warning: command line option "-Wabi" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-Wdeprecated" is valid for C++/ObjC++ but not for C system/certs.c:50:27: error: Availability.h: No such file or directory make[4]: *** [system/certs.lo] Error 1 make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_gnutls/gnutls/work/gnutls-3.5.11/lib' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_gnutls/gnutls/work/gnutls-3.5.11/lib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_gnutls/gnutls/work/gnutls-3.5.11/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_gnutls/gnutls/work/gnutls-3.5.11' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_gnutls/gnutls/work/gnutls-3.5.11' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_gnutls/gnutls/work/gnutls-3.5.11" && /usr/bin/make -w all Exit code: 2
Leopard, Mac OS X 10.5, has:
/Volumes/Leopard/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/CFMCarbon/AvailabilityMacros.h /Volumes/Leopard/Developer/SDKs/MacOSX10.4u.sdk/usr/include/AvailabilityMacros.h /Volumes/Leopard/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/AvailabilityMacros.h /Volumes/Leopard/Developer/SDKs/MacOSX10.5.sdk/usr/include/Availability.h /Volumes/Leopard/Developer/SDKs/MacOSX10.5.sdk/usr/include/AvailabilityInternal.h /Volumes/Leopard/Developer/SDKs/MacOSX10.5.sdk/usr/include/AvailabilityMacros.h /Volumes/Leopard/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/AvailabilityMacros.h /Volumes/Leopard/usr/include/Availability.h /Volumes/Leopard/usr/include/AvailabilityInternal.h
Tiger has:
/Developer/SDKs/MacOSX10.3.9.sdk/Developer/Headers/CFMCarbon/AvailabilityMacros.h /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/AvailabilityMacros.h /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin7/4.0.0/include/AvailabilityMacros.h /Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/CFMCarbon/AvailabilityMacros.h /Developer/SDKs/MacOSX10.4u.sdk/usr/include/AvailabilityMacros.h /System/Library/Perl/Extras/5.8.6/HeaderDoc/Availability.list /opt/mports/trunk/dports/devel/ld64/files/ld64-97-no-Availability.h.patch /usr/include/AvailabilityMacros.h
Its AvailabilityMacros.h file seems to be equivalent to Availability.h.
Attachments (4)
Change History (13)
Changed 8 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 8 years ago by Schamschula (Marius Schamschula)
Cc: | mps@… removed |
---|---|
Owner: | set to Schamschula |
Status: | new → assigned |
comment:2 Changed 8 years ago by Schamschula (Marius Schamschula)
Unfortunately, I have no way of testing this (my oldest test machine runs Leopard PPC), which has built this version of gnutls cleanly. Patches welcome.
comment:3 Changed 8 years ago by mf2k (Frank Schima)
Keywords: | tiger added; Tiger removed |
---|
comment:4 follow-up: 6 Changed 8 years ago by kencu (Ken)
Changed 8 years ago by Schamschula (Marius Schamschula)
Attachment: | patch-lib-system-certs.c.diff added |
---|
Changed 8 years ago by Schamschula (Marius Schamschula)
comment:6 Changed 8 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
See:
https://trac.macports.org/attachment/ticket/51451/patch-tests-pkcs11-pkcs11-mock.c.2.diff
I used a similar patch – and GnuTLS 3.5.11 built meanwhile (100 minutes).
comment:7 Changed 8 years ago by kencu (Ken)
Marius,
that patch needed one more #endif to work, but did work
$ port -v installed gnutls The following ports are currently installed: gnutls @3.3.21_0 platform='darwin 8' archs='ppc' date='2016-03-01T11:45:13-0800' gnutls @3.4.13_0 platform='darwin 8' archs='ppc' date='2016-07-11T19:36:18-0700' gnutls @3.4.14_0 platform='darwin 8' archs='ppc' date='2016-08-23T00:01:51-0700' gnutls @3.4.15_0 platform='darwin 8' archs='ppc' date='2016-09-13T22:48:22-0700' gnutls @3.4.16_1 platform='darwin 8' archs='ppc' date='2016-10-15T15:49:43-0700' gnutls @3.4.17_0 platform='darwin 8' archs='ppc' date='2016-12-23T16:49:05-0800' gnutls @3.5.8_0 platform='darwin 8' archs='ppc' date='2017-02-08T15:28:19-0800' gnutls @3.5.9_0 platform='darwin 8' archs='ppc' date='2017-02-24T18:04:11-0800' gnutls @3.5.10_0 platform='darwin 8' archs='ppc' date='2017-03-27T04:51:37-0700' gnutls @3.5.11_0 (active) platform='darwin 8' archs='ppc' date='2017-04-14T10:27:24-0700'
here's the revised bit
#ifdef __APPLE__ # include <CoreFoundation/CoreFoundation.h> # include <Security/Security.h> #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 # include <Availability.h> #else # include <AvailabilityMacros.h> #endif #endif #endif
Of note, it also works perfectly well to do this instead:
sudo ln -s /usr/include/AvailabilityMacros.h /usr/include/Availability.h
even tho that is terribly evil and to be scorned. :>
comment:8 Changed 8 years ago by kencu (Ken)
here's a new patchfile with the correction, with the same name, that works.
Changed 8 years ago by kencu (Ken)
Attachment: | patch-lib-system-certs.c.2.diff added |
---|
comment:9 Changed 8 years ago by Schamschula (Marius Schamschula)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
main.log from Tiger