[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #20023 [Applications/Tor Browser]: Upgrade Go to 1.7.1



#20023: Upgrade Go to 1.7.1
--------------------------------------+---------------------
 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):

 This is going to be a little more work than I expected. Some cgo
 components have changed in 1.7 in ways that affect the build.

 The build error in comment:5 was caused by this:
 {{{
 # crypto/x509
 crypto/x509/root_cgo_darwin.go: In function 'FetchPEMRoots':
 crypto/x509/root_cgo_darwin.go:97: error: 'for' loop initial declaration
 used outside C99 mode
 crypto/x509/root_cgo_darwin.go:106: error: 'for' loop initial declaration
 used outside C99 mode
 }}}
 MacPorts has a ticket with the same error:
 https://trac.macports.org/ticket/52506
 I think it's caused by the old gcc we use in the mac descriptor.

 If I add `-std=gnu99` to CFLAGS, the build gets a little farther, but then
 fails at:
 {{{
 crypto/x509/root_cgo_darwin.go: In function 'FetchPEMRoots':
 crypto/x509/root_cgo_darwin.go:114: warning: implicit declaration of
 function 'SecCertificateCopyNormalizedSubjectContent'
 crypto/x509/root_cgo_darwin.go:114: warning: initialization makes pointer
 from integer without a cast
 crypto/x509/root_cgo_darwin.go:119: warning: implicit declaration of
 function 'SecCertificateCopyNormalizedIssuerContent'
 crypto/x509/root_cgo_darwin.go:119: warning: initialization makes pointer
 from integer without a cast
 ...
 Undefined symbols for architecture i386:
   "_SecCertificateCopyNormalizedSubjectContent", referenced from:
       _FetchPEMRoots in root_cgo_darwin.cgo2.o
   "_SecCertificateCopyNormalizedIssuerContent", referenced from:
       _FetchPEMRoots in root_cgo_darwin.cgo2.o
 ld: symbol(s) not found for architecture i386
 }}}
 MacPort has a ticket for this error too:
 https://trac.macports.org/ticket/52036

 Both of these errors are caused by the same piece of new C code in 1.7:
 https://golang.org/cl/20351

 The Apple docs say that
 [https://developer.apple.com/reference/security/1392318-seccertificatecopynormalizedissu
 SecCertificateCopyNormalizedIssuerContent] requires SDK 1.7 or later. My
 plan is to next try building with the 10.7 SDK rather than 10.6.

 Potentially related golang tickets:
   https://github.com/golang/go/issues/14514
   https://github.com/golang/go/issues/16473
   https://github.com/golang/go/issues/16508

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20023#comment:6>
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