x509: failed to load system roots and no roots provided

1,618 views
Skip to first unread message

Jim Robinson

unread,
Feb 1, 2013, 8:24:40 AM2/1/13
to golan...@googlegroups.com
Anyone run into the error

  x509: failed to load system roots and no roots provided

on the go1 tip (this is on Mac OS X 10.7.5)?  I had just tried switching to 15556:8d4bd93dcd41 tip to see whether or not the patch to src/pkg/crypto/x509/x509.go for Entrust would fix an earlier error I got:

  x509: certificate signed by unknown authority

when trying to pull


Jim

Dave Cheney

unread,
Feb 1, 2013, 8:27:55 AM2/1/13
to Jim Robinson, golang-nuts

Have you disabled cgo?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jim Robinson

unread,
Feb 1, 2013, 8:32:15 AM2/1/13
to golan...@googlegroups.com, Jim Robinson
On 2 Feb 2013 00:24, "Jim Robinson" <jim.ro...@gmail.com> wrote:
Anyone run into the error

  x509: failed to load system roots and no roots provided

On Friday, February 1, 2013 5:27:55 AM UTC-8, Dave Cheney wrote: 

Have you disabled cgo? 

Do you mean when building, as in running

  CGO_ENABLED=0 ./make.bash

to build the tools w/o CGO like I would when building the cross compiler?

Dave Cheney

unread,
Feb 1, 2013, 8:38:34 AM2/1/13
to Jim Robinson, golang-nuts

Yes, cgo is required to load the ca roots in osx.

James A. Robinson

unread,
Feb 1, 2013, 8:45:03 AM2/1/13
to Dave Cheney, golang-nuts
On Fri, Feb 1, 2013 at 5:38 AM, Dave Cheney <da...@cheney.net> wrote:
> Yes, cgo is required to load the ca roots in osx.

Interesting! I had originally started to write back that no I didn't
disable CGO when building the darwin tools, but I realized that I *do*
then build the cross compiler and that probably overwrites some of the
build tools w/o CGO enabled.

I tried rebuilding the tip from scratch w/o that second step, and am
now able to pull the files.

Thank you for the help!

Jim

Owen

unread,
Jun 12, 2013, 11:40:15 PM6/12/13
to golan...@googlegroups.com, Dave Cheney
I am still having the problem with Go 1.1. I am using goxc (https://github.com/laher/goxc) for the cross-compile. Here's the build log: https://drone.io/github.com/jingweno/gh/184

Dave Cheney

unread,
Jun 12, 2013, 11:49:26 PM6/12/13
to Owen, golan...@googlegroups.com
You can see the CGO_ENABLED=0 is being set. Actually it doesn't need to do that, Go 1.1 always disables cgo on xcompile builds. 

Owen

unread,
Jun 12, 2013, 11:57:46 PM6/12/13
to golan...@googlegroups.com, Owen
Yes, either setting CGO_ENABLED=0 or Go 1.1 doesn't solve the problem. I am trying to cross-compile to Darwin on a Linux box as you could see from the log. My Mac version is 10.8.4. 

Dave Cheney

unread,
Jun 13, 2013, 6:18:05 AM6/13/13
to Owen, golan...@googlegroups.com, Owen
It is not possible to cross compile from something not Darwin to Darwin with cgo enabled because the Darwin specific framework files are not available to link against (amongst many other reasons)


--
Reply all
Reply to author
Forward
0 new messages