Opened 16 months ago

Last modified 14 months ago

#52036 new defect

go @1.7_0: crypto/x509 build fails with "'SecCertificateCopyNormalizedSubjectContent' is unavailable"

Reported by: iEFdev (Eric F) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: lion Cc: ryandesign (Ryan Schmidt)
Port: go

Description

Latest go failed to build… and then tried to reinstall it with:

$ sudo port clean --all go
$ sudo port -v -s upgrade go

Last part:

# crypto/x509
crypto/x509/root_cgo_darwin.go:114:28: error: 'SecCertificateCopyNormalizedSubjectContent' is unavailable
                        CFDataRef subjectName = SecCertificateCopyNormalizedSubjectContent(cert, &errRef);
                                                ^
/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h:459:11: note: function has been explicitly marked unavailable here
CFDataRef SecCertificateCopyNormalizedSubjectContent(SecCertificateRef certificate, CFErrorRef *error)
          ^
crypto/x509/root_cgo_darwin.go:119:27: error: 'SecCertificateCopyNormalizedIssuerContent' is unavailable
                        CFDataRef issuerName = SecCertificateCopyNormalizedIssuerContent(cert, &errRef);
                                               ^
/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h:442:11: note: function has been explicitly marked unavailable here
CFDataRef SecCertificateCopyNormalizedIssuerContent(SecCertificateRef certificate, CFErrorRef *error)
          ^
2 errors generated.
cmd/link
cmd/compile/internal/gc
cmd/compile/internal/amd64
cmd/compile/internal/arm64
cmd/compile/internal/arm
cmd/compile/internal/ppc64
cmd/compile/internal/mips64
cmd/compile/internal/s390x
cmd/compile/internal/x86
cmd/compile
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_go/go/work/go/src" && ./make.bash 
Exit code: 2
Error: org.macports.build for port go returned: command execution failed
Warning: targets not executed for go: org.macports.install org.macports.build org.macports.destroot
Please see the log file for port go for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_go/go/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Attaching the log file.

Attachments (2)

go@1.7-main.log (15.7 KB) - added by iEFdev (Eric F) 16 months ago.
go@1.7.1-main.log (16.8 KB) - added by iEFdev (Eric F) 15 months ago.

Download all attachments as: .zip

Change History (7)

Changed 16 months ago by iEFdev (Eric F)

comment:1 Changed 16 months ago by larryv (Lawrence Velázquez)

  • Keywords lion added
  • Owner changed from macports-tickets@… to ciserlohn@…
  • Port go added
  • Summary changed from go @1.7 build error to go @1.7_0: crypto/x509 build fails on Lion

comment:2 Changed 16 months ago by larryv (Lawrence Velázquez)

  • Cc ryandesign@… added
  • Summary changed from go @1.7_0: crypto/x509 build fails on Lion to go @1.7_0: crypto/x509 build fails with "'SecCertificateCopyNormalizedSubjectContent' is unavailable"

Has duplicate #52047.

comment:3 Changed 15 months ago by iEFdev (Eric F)

go@1.7.1_0 … same error.

Attaching that log file

Changed 15 months ago by iEFdev (Eric F)

comment:4 Changed 14 months ago by scottm@…

This issue seems to be caused by line 10 of src/crypto/x509/root_cgo_darwin.go file, which appears as:
#cgo CFLAGS: -mmacosx-version-min=10.6 -D__MAC_OS_X_VERSION_MAX_ALLOWED=1060

The value of 1060 for __MAC_OS_X_VERSION_MAX_ALLOWED represents OSX 10.6, which conflicts with compiling it on lion. Removing this restriction allows successful compilation.

I didn't research beyond just getting it to build on my box -- but from the look of it, I don't understand how it could be compiled anywhere.

comment:5 Changed 14 months ago by iEFdev (Eric F)

Last version: go@1.7.3 return this error:

Error: go 1.7.3 requires Mac OS X 10.8 or greater.
Error: org.macports.fetch for port go returned: incompatible Mac OS X version

Unless there will be a fix/patch that, you can close this now since I'm on Lion.

· Eric

Note: See TracTickets for help on using tickets.