[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #20023 [Applications/Tor Browser]: Upgrade Go to 1.7.3 (was: Upgrade Go to 1.7.1)
#20023: Upgrade Go to 1.7.3
--------------------------------------+---------------------
Reporter: dcf | Owner: dcf
Type: task | Status: new
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-gitian | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------------------+---------------------
Comment (by dcf):
I got it building using the 10.7 SDK. But I also had to patch one of the
source files (root_cgo_darwin.go, the source of the problematic new code)
in order to remove what appears to be contradictory CFLAGS.
{{{
#cgo CFLAGS: -mmacosx-version-min=10.6
-D__MAC_OS_X_VERSION_MAX_ALLOWED=1060
}}}
These flags seems to say that the 10.6 SDK is required. But the
SecCertificateCopyNormalizedSubjectContent and
SecCertificateCopyNormalizedIssuerContent functions are first available in
the 10.7 SDK. Trying to compile with these flags says
{{{
crypto/x509/root_cgo_darwin.go:114: error:
'SecCertificateCopyNormalizedSubjectContent' is unavailable (declared at
/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h:460)
crypto/x509/root_cgo_darwin.go:119: error:
'SecCertificateCopyNormalizedIssuerContent' is unavailable (declared at
/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h:443)
}}}
even though the functions are present in the SDK, presumably because the
build thinks it's on 10.6 because of the CFLAGS. In the 10.7 SDK, these
two functions are annotated with `__OSX_AVAILABLE_STARTING(__MAC_10_7,
__IPHONE_NA)`, which is the source of the "unavailable" message.
The CFLAGS seem like an error to me. I'm planning to file an issue in go
and ask the developers' perspective.
Simply deleting `-D__MAC_OS_X_VERSION_MAX_ALLOWED=1060` allows the build
to finish, so that's what I'm going to go ahead with. The other
alternative, I suppose, is to start using the 10.8 SDK. (Although I don't
see how it could compile even under 10.8, unless the availability
annotations are removed in the 10.8 SDK.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20023#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs