FAQ
Hi all,

I've been playing with getting the "go" tool from the version 1.2 release
branch to build on solaris sparc for the last day, and have had success
getting it to compile with GCC 4.9 from OpenCSW on the sparc architecture.
However, when I run the resulting binary I get an annoying error:

unsupported GOARCH sparc


I have modified the goarchList variable under the pkg/go/build source code,
but it does not seem to effect whether or not this GOARCH error occurs,
even when the binary shows the changes to the list (via strings|grep). I
have also tried, to my chagrin, to edit the error text and add more
expletives to the error message to at least ensure my changes are taking
effect without any luck either.

The file I updated for the goarchList was from go-release-branch.go1.2,
located at *src/pkg/go/build/syslist.go*, which I pulled the latest copy
from the cc.dev branch of the repo.

// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package build
*const goosList = "android darwin dragonfly freebsd linux nacl netbsd
openbsd plan9 solaris windows "const goarchList = "386 amd64 amd64p32 arm
arm64 ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc
s390 s390x sparc sparc64 "*

The file which contains the error message is from go-release-branch.go1.2,
located at *src/pkg/go/build/build.go*, though I am not sure how this is
handled in the newest code either, since sparc is still not a valid GOARCH
with an ArchChar as far as I know. I tried just throwing something in their
to get it to return something else but no dice

// ArchChar returns the architecture character for the given goarch.
// For example, ArchChar("amd64") returns "6".
func ArchChar(goarch string) (string, error) {
switch goarch {
case "386":
return "8", nil
case "amd64":
return "6", nil
case "arm":
return "5", nil
}
* return "", errors.New("unsupported GOARCH " + goarch)*
}

Can someone explain to my why my edits to the go code under go/build are
not making an effect on the error message? I'm so close, I feel like I just
need a little expert help to get me over the edge. Does anyone have a sense
of what I need to do to enable sparc for this 1.2 go tool?

Thanks,
JSo

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Ian Lance Taylor at May 7, 2015 at 3:01 pm

    On Thu, May 7, 2015 at 12:22 AM, Joshua Sonstroem wrote:
    I've been playing with getting the "go" tool from the version 1.2 release
    branch to build on solaris sparc for the last day, and have had success
    getting it to compile with GCC 4.9 from OpenCSW on the sparc architecture.
    Why aren't using the go tool from the 1.4 release and GCC 5? For that
    matter, GCC 5 includes its own version of the go tool anyhow that
    should work fine on Solaris SPARC. When developing something new, is
    there a reason to work with 1.2 sources?

    The file which contains the error message is from go-release-branch.go1.2,
    located at src/pkg/go/build/build.go, though I am not sure how this is
    handled in the newest code either, since sparc is still not a valid GOARCH
    with an ArchChar as far as I know. I tried just throwing something in their
    to get it to return something else but no dice
    // ArchChar returns the architecture character for the given goarch.
    // For example, ArchChar("amd64") returns "6".
    func ArchChar(goarch string) (string, error) {
    switch goarch {
    case "386":
    return "8", nil
    case "amd64":
    return "6", nil
    case "arm":
    return "5", nil
    }
    return "", errors.New("unsupported GOARCH " + goarch)
    }
    What change did you make to this function? I would expect that that
    is where the error message is coming from.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 7, 2015 at 6:37 pm
    Hi Ian,

    Thanks for the info. I'll try to address your questions below.

    On Thursday, May 7, 2015 at 8:01:18 AM UTC-7, Ian Lance Taylor wrote:

    Why aren't using the go tool from the 1.4 release and GCC 5?


    Ultimately because I did not realize that was an option. As per GCC, the
    latest version of I have seen packaged (on OpenCSW) for solaris 10/sparc is
    4.9. I've downloaded the source for 5.1 but I am not confident I can get it
    to build successfully (though I'll probably give it a shot, but I'm a
    sysadmin, not a complier master) This is further complicated by the fact
    that I've not yet found good instructions on how to build GCC 5 online
    anywhere for either solaris or, more specifically, sparc. Do you know if
    those exist anywhere?

    As per go1.4, I tried to start with my project with the master branch but
    was unsuccessful at getting it to build. I guess I should try it again, but
    I am guessing that it was due to using GCC 4.9 instead of 5.x. Needless to
    say I rolled back the branches until I found one that built reliably with
    gccgo on solaris 10 sparc. I also found this helpful forum post (
    https://code.google.com/p/gofrontend/issues/detail?id=15) where @tjyang2***
    talks about building the go command for sparc/solaris, so working from
    there I was able to construct a baseline for the build command for the 1.2
    release.

    For that matter, GCC 5 includes its own version of the go tool anyhow that
    should work fine on Solaris SPARC.

    Once its out in a package repo, or I can magically get it built, I'll be
    super stoked to try it!

    When developing something new, is there a reason to work with 1.2 sources?
    In addition to 1.2 working I was also under the -- possibly mistaken --
    impression that the go implementation in GCCGO via GCC 4.9 was only up to
    the 1.2 spec (see https://golang.org/doc/install/gccgo#releases) so I
    should use the 1.2 go command to interface with it. That was why I figured
    it might be a good starting off point to get the go command built, as
    recommended on the GOLANG site (https://golang.org/doc/install/gccgo#Using_gccgo)
    to build a version of the command from the source code or use it from
    another install of the *gc* compiler (which obviously does not exist for
    sparc). This presentation also lead me to believe that the go command was
    still using 1.2 (https://github.com/davecheney/gosyd/blob/master/gccgo.slide)
      since I got an error when I tried to build the go1.3 version of the
    command.

    Ultimately, my goal is to get serfdom.io, which is a go project, to build
    successfully on sparc, so I can test it out for service discovery in our
    mixed OS environment. It was -- in comparison to sparc -- easy to get *serf*
    to build on SmartOS once I got one troublesome commit reverted on my local
    copy of the mitchellh CLI. This was mostly due to joyent already having
    done the work of porting the go command to illumos x86. Since it built on
    SmartOS and it already exists for FreeBSD and Linux we will be good to go
    for testing if I can get a go command to try building it on sparc. (Yes, I
    tried to built serf with gccgo, but it has A LOT of dependencies and I
    don't have the time to set off down that path at the moment if I can get a
    go command working on sparc instead.)
    The file which contains the error message is from
    go-release-branch.go1.2,
    located at src/pkg/go/build/build.go, though I am not sure how this is
    handled in the newest code either, since sparc is still not a valid GOARCH
    with an ArchChar as far as I know. I tried just throwing something in their
    to get it to return something else but no dice
    // ArchChar returns the architecture character for the given goarch.
    // For example, ArchChar("amd64") returns "6".
    func ArchChar(goarch string) (string, error) {
    switch goarch {
    case "386":
    return "8", nil
    case "amd64":
    return "6", nil
    case "arm":
    return "5", nil
    }
    return "", errors.New("unsupported GOARCH " + goarch)
    }
    What change did you make to this function? I would expect that that is
    where the error message is coming from.
    I did not change anything in the function. I did have to create one file,
    referenced in the make below, which would normally get auto-generated by
    "go tool dist" called *zdefaultcc.go*, which contains:

    // auto generated by go tool dist
    package main
    const defaultCC = `gcc`
    const defaultCXX = `g++`

    However, the first time I built the binary with the following command:

    # gccgo -o go.bin testflag.go test.go get.go main.go run.go tool.go
    build.go env.go help.go match_test.go vcs.go clean.go fix.go http.go
    version.go discovery.go fmt.go list.go pkg.go vet.go signal.go go11.go
    signal_unix.go zdefaultcc.go -lnsl -lsocket -lthread -lpthread -lrt
    -static-libgcc -Wall -Werror -static-libgo

    and ran it I got the error "unsupported GOARCH sparc". So then I figured I
    would try to adjust the goarchList to enable sparc, which (as I mentioned)
    I edited in the file *src/pkg/go/build/syslist.go. *I then tried adding a
    sparc stanza to the switch clause in the ArchChar function, but since I did
    not know what number to return I just had it return an empty string.

             case "sparc":
    return "", nil

    But this also did not seem to have any effect, insofar as I still received
    the unsupported error. Next, I changed it to a number (4) but no effect on
    the error. I also tried to edit the error text itself, just to verify my
    changes could be seen, but it did not change the text as it was compiled
    into the application, so I was a bit baffled. Finally I went to the master
    branch, where the golangList already had sparc as an architecture, and
    tried to copy the ArchChar function from there, but it also did not contain
    sparc:

    func ArchChar(goarch string) (string, error) {
    switch goarch {
    case "386":
    return "8", nil
    case "amd64", "amd64p32":
    return "6", nil
    case "arm":
    return "5", nil
    case "arm64":
    return "7", nil
    case "ppc64", "ppc64le":
    return "9", nil
    }
    return "", errors.New("unsupported GOARCH " + goarch)
    }

    So, I was not sure what to make of that. Hence my email to this list :)
    Does the fact that its still missing from the stanza mean that I'll still
    receive this error about sparc if I build the master?

    Thanks again,
    JSo

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 7, 2015 at 7:16 pm
    Here is the output of trying to compile the go command from the current
    master branch with GCCGO and GCC 4.9 on solaris 10 sparc

      # gccgo -o go.bin alldocs.go build.go clean.go context.go discovery.go
    doc.go env.go fix.go fmt.go generate_test.go generate.go get.go go11.go
    help.go http.go list.go main.go match_test.go note.go pkg_test.go pkg.go
    run.go signal_unix.go signal.go tag_test.go test.go testdata testflag.go
    testgo.go tool.go vcs_test.go vcs.go version.go vet.go zdefaultcc.go -lnsl
    -lsocket -lthread -lpthread -lrt -static-libgcc -Wall -Werror -static-libgo

    pkg.go:270:53: error: reference to undefined identifier
    'build.ImportComment'
    bp, err := buildContext.Import(path, srcDir, build.ImportComment)
    ^
    vcs.go:12:23: error: import file 'internal/singleflight' not found
    "internal/singleflight"
    ^
    vcs.go:637:28: error: expected package
    var fetchGroup singleflight.Group
    ^
    build.go:785:44: error: reference to undefined field or method
    'PkgTargetRoot'
    pkgs := readpkglist(filepath.Join(p.build.PkgTargetRoot, shlib))
    ^
    build.go:927:22: error: reference to undefined field or method
    'PkgTargetRoot'
    plibdir := p.build.PkgTargetRoot
    ^
    build.go:1609:38: error: reference to undefined field or method
    'PkgTargetRoot'
    inc = append(inc, flag, a1.p.build.PkgTargetRoot)
    ^
    pkg.go:111:22: error: reference to undefined field or method
    'ImportComment'
    p.ImportComment = pp.ImportComment
    ^
    pkg.go:124:15: error: reference to undefined field or method 'MFiles'
    p.MFiles = pp.MFiles
    ^
    pkg.go:275:33: error: reference to undefined field or method
    'ImportComment'
    if err == nil && !isLocal && bp.ImportComment != "" && bp.ImportComment
    != path {
    ^
    pkg.go:275:59: error: reference to undefined field or method
    'ImportComment'
    if err == nil && !isLocal && bp.ImportComment != "" && bp.ImportComment
    != path {
    ^
    pkg.go:276:72: error: reference to undefined field or method
    'ImportComment'
    err = fmt.Errorf("code in directory %s expects import %q", bp.Dir,
    bp.ImportComment)
    ^

    Since all the objects in question, except the internal/singleflight stuff
    was found in *src/go/build,* I also went ahead and built the build package
    object file under *src/go/build *with the following command:

    # gccgo -c build.go build_test.go deps_test.go doc.go read_test.go read.go
    syslist_test.go syslist.go

    Hoping that explicitly providing the .o file explicitly would help find
    those references, but including this in the build did not fix the problem
    either.

    Any clue about where I should go from here?

    Thanks,

    JSo
    On Thu, May 7, 2015 at 11:37 AM, Joshua Sonstroem wrote:

    Hi Ian,

    Thanks for the info. I'll try to address your questions below.

    On Thursday, May 7, 2015 at 8:01:18 AM UTC-7, Ian Lance Taylor wrote:

    Why aren't using the go tool from the 1.4 release and GCC 5?


    Ultimately because I did not realize that was an option. As per GCC, the
    latest version of I have seen packaged (on OpenCSW) for solaris 10/sparc is
    4.9. I've downloaded the source for 5.1 but I am not confident I can get it
    to build successfully (though I'll probably give it a shot, but I'm a
    sysadmin, not a complier master) This is further complicated by the fact
    that I've not yet found good instructions on how to build GCC 5 online
    anywhere for either solaris or, more specifically, sparc. Do you know if
    those exist anywhere?

    As per go1.4, I tried to start with my project with the master branch but
    was unsuccessful at getting it to build. I guess I should try it again, but
    I am guessing that it was due to using GCC 4.9 instead of 5.x. Needless to
    say I rolled back the branches until I found one that built reliably with
    gccgo on solaris 10 sparc. I also found this helpful forum post (
    https://code.google.com/p/gofrontend/issues/detail?id=15) where
    @tjyang2*** talks about building the go command for sparc/solaris, so
    working from there I was able to construct a baseline for the build command
    for the 1.2 release.

    For that matter, GCC 5 includes its own version of the go tool anyhow
    that should work fine on Solaris SPARC.

    Once its out in a package repo, or I can magically get it built, I'll be
    super stoked to try it!

    When developing something new, is there a reason to work with 1.2
    sources?
    In addition to 1.2 working I was also under the -- possibly mistaken --
    impression that the go implementation in GCCGO via GCC 4.9 was only up to
    the 1.2 spec (see https://golang.org/doc/install/gccgo#releases) so I
    should use the 1.2 go command to interface with it. That was why I figured
    it might be a good starting off point to get the go command built, as
    recommended on the GOLANG site (https://golang.org/doc/install/gccgo#Using_gccgo)
    to build a version of the command from the source code or use it from
    another install of the *gc* compiler (which obviously does not exist for
    sparc). This presentation also lead me to believe that the go command was
    still using 1.2 (
    https://github.com/davecheney/gosyd/blob/master/gccgo.slide) since I got
    an error when I tried to build the go1.3 version of the command.

    Ultimately, my goal is to get serfdom.io, which is a go project, to build
    successfully on sparc, so I can test it out for service discovery in our
    mixed OS environment. It was -- in comparison to sparc -- easy to get
    *serf* to build on SmartOS once I got one troublesome commit reverted on
    my local copy of the mitchellh CLI. This was mostly due to joyent already
    having done the work of porting the go command to illumos x86. Since it
    built on SmartOS and it already exists for FreeBSD and Linux we will be
    good to go for testing if I can get a go command to try building it on
    sparc. (Yes, I tried to built serf with gccgo, but it has A LOT of
    dependencies and I don't have the time to set off down that path at the
    moment if I can get a go command working on sparc instead.)
    The file which contains the error message is from
    go-release-branch.go1.2,
    located at src/pkg/go/build/build.go, though I am not sure how this is
    handled in the newest code either, since sparc is still not a valid GOARCH
    with an ArchChar as far as I know. I tried just throwing something in their
    to get it to return something else but no dice
    // ArchChar returns the architecture character for the given goarch.
    // For example, ArchChar("amd64") returns "6".
    func ArchChar(goarch string) (string, error) {
    switch goarch {
    case "386":
    return "8", nil
    case "amd64":
    return "6", nil
    case "arm":
    return "5", nil
    }
    return "", errors.New("unsupported GOARCH " + goarch)
    }
    What change did you make to this function? I would expect that that is
    where the error message is coming from.
    I did not change anything in the function. I did have to create one file,
    referenced in the make below, which would normally get auto-generated by
    "go tool dist" called *zdefaultcc.go*, which contains:

    // auto generated by go tool dist
    package main
    const defaultCC = `gcc`
    const defaultCXX = `g++`

    However, the first time I built the binary with the following command:

    # gccgo -o go.bin testflag.go test.go get.go main.go run.go tool.go
    build.go env.go help.go match_test.go vcs.go clean.go fix.go http.go
    version.go discovery.go fmt.go list.go pkg.go vet.go signal.go go11.go
    signal_unix.go zdefaultcc.go -lnsl -lsocket -lthread -lpthread -lrt
    -static-libgcc -Wall -Werror -static-libgo

    and ran it I got the error "unsupported GOARCH sparc". So then I figured I
    would try to adjust the goarchList to enable sparc, which (as I mentioned)
    I edited in the file *src/pkg/go/build/syslist.go. *I then tried adding a
    sparc stanza to the switch clause in the ArchChar function, but since I did
    not know what number to return I just had it return an empty string.

    case "sparc":
    return "", nil

    But this also did not seem to have any effect, insofar as I still received
    the unsupported error. Next, I changed it to a number (4) but no effect on
    the error. I also tried to edit the error text itself, just to verify my
    changes could be seen, but it did not change the text as it was compiled
    into the application, so I was a bit baffled. Finally I went to the master
    branch, where the golangList already had sparc as an architecture, and
    tried to copy the ArchChar function from there, but it also did not contain
    sparc:

    func ArchChar(goarch string) (string, error) {
    switch goarch {
    case "386":
    return "8", nil
    case "amd64", "amd64p32":
    return "6", nil
    case "arm":
    return "5", nil
    case "arm64":
    return "7", nil
    case "ppc64", "ppc64le":
    return "9", nil
    }
    return "", errors.New("unsupported GOARCH " + goarch)
    }

    So, I was not sure what to make of that. Hence my email to this list :)
    Does the fact that its still missing from the stanza mean that I'll still
    receive this error about sparc if I build the master?

    Thanks again,
    JSo


    --
    *Josh Sonstroem*
    *Unix Sysadmin*
    Comm 33 / Information Technology Services
    cell (831) 332-0096
    desk (831) 459-1526

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 7, 2015 at 7:58 pm

    On Thu, May 7, 2015 at 11:37 AM, Joshua Sonstroem wrote:
    On Thursday, May 7, 2015 at 8:01:18 AM UTC-7, Ian Lance Taylor wrote:

    Why aren't using the go tool from the 1.4 release and GCC 5?

    Ultimately because I did not realize that was an option. As per GCC, the
    latest version of I have seen packaged (on OpenCSW) for solaris 10/sparc is
    4.9. I've downloaded the source for 5.1 but I am not confident I can get it
    to build successfully (though I'll probably give it a shot, but I'm a
    sysadmin, not a complier master) This is further complicated by the fact
    that I've not yet found good instructions on how to build GCC 5 online
    anywhere for either solaris or, more specifically, sparc. Do you know if
    those exist anywhere?
    I don't know of any docs specific to Solaris or SPARC, but the
    standard GCC installation docs ought to work
    (http://gcc.gnu.org/install). Building a native GCC on the system on
    which you want to run it is usually straightforward, one you install
    the necessary prerequisite libraries.

    As per go1.4, I tried to start with my project with the master branch but
    was unsuccessful at getting it to build. I guess I should try it again, but
    I am guessing that it was due to using GCC 4.9 instead of 5.x. Needless to
    say I rolled back the branches until I found one that built reliably with
    gccgo on solaris 10 sparc. I also found this helpful forum post
    (https://code.google.com/p/gofrontend/issues/detail?id=15) where @tjyang2***
    talks about building the go command for sparc/solaris, so working from there
    I was able to construct a baseline for the build command for the 1.2
    release.
    I see, yes, it's true that building the Go tool from a Go release with
    gccgo is awkward.


    Setting that aside, I don't see how you could get the error you report
    if you changed ArchChar to return a value (the exact value doesn't
    matter) for "sparc".

    And setting that aside, since you are using gccgo you should run the
    go tool with -compiler=gccgo. In current versions of the go tool that
    will avoid calling ArchChar entirely, but looking at the go 1.2
    sources I see that there you will still get that failure. But if you
    change ArchChar as you described, I don't see how that could happen.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Aram Hăvărneanu at May 7, 2015 at 8:03 pm

    On Thu, May 7, 2015 at 8:37 PM, Joshua Sonstroem wrote:
    This was mostly due to joyent already having done the work of porting the go
    command to illumos x86.
    Actually, I have ported Go to Solaris, although Joyent have been quite
    supportive.

    I'm also porting Go to solaris/sparc64, but that is still months away
    so it won't help you in the short term, sorry. And it will be Solaris
    11+ only.

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 7, 2015 at 9:32 pm
    Hey guys,

    @Aram: Sorry for my mis-statement and thanks for all your work on the go
    port to illumos. I noticed your commits in the source :) I would guess it
    was non-trivial to port (since I heard that joyent lost at least 1 employee
    over it).

    I'm definitely interested in a solaris 11 sparc port, so I look forward to
    that becoming available when you have it. In the short term I still need to
    get a copy of the go command working so I can attempt to build serf for
    solaris 10, but if you get it working on 11 that will solve our problem
    once we migrate off solaris 10.

    @Ian: After compiling the object files for src/go/build and for
    internal/singleflight and moving those objects into my build directory
    (plus adjusting the import functions appropriately, i.e. from
    internal/singleflight to singleflight and go/build to build) I've been able
    to get most of the way there to getting the go command from master to
    compile on sparc. I hope its obvious that I can't use the go command with
    the -compiler option until I can first compile the go command with gccgo.
    My hope is that once I have a working go command the serfdom.io app will
    build with little headache.

    Right now my sparc build of master fails like so:

      # gccgo -o go.bin alldocs.go build.go clean.go context.go discovery.go
    doc.go env.go fix.go fmt.go generate_test.go generate.go get.go go11.go
    help.go http.go list.go main.go match_test.go note.go pkg_test.go pkg.go
    run.go signal_unix.go signal.go tag_test.go test.go testflag.go testgo.go
    tool.go vcs_test.go vcs.go version.go vet.go zdefaultcc.go -lnsl -lsocket
    -lthread -lpthread -lrt -static-libgcc -Wall -Werror -static-libgo

    Undefined first referenced
    symbol in file
    go.singleflight.Do.pN21_go.singleflight.Group /var/tmp//cc9KCZZS.o
    go.build.SrcDirs.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    go.build.Default /var/tmp//cc9KCZZS.o
    go.build.ArchChar /var/tmp//cc9KCZZS.o
    go.build.IsCommand.pN16_go.build.Package /var/tmp//cc9KCZZS.o
    go.build.ToolDir /var/tmp//cc9KCZZS.o
    go.build.Error.pN18_go.build.NoGoError /var/tmp//cc9KCZZS.o
    __go_td_pN18_go.build.NoGoError /var/tmp//cc9KCZZS.o
    go.build.IsLocalImport /var/tmp//cc9KCZZS.o
    go.build.ImportDir.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    __go_td_pN16_go.build.Package /var/tmp//cc9KCZZS.o
    go.build..import /var/tmp//cc9KCZZS.o
    go.build.ImportDir /var/tmp//cc9KCZZS.o
    go.build.Import.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    ld: fatal: symbol referencing errors. No output written to go.bin

    Which look to me like errors from renaming the go/build import to just
    plain build. Does that makes sense to you? How would I go about fixing
    these errors if so?

    Thanks again,
    JSo


    On Thu, May 7, 2015 at 1:03 PM, Aram Hăvărneanu wrote:
    On Thu, May 7, 2015 at 8:37 PM, Joshua Sonstroem wrote:
    This was mostly due to joyent already having done the work of porting the go
    command to illumos x86.
    Actually, I have ported Go to Solaris, although Joyent have been quite
    supportive.

    I'm also porting Go to solaris/sparc64, but that is still months away
    so it won't help you in the short term, sorry. And it will be Solaris
    11+ only.


    --
    *Josh Sonstroem*
    *Unix Sysadmin*
    Comm 33 / Information Technology Services
    cell (831) 332-0096
    desk (831) 459-1526

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 7, 2015 at 10:55 pm
    Hi again,

    So just to verify my theory that it was building the dot O files, copying
    them into the working directory, and changing the include path from
    "internal/singleflight" to "singleflight" and "go/build" to "build" that
    caused the compiler errors, I went thru the same process on the go1.2
    release branch code that I was able to get to compile successfully to see
    if I could re-create the specific errors.

    In short, I was. After running:

    # gccgo -c build.go build_test.go deps_test.go doc.go read_test.go read.go
    syslist_test.go syslist.go

    to build the object file *build.o*, I copied that into the working dir and
    changed the import paths from "go/build" to "build" and got basically the
    same errors. These are:

    # gccgo -o go.bin testflag.go test.go get.go main.go run.go tool.go
    build.go env.go help.go match_test.go vcs.go clean.go fix.go http.go
    version.go discovery.go fmt.go list.go pkg.go vet.go signal.go go11.go
    signal_unix.go zdefaultcc.go -lnsl -lsocket
    Undefined first referenced
    symbol in file
    go.build.SrcDirs.pN16_go.build.Context /var/tmp//cc4BVjxs.o
    go.build.Default /var/tmp//cc4BVjxs.o
    go.build.ArchChar /var/tmp//cc4BVjxs.o
    __go_td_pN16_go.build.Context /var/tmp//cc4BVjxs.o
    go.build.IsCommand.pN16_go.build.Package /var/tmp//cc4BVjxs.o
    go.build.ToolDir /var/tmp//cc4BVjxs.o
    __go_td_pN18_go.build.NoGoError /var/tmp//cc4BVjxs.o
    go.build.IsLocalImport /var/tmp//cc4BVjxs.o
    go.build.ImportDir.pN16_go.build.Context /var/tmp//cc4BVjxs.o
    __go_td_pN16_go.build.Package /var/tmp//cc4BVjxs.o
    go.build..import /var/tmp//cc4BVjxs.o
    go.build.ImportDir /var/tmp//cc4BVjxs.o
    go.build.Import.pN16_go.build.Context /var/tmp//cc4BVjxs.o
    ld: fatal: symbol referencing errors. No output written to go.bin

    And did not get a binary out the other side. Ah, crap -- no joy. So, back
    to the drawing board I guess on how to get the build to see the references
    from the src/go/build and internal/singleflight packages.

    Any ideas on what I am missing?

    Thanks,
    JSo

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 8, 2015 at 4:22 am

    On Thu, May 7, 2015 at 2:32 PM, Joshua Sonstroem wrote:
    # gccgo -o go.bin alldocs.go build.go clean.go context.go discovery.go
    doc.go env.go fix.go fmt.go generate_test.go generate.go get.go go11.go
    help.go http.go list.go main.go match_test.go note.go pkg_test.go pkg.go
    run.go signal_unix.go signal.go tag_test.go test.go testflag.go testgo.go
    tool.go vcs_test.go vcs.go version.go vet.go zdefaultcc.go -lnsl -lsocket
    -lthread -lpthread -lrt -static-libgcc -Wall -Werror -static-libgo



    Undefined first referenced
    symbol in file
    go.singleflight.Do.pN21_go.singleflight.Group /var/tmp//cc9KCZZS.o
    go.build.SrcDirs.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    go.build.Default /var/tmp//cc9KCZZS.o
    go.build.ArchChar /var/tmp//cc9KCZZS.o
    go.build.IsCommand.pN16_go.build.Package /var/tmp//cc9KCZZS.o
    go.build.ToolDir /var/tmp//cc9KCZZS.o
    go.build.Error.pN18_go.build.NoGoError /var/tmp//cc9KCZZS.o
    __go_td_pN18_go.build.NoGoError /var/tmp//cc9KCZZS.o
    go.build.IsLocalImport /var/tmp//cc9KCZZS.o
    go.build.ImportDir.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    __go_td_pN16_go.build.Package /var/tmp//cc9KCZZS.o
    go.build..import /var/tmp//cc9KCZZS.o
    go.build.ImportDir /var/tmp//cc9KCZZS.o
    go.build.Import.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    ld: fatal: symbol referencing errors. No output written to go.bin

    Which look to me like errors from renaming the go/build import to just plain
    build. Does that makes sense to you? How would I go about fixing these
    errors if so?
    With gccgo, unlike gc, you need to explicitly link against the
    packages that you built. In the above line, you aren't linking
    against the singleflight or go/build objects that you built. You need
    to add those objects to the link line.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 11, 2015 at 5:34 pm
    Hi Ian, Aram, cc Golang-Nuts

    So, Joy! I finally got the master-branch of the go tool to build
    successfully on Solaris 10 SPARC. Thanks for all your input Ian and your
    help with figuring out the nitty-gritty details. Basically, the process was
    like so, for anyone else who is interested:

    0) Download the master branch of the golang source code (from ) and install
    the pre-reqs for building on sparc, after linking with the OpenCSW
    Bratislava, to get access to GCC 4.9 sparc

    pkgutil -i libmpfr4 libmpfr-dev libgmp-dev libgmp10 libgmpxx4 gcc4core


    1) Build the internal/singleflight package as a .o file (under
    src/go/build/)
    # gccgo -c singleflight.go singleflight_test.go

    2) Build the go/build package as a .o file (under
    src/internal/singleflight/)
    # gccgo -c build.go build_test.go deps_test.go doc.go read_test.go
    read.go syslist_test.go syslist.go

    3) Edit the CMD source code (under src/cmd/go/) to include "go/build" and
    "internal/singleflight" as includes by name (e.g. go/build -> build,
    internal/singleflight -> singleflight) wherever applicable, and comment old
    includes:

    build.go: //"go/build"
    context.go: //"go/build"
    get.go: //"go/build"
    main.go: //"go/build"
    pkg.go: //"go/build"
    test.go: //"go/build"
    tool.go: //"go/build"

    4) Create the one new file that is needed, zdefaultcc.go, which contains
    the following:

    // auto generated by go tool dist
    package main
    const defaultCC = `gcc`
    const defaultCXX = `g++`

      5) Build the binary with the following command:

    gccgo -o go.bin alldocs.go build.go clean.go context.go discovery.go doc.go
    env.go fix.go fmt.go generate_test.go generate.go get.go go11.go help.go
    http.go list.go main.go match_test.go note.go pkg_test.go pkg.go run.go
    signal_unix.go signal.go tag_test.go test.go testflag.go testgo.go tool.go
    vcs_test.go vcs.go version.go vet.go zdefaultcc.go ../../go/build/build.o
    ../../internal/singleflight/singleflight.o -lnsl -lsocket -lthread
    -lpthread -lrt -static-libgcc -Wall -Werror -static-libgo

    and *walah*, you should now have a binary in your working directory called
    go.bin
    *# *file go.bin

    go.bin: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+
    Required, dynamically linked, not stripped
    Now, onto the next task -- figuring out how to get the hashicorp serfdom.io
    package to build using this tool with the "-compiler gccgo" option. I'll
    send some updates to this thread if I end up having success.

    Thanks again for all your help!

    Regards,
    JSo
    On Thu, May 7, 2015 at 9:21 PM, Ian Lance Taylor wrote:
    On Thu, May 7, 2015 at 2:32 PM, Joshua Sonstroem wrote:

    # gccgo -o go.bin alldocs.go build.go clean.go context.go discovery.go
    doc.go env.go fix.go fmt.go generate_test.go generate.go get.go go11.go
    help.go http.go list.go main.go match_test.go note.go pkg_test.go pkg.go
    run.go signal_unix.go signal.go tag_test.go test.go testflag.go
    testgo.go
    tool.go vcs_test.go vcs.go version.go vet.go zdefaultcc.go -lnsl
    -lsocket
    -lthread -lpthread -lrt -static-libgcc -Wall -Werror -static-libgo



    Undefined first referenced
    symbol in file
    go.singleflight.Do.pN21_go.singleflight.Group /var/tmp//cc9KCZZS.o
    go.build.SrcDirs.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    go.build.Default /var/tmp//cc9KCZZS.o
    go.build.ArchChar /var/tmp//cc9KCZZS.o
    go.build.IsCommand.pN16_go.build.Package /var/tmp//cc9KCZZS.o
    go.build.ToolDir /var/tmp//cc9KCZZS.o
    go.build.Error.pN18_go.build.NoGoError /var/tmp//cc9KCZZS.o
    __go_td_pN18_go.build.NoGoError /var/tmp//cc9KCZZS.o
    go.build.IsLocalImport /var/tmp//cc9KCZZS.o
    go.build.ImportDir.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    __go_td_pN16_go.build.Package /var/tmp//cc9KCZZS.o
    go.build..import /var/tmp//cc9KCZZS.o
    go.build.ImportDir /var/tmp//cc9KCZZS.o
    go.build.Import.pN16_go.build.Context /var/tmp//cc9KCZZS.o
    ld: fatal: symbol referencing errors. No output written to go.bin

    Which look to me like errors from renaming the go/build import to just plain
    build. Does that makes sense to you? How would I go about fixing these
    errors if so?
    With gccgo, unlike gc, you need to explicitly link against the
    packages that you built. In the above line, you aren't linking
    against the singleflight or go/build objects that you built. You need
    to add those objects to the link line.

    Ian


    --
    *Josh Sonstroem*
    *Unix Sysadmin*
    Comm 33 / Information Technology Services
    cell (831) 332-0096
    desk (831) 459-1526

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 12, 2015 at 7:20 pm
    So, after encountering errors similar to these posts:

    http://stackoverflow.com/questions/21510714/go-cannot-find-package-fmt-error

    That look like this:

    ~/hello_world # go build .
    main.go:3:8: cannot find package "fmt" in any of:
    /opt/csw/src/fmt (from $GOROOT)
    /home/user/go/src/fmt (from $GOPATH)
    package .
    imports runtime: cannot find package "runtime" in any of:
    /opt/csw/src/runtime (from $GOROOT)
    /home/user/go/src/runtime (from $GOPATH)

    and doing a find for fmt.gox:

    % find / -name "fmt.gox"
    /opt/csw/lib/sparcv9/go/4.9.0/sparc-sun-solaris2.10/fmt.gox
    /opt/csw/lib/go/4.9.0/sparc-sun-solaris2.10/fmt.gox

    I decided to just try the manual compile of GCC5 route. Ill update as I
    make progress.

    Thanks again for all the help! I was able to find good instructions for
    building GCC4.9 which I was able to adapt from here:

    https://lucamerello.wordpress.com/2014/05/31/solaris-10-how-to-build-and-install-gcc-4/

    Regards,
    JSo
    On Thursday, May 7, 2015 at 7:49:35 AM UTC-7, Joshua Sonstroem wrote:

    Hi all,

    I've been playing with getting the "go" tool from the version 1.2 release
    branch to build on solaris sparc for the last day, and have had success
    getting it to compile with GCC 4.9 from OpenCSW on the sparc architecture.
    However, when I run the resulting binary I get an annoying error:

    unsupported GOARCH sparc


    I have modified the goarchList variable under the pkg/go/build source
    code, but it does not seem to effect whether or not this GOARCH error
    occurs, even when the binary shows the changes to the list (via
    strings|grep). I have also tried, to my chagrin, to edit the error text and
    add more expletives to the error message to at least ensure my changes are
    taking effect without any luck either.

    The file I updated for the goarchList was from go-release-branch.go1.2,
    located at *src/pkg/go/build/syslist.go*, which I pulled the latest copy
    from the cc.dev branch of the repo.

    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    package build
    *const goosList = "android darwin dragonfly freebsd linux nacl netbsd
    openbsd plan9 solaris windows "const goarchList = "386 amd64 amd64p32 arm
    arm64 ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc
    s390 s390x sparc sparc64 "*

    The file which contains the error message is from go-release-branch.go1.2,
    located at *src/pkg/go/build/build.go*, though I am not sure how this is
    handled in the newest code either, since sparc is still not a valid GOARCH
    with an ArchChar as far as I know. I tried just throwing something in their
    to get it to return something else but no dice

    // ArchChar returns the architecture character for the given goarch.
    // For example, ArchChar("amd64") returns "6".
    func ArchChar(goarch string) (string, error) {
    switch goarch {
    case "386":
    return "8", nil
    case "amd64":
    return "6", nil
    case "arm":
    return "5", nil
    }
    * return "", errors.New("unsupported GOARCH " + goarch)*
    }

    Can someone explain to my why my edits to the go code under go/build are
    not making an effect on the error message? I'm so close, I feel like I just
    need a little expert help to get me over the edge. Does anyone have a sense
    of what I need to do to enable sparc for this 1.2 go tool?

    Thanks,
    JSo
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 12, 2015 at 7:36 pm

    On Tue, May 12, 2015 at 12:20 PM, Joshua Sonstroem wrote:
    That look like this:
    ~/hello_world # go build .
    main.go:3:8: cannot find package "fmt" in any of:
    /opt/csw/src/fmt (from $GOROOT)
    /home/user/go/src/fmt (from $GOPATH)
    package .
    imports runtime: cannot find package "runtime" in any of:
    /opt/csw/src/runtime (from $GOROOT)
    /home/user/go/src/runtime (from $GOPATH)
    You want it to use gccgo, so you need to do

    go build -compiler=gccgo

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 12, 2015 at 10:43 pm
    Thanks Ian, I had grabbed the wrong line from my history! Still compiling
    prereqs for GCC5. But my go build with my custom tool is now failing in a
    different way, once I got my GOPATH setup in a way which satisfied its
    dependencies:

    ~/hello_world # go build -compiler gccgo .
    import cycle not allowed
    package .
             imports fmt
             imports errors
             imports runtime
             imports unsafe
             imports runtime

    My go env is this:

    root->root@dco-dev-serf-1 ~/hello_world # go env
    GOARCH="sparc"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="sparc"
    GOHOSTOS="solaris"
    GOOS="solaris"
    GOPATH="/home/user/golang/go-master/"
    GORACE=""
    GOROOT="/opt/csw/lib"
    GOTOOLDIR="/opt/csw/lib/pkg/tool/solaris_sparc"
    CC="gcc"
    GOGCCFLAGS="-fPIC -fmessage-length=0"
    CXX="g++"
    CGO_ENABLED="0"

    On Tuesday, May 12, 2015 at 12:36:18 PM UTC-7, Ian Lance Taylor wrote:

    On Tue, May 12, 2015 at 12:20 PM, Joshua Sonstroem <json...@ucsc.edu
    <javascript:>> wrote:
    That look like this:
    ~/hello_world # go build .
    main.go:3:8: cannot find package "fmt" in any of:
    /opt/csw/src/fmt (from $GOROOT)
    /home/user/go/src/fmt (from $GOPATH)
    package .
    imports runtime: cannot find package "runtime" in any of:
    /opt/csw/src/runtime (from $GOROOT)
    /home/user/go/src/runtime (from $GOPATH)
    You want it to use gccgo, so you need to do

    go build -compiler=gccgo

    Ian
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 13, 2015 at 12:48 am

    On Tue, May 12, 2015 at 3:43 PM, Joshua Sonstroem wrote:
    Thanks Ian, I had grabbed the wrong line from my history! Still compiling
    prereqs for GCC5. But my go build with my custom tool is now failing in a
    different way, once I got my GOPATH setup in a way which satisfied its
    dependencies:

    ~/hello_world # go build -compiler gccgo .
    import cycle not allowed
    package .
    imports fmt
    imports errors
    imports runtime
    imports unsafe
    imports runtime
    I thought this problem was fixed on Go tip. Offhand I can't remember
    precisely what causes this. It has something to do with the go tool
    being confused by looking at the gc library sources that do not
    correspond to the gccgo library sources.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Dave Cheney at May 13, 2015 at 1:08 am
    This is weird, it shouldn't be necessary to pass -compiler gccgo to a
    version of the go tool that was built with gccgo; the default value of
    -compiler is the compiler that built the tool.
    On Wednesday, 13 May 2015 05:36:18 UTC+10, Ian Lance Taylor wrote:

    On Tue, May 12, 2015 at 12:20 PM, Joshua Sonstroem <json...@ucsc.edu
    <javascript:>> wrote:
    That look like this:
    ~/hello_world # go build .
    main.go:3:8: cannot find package "fmt" in any of:
    /opt/csw/src/fmt (from $GOROOT)
    /home/user/go/src/fmt (from $GOPATH)
    package .
    imports runtime: cannot find package "runtime" in any of:
    /opt/csw/src/runtime (from $GOROOT)
    /home/user/go/src/runtime (from $GOPATH)
    You want it to use gccgo, so you need to do

    go build -compiler=gccgo

    Ian
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 13, 2015 at 4:13 pm

    On Tue, May 12, 2015 at 6:08 PM, Dave Cheney wrote:
    This is weird, it shouldn't be necessary to pass -compiler gccgo to a
    version of the go tool that was built with gccgo; the default value of
    -compiler is the compiler that built the tool.
    Whoops, you're right. I may be mistaken about what is going on here.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 15, 2015 at 5:22 pm
    Hi again Ian, All

    Back yet another time. Sadly, with the same problem as my last post, but
    now with the freshly built "go command" from GCC 5.1, and not my custom
    compiled one off GCC4.9. [On the upside, the fact that 5.1 also appears
    broken on sparc makes me think my go command build off GCC 4.9 might have
    been working as "correctly" as possible too, so... "Yay?"]

    For those interested, here are the build and install instructions for
    compiling GCC5.1 on Solaris 10 SPARC. I use TCSH so basher's will need to
    modify my setenv lines accordingly.

    % uname -a
    SunOS hostname 5.10 Generic_150400-16 sun4v sparc sun4v

    Bind to the OpenCSW bratislava repo to get GCC 4.9 and install dependencies
    (Note: be sure you have all the appropriate compression utilities for
    downloaded file types)
    pkgutil -i gcc4core lzip xz libgccpp1 libcpptest_dev libcpptest0 libisl10
    libcloog_isl4 gcc4g++

    Download the latest gcc, mpc, mpfr, gmp, and isl source code from the
    interwebs, also checkout golang/go master to your build zone

    Untar everything in your working dir
    tar xvf mpc-1.0.3.tar.gz mpfr-3.1.2.tar.xz gmp-6.0.0a.tar.lz
    isl-0.14.tar.bz2 gcc-5.1.0.tar.bz2

    Build GMP
    cd gmp-6.0.0
    mkdir -p /opt/app/gmp6
    ./configure --build=sparc-sun-solaris2.10 --prefix=/opt/app/gmp6

    Build and Patch MPFR
    cd ../mpfr-3.1.2
    mkdir /opt/app/mpfr3
    setenv LDFLAGS "-L/opt/app/gmp6/lib -R/opt/app/gmp6/lib”
    wget http://www.mpfr.org/mpfr-current/allpatches
    /opt/csw/gnu/patch -N -Z -p1 < allpatches
    ./configure --build=sparc-sun-solaris2.10 --prefix=/opt/app/mpfr3
    --with-gmp=/opt/app/gmp6
    gmake install
    setenv LDFLAGS “"

    Build MPC
    cd ../mpc-1.0.3
    mkdir /opt/app/mpc1
    setenv LDFLAGS "-L/opt/app/gmp6/lib -R/opt/app/gmp6/lib
    -L/opt/app/mpfr3/lib -R/opt/app/mpfr3/lib”
    ./configure --build=sparc-sun-solaris2.10 --prefix=/opt/app/mpc1
    --with-mpfr=/opt/app/mpfr3 --with-gmp=/opt/app/gmp6
    gmake install
    setenv LDFLAGS “"

    Build ISL
    cd ../isl-0.14
    mkdir /opt/app/isl
    ./configure --with-gmp-prefix=/opt/app/gmp6 --disable-shared
    --enable-static --prefix=/opt/app/isl
    gmake -j 8
    gmake install
    unset LDFLAGS


    Make the link script (see 'code' below) and run it
    cd ..
    vi links_to_make.sh
    chmod +x links_to_make.sh
    ./links_to_make.sh
    Here is the linking script

    *% cat links_to_make.sh*
    #! /bin/bash
    ln -s /opt/app/gmp6/lib/libgmp.a /opt/app/gcc51/lib/math/libgmp.a
    ln -s /opt/app/gmp6/lib/libgmp.la /opt/app/gcc51/lib/math/libgmp.la
    ln -s /opt/app/gmp6/lib/libgmp.so /opt/app/gcc51/lib/math/libgmp.so
    ln -s /opt/app/gmp6/lib/libgmp.so.10 /opt/app/gcc51/lib/math/libgmp.so.10
    ln -s /opt/app/gmp6b/libgmp.so.10.2.0
    /opt/app/gcc51/lib/math/libgmp.so.10.2.0
    ln -s /opt/app/mpfr3/lib/libmpfr.a /opt/app/gcc51/lib/math/libmpfr.a
    ln -s /opt/app/mpfr3/lib/libmpfr.la /opt/app/gcc51/lib/math/libmpfr.la
    ln -s /opt/app/mpfr3/lib/libmpfr.so /opt/app/gcc51/lib/math/libmpfr.so
    ln -s /opt/app/mpfr3/lib/libmpfr.so.4 /opt/app/gcc51/lib/math/libmpfr.so.4
    ln -s /opt/app/mpfr3/lib/libmpfr.so.4.1.2
    /opt/app/gcc51/lib/math/libmpfr.so.4.1.2
    ln -s /opt/app/mpc1/lib/libmpc.a /opt/app/gcc51/lib/math/libmpc.a
    ln -s /opt/app/mpc1/lib/libmpc.la /opt/app/gcc51/lib/math/libmpc.la
    ln -s /opt/app/mpc1/lib/libmpc.so /opt/app/gcc51/lib/math/libmpc.so
    ln -s /opt/app/mpc1/lib/libmpc.so.3 /opt/app/gcc51/lib/math/libmpc.so.3
    ln -s /opt/app/mpc1/lib/libmpc.so.3.0.0
    /opt/app/gcc51/lib/math/libmpc.so.3.0.0

    Build GCC
    cd gcc-5.1.0
    mkdir -p /opt/app/gcc51/lib/math

    mkdir objdir
    cd objdir
    ../configure --build=sparc-sun-solaris2.10 --with-mpc=/opt/app/mpc1
    --with-mpfr=/opt/app/mpfr3 --with-gmp=/opt/app/gmp6
    --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld
    --without-gnu-ld --enable-shared --enable-nls --disable-multilib
    --enable-languages=c,c++,go,objc --prefix=/opt/app/gcc51
    --with-stage1-ldflags="-Wl,-rpath=/opt/app/gcc51/lib/math,-rpath=/opt/csw/lib
    -static-libstdc++"
    --with-boot-ldflags="-Wl,-rpath=/opt/app/gcc51/lib/math,-rpath=/opt/csw/lib
    -static-libstdc++" --with-build-time-tools=/opt/csw/gnu --enable-objc-gc
    --enable-threads=posix --enable-libssp --with-included-gettext
    --with-isl=/opt/app/isl
    gmake -j 12 > make.out
    gmake install

    Do some final linking and setup PATH accordingly
    ln -s /opt/app/gcc51/lib/libgo.so.7 /opt/csw/lib
    setenv PATH /opt/app/gcc51/bin:$PATH
      setenv GOPATH ~/go


    Anyhow, after all that, imagine my surprise when I run the go command from
    5.1 to build hello_world and get the same exact error as with the go
    command I built using 4.9:

    cd ~/go/src/github.com/user/hello
    go install .
    hello.go:3:8: cannot find package "fmt" in any of:
    /opt/app/gcc51/src/fmt (from $GOROOT)
    /home/user/go/src/fmt (from $GOPATH)
    package github.com/user/hello
    imports runtime: cannot find package "runtime" in any of:
    /opt/app/gcc51/src/runtime (from $GOROOT)
    /home/user/go/src/runtime (from $GOPATH)

    To get past the first set of errors, like previously, I had to link the go
    source code into GOROOT from my local git checkout of "golang/master"

    ln -s /home/user/golang/go-master/src /opt/app/gcc51/src
    >
    Now I try again:
    % go install .
    import cycle not allowed
    package github.com/user/hello
    imports fmt
    imports errors
    imports runtime
    imports unsafe
    imports runtime

    Argh! Ultimately, I actually had the same sequence of problems exactly with
    my custom tool. So I wonder, is my install working correctly?

    To make sure that the installation was not broken, I went ahead and
    compiled this hello_world project with gccgo from 5.1. Thankfully, that
    worked EXACTLY right:
    % /opt/app/gcc51/bin/gccgo -c hello.go
    % /opt/app/gcc51/bin/gccgo -o hello hello.o
    % ./hello
       Hello World


    Ok, so at least the compiler is working. But, I have no clue where to go
    from here, so now its back to this list. Am I encountering a bug in golang,
    or is something horked up somewhere in my install?

    I ran some "go list" commands in the hello_world project to see if I could
    find anything that way, but no dice on breaking the import cycle. Here is
    the output, though, for those interested:
    % go list -f '{{join .Deps "\n"}}' .
    fmt
    runtime

    % go list -f '{{join .DepsErrors "\n"}}'
    template: main:1:7: executing "main" at <.DepsErrors>: wrong type for
    value; expected []string; got []*main.PackageError

    Also, for posterity, here is my current `go env`:
    GOARCH="sparc"
    GOBIN=""
    GOCHAR=""
    GOEXE=""
    GOHOSTARCH="sparc"
    GOHOSTOS="solaris"
    GOOS="solaris"
    GOPATH="/home/user/go"
    GORACE=""
    GOROOT="/opt/app/gcc51"
    GOTOOLDIR="/opt/app/gcc51/libexec/gcc/sparc-sun-solaris2.10/5.1.0"
    CC="/opt/app/gcc51/bin/gcc"
    GOGCCFLAGS="-fPIC -fmessage-length=0"
    CXX="/opt/app/gcc51/bin/g++"
    CGO_ENABLED="0"

    Any help will be greatly appreciated!

    Thanks,
    JSo
    On Wednesday, May 13, 2015 at 9:13:57 AM UTC-7, Ian Lance Taylor wrote:

    On Tue, May 12, 2015 at 6:08 PM, Dave Cheney <da...@cheney.net
    <javascript:>> wrote:
    This is weird, it shouldn't be necessary to pass -compiler gccgo to a
    version of the go tool that was built with gccgo; the default value of
    -compiler is the compiler that built the tool.
    Whoops, you're right. I may be mistaken about what is going on here.

    Ian
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 15, 2015 at 6:45 pm

    On Fri, May 15, 2015 at 10:22 AM, Joshua Sonstroem wrote:
    Now I try again:
    % go install .
    import cycle not allowed
    package github.com/user/hello
    imports fmt
    imports errors
    imports runtime
    imports unsafe
    imports runtime
    ...
    Also, for posterity, here is my current `go env`:
    GOARCH="sparc"
    GOBIN=""
    GOCHAR=""
    GOEXE=""
    GOHOSTARCH="sparc"
    GOHOSTOS="solaris"
    GOOS="solaris"
    GOPATH="/home/user/go"
    GORACE=""
    GOROOT="/opt/app/gcc51"
    GOTOOLDIR="/opt/app/gcc51/libexec/gcc/sparc-sun-solaris2.10/5.1.0"
    CC="/opt/app/gcc51/bin/gcc"
    GOGCCFLAGS="-fPIC -fmessage-length=0"
    CXX="/opt/app/gcc51/bin/g++"
    CGO_ENABLED="0"

    I'm sorry, I don't know what is happening.

    Don't set GOROOT in the environment.

    Why does your go command think that the unsafe package imports the
    runtime package?

    Actually, I have vague recollection--do you have a directory runtime
    or unsafe in $GOPATH/src? If so, that could be the problem.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 15, 2015 at 8:55 pm
    Ok, sorry, accidentally took this offline. Bringing back in sanitized.
    Hi Ian,

    I am not setting $GOROOT in the shell environment, that is the go tool
    doing that.

    I *DO* have a directory under *$GOROOT/src* called "runtime" and another
    one called "unsafe". If those are not there then I get the following error:

    # go install -compiler gccgo .
    hello.go:3:8: cannot find package "fmt" in any of:
    /opt/app/gcc51/src/fmt (from $GOROOT)
    /home/
    ​user
    /go/src/fmt (from $GOPATH)
    package github.com/user/hello
    imports runtime: cannot find package "runtime" in any of:
    /opt/app/gcc51/src/runtime (from $GOROOT)
    /home/
    ​user
    /go/src/runtime (from $GOPATH)

    ​As I mentioned it is the above error that lead me to link the src
    directory from the golang/go repo under my GOROOT so that it could find the
    fmt package when I run the code. But this seems incorrect. It seems like it
    should use the fmt.gox file from the pkg source rather than requiring the
    source code for the fmt package, which appears to be what its looking for.​

    ​Once I make that link from to GOROOT/src it all errors out like ​
    % go install .
    import cycle not allowed
    package github.com/user/hello
    imports fmt
    imports errors
    imports runtime
    imports unsafe
    imports runtime
    A gmake of a more complex package errors out like this:

    import "bufio": import path does not contain a slash
    package bufio: unrecognized import path "bufio"
    import "bytes": import path does not contain a slash
    package bytes: unrecognized import path "bytes"
    import "compress/lzw": import path does not begin with hostname
    package compress/lzw: unrecognized import path "compress/lzw"
    import "crypto": import path does not contain a slash
    package crypto: unrecognized import path "crypto"
    import "crypto/aes": import path does not begin with hostname
    package crypto/aes: unrecognized import path "crypto/aes"
    import "crypto/cipher": import path does not begin with hostname
    package crypto/cipher: unrecognized import path "crypto/cipher"
    import "crypto/dsa": import path does not begin with hostname
    package crypto/dsa: unrecognized import path "crypto/dsa"
    import "crypto/ecdsa": import path does not begin with hostname
    package crypto/ecdsa: unrecognized import path "crypto/ecdsa"
    import "crypto/elliptic": import path does not begin with hostname
    package crypto/elliptic: unrecognized import path "crypto/elliptic"
    import "crypto/hmac": import path does not begin with hostname
    package crypto/hmac: unrecognized import path "crypto/hmac"
    import "crypto/md5": import path does not begin with hostname
    package crypto/md5: unrecognized import path "crypto/md5"
    import "crypto/rand": import path does not begin with hostname
    package crypto/rand: unrecognized import path "crypto/rand"
    import "crypto/rsa": import path does not begin with hostname
    package crypto/rsa: unrecognized import path "crypto/rsa"
    import "crypto/sha1": import path does not begin with hostname
    package crypto/sha1: unrecognized import path "crypto/sha1"
    import "crypto/sha256": import path does not begin with hostname
    package crypto/sha256: unrecognized import path "crypto/sha256"
    import "crypto/sha512": import path does not begin with hostname
    package crypto/sha512: unrecognized import path "crypto/sha512"
    import "crypto/x509": import path does not begin with hostname
    package crypto/x509: unrecognized import path "crypto/x509"
    import "encoding/base32": import path does not begin with hostname
    package encoding/base32: unrecognized import path "encoding/base32"
    import "encoding/base64": import path does not begin with hostname
    package encoding/base64: unrecognized import path "encoding/base64"
    import "encoding/binary": import path does not begin with hostname
    package encoding/binary: unrecognized import path "encoding/binary"
    import "encoding/hex": import path does not begin with hostname
    package encoding/hex: unrecognized import path "encoding/hex"
    import "encoding/json": import path does not begin with hostname
    package encoding/json: unrecognized import path "encoding/json"
    import "errors": import path does not contain a slash
    package errors: unrecognized import path "errors"
    import "flag": import path does not contain a slash
    package flag: unrecognized import path "flag"
    import "fmt": import path does not contain a slash
    package fmt: unrecognized import path "fmt"
    import "runtime": import path does not contain a slash
    package runtime: unrecognized import path "runtime"
    import "io": import path does not contain a slash
    package io: unrecognized import path "io"
    import "log": import path does not contain a slash
    package log: unrecognized import path "log"
    import "math": import path does not contain a slash
    package math: unrecognized import path "math"
    import "net": import path does not contain a slash
    package net: unrecognized import path "net"
    import "os": import path does not contain a slash
    package os: unrecognized import path "os"
    import "os/signal": import path does not begin with hostname
    package os/signal: unrecognized import path "os/signal"
    import "strings": import path does not contain a slash
    package strings: unrecognized import path "strings"
    import "sync": import path does not contain a slash
    package sync: unrecognized import path "sync"
    import "syscall": import path does not contain a slash
    package syscall: unrecognized import path "syscall"
    import "time": import path does not contain a slash
    package time: unrecognized import path "time"
    import "net/rpc": import path does not begin with hostname
    package net/rpc: unrecognized import path "net/rpc"
    import "reflect": import path does not contain a slash
    package reflect: unrecognized import path "reflect"
    import "sort": import path does not contain a slash
    package sort: unrecognized import path "sort"
    import "unicode": import path does not contain a slash
    package unicode: unrecognized import path "unicode"
    import "unicode/utf8": import path does not begin with hostname
    package unicode/utf8: unrecognized import path "unicode/utf8"
    import "log/syslog": import path does not begin with hostname
    package log/syslog: unrecognized import path "log/syslog"
    import "unsafe": import path does not contain a slash
    package unsafe: unrecognized import path "unsafe"
    import "hash": import path does not contain a slash
    package hash: unrecognized import path "hash"
    import "math/big": import path does not begin with hostname
    package math/big: unrecognized import path "math/big"
    import "math/rand": import path does not begin with hostname
    package math/rand: unrecognized import path "math/rand"
    import "strconv": import path does not contain a slash
    package strconv: unrecognized import path "strconv"
    import "text/scanner": import path does not begin with hostname
    package text/scanner: unrecognized import path "text/scanner"
    import "sync/atomic": import path does not begin with hostname
    package sync/atomic: unrecognized import path "sync/atomic"
    import "io/ioutil": import path does not begin with hostname
    package io/ioutil: unrecognized import path "io/ioutil"
    import "regexp": import path does not contain a slash
    package regexp: unrecognized import path "regexp"
    import "os/exec": import path does not begin with hostname
    package os/exec: unrecognized import path "os/exec"
    import "path/filepath": import path does not begin with hostname
    package path/filepath: unrecognized import path "path/filepath"
    Makefile:12: recipe for target 'deps' failed
    gmake: *** [deps] Error 1

    ​Which looks like the go command is just not able to import of figure out
    the import paths correctly.

    Does that help?

    Thanks,
    JSo​

    Now I try again:
    % go install .
    import cycle not allowed
    package github.com/user/hello
    imports fmt
    imports errors
    imports runtime
    imports unsafe
    imports runtime
    ...
    Also, for posterity, here is my current `go env`:
    GOARCH="sparc"
    GOBIN=""
    GOCHAR=""
    GOEXE=""
    GOHOSTARCH="sparc"
    GOHOSTOS="solaris"
    GOOS="solaris"
    GOPATH="/home/user/go"
    GORACE=""
    GOROOT="/opt/app/gcc51"
    GOTOOLDIR="/opt/app/gcc51/libexec/gcc/sparc-sun-solaris2.10/5.1.0"
    CC="/opt/app/gcc51/bin/gcc"
    GOGCCFLAGS="-fPIC -fmessage-length=0"
    CXX="/opt/app/gcc51/bin/g++"
    CGO_ENABLED="0"

    I'm sorry, I don't know what is happening.

    Don't set GOROOT in the environment.

    Why does your go command think that the unsafe package imports the
    runtime package?

    Actually, I have vague recollection--do you have a directory runtime
    or unsafe in $GOPATH/src? If so, that could be the problem.

    Ian
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at May 15, 2015 at 9:09 pm
    And final catchup post.

    Hey Ian,
    I am not setting $GOROOT in the shell environment, that is the go tool
    doing
    that. OK.
    I DO have a directory under $GOROOT/src called "runtime" and another one
    called "unsafe".
    OK, you should not have those.

    If those are not there then I get the following error:
    # go install -compiler gccgo .
    hello.go:3:8: cannot find package "fmt" in any of:
    /opt/app/gcc51/src/fmt (from $GOROOT)
    /home/
    user
    /go/src/fmt (from $GOPATH)
    package github.com/user/hello
    imports runtime: cannot find package "runtime" in any of:
    /opt/app/gcc51/src/runtime (from $GOROOT)
    /home/
    user
    /go/src/runtime (from $GOPATH)
    That makes no sense to me at all. I don't see anything like that.
    What are the contents of the generated file zstdpkglist in your libgo
    build directory? That should list "fmt" and "runtime" as standard
    packages, which should prevent that error from being reported.

    ​The only two instances of this file are gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/zstdpkglist.go,
    which contains

    ​package main

    var stdpkg = map[string]bool{
    }

    ​and ​gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/s-zstdpkglist, which
    contains
    timestamp
    ​Is that the problem?

    Thanks again,
    JSo

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at May 15, 2015 at 10:56 pm

    On Fri, May 15, 2015 at 2:09 PM, Joshua Sonstroem wrote:

    The only two instances of this file are
    gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/zstdpkglist.go, which contains
    package main

    var stdpkg = map[string]bool{
    }

    and gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/s-zstdpkglist, which
    contains
    timestamp
    Is that the problem?
    Yes. The zstdpkglist.go file should have a list of all the standard
    packages. It should be created during the libgo build. Look for the
    s-zstdpkglist rule in libgo/Makefile.am. Or just try removing
    sparc-sun-solaris2.10/libgo/s-zstdpkglist and running "make" to see
    the commands that it runs. Something must be wrong there, but I don't
    know what.

    Ian

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at Aug 15, 2015 at 9:47 pm
    Hi again everyone,

    Sorry I have been gone from posting on this thread for a bit, but I was
    giving it some time to allow another -- hopefully someone at OpenCSW -- to
    approach compiling GCC5 for sparc before I tried again. Well, the waiting
    has paid off and there is now a version of GCC5, specifically 5.2 available
    on the experimental opencsw repo. Interested parties can find it here
    -> http://buildfarm.opencsw.org/experimental.html#gcc5

    And install it with pkgutil like so -> `pkgutil -t
    http://buildfarm.opencsw.org/opencsw/experimental/gcc5 -i gcc5core`

    I've downloaded it and got it setup and I am able to build and run
    hello-world in go using gcc-go (i.e. without the go tool) no problem. Just
    like my compile of gcc-5.1 the gccgo stuff is working fine. However, I
    never was able to get the "go" command to actually work in any way other
    than displaying help with my self-compiled gcc-5.1 even though I could
    build using gcc-go successfully.

    Well, my initial tests with gcc-5.2 from OpenCSW unfortunately give the
    same errors. We basically have the same situation with the go command as
    build by opencsw and gcc version 5.2. Running just a simple `go build` of
    hello-world fails just like my own compliled gcc5

    # /opt/csw/bin/go-5.2 build hello.go
    hello.go:3:8: cannot find package "fmt" in any of:
    /opt/csw/src/fmt (from $GOROOT)
    /home/jsonstro/go/src/fmt (from $GOPATH)
    package runtime: cannot find package "runtime" in any of:
    /opt/csw/src/runtime (from $GOROOT)
    /home/jsonstro/go/src/runtime (from $GOPATH)

    If you soft link the gcc master "src" directory into the location it is
    seeking, such as "ln -s golang/go-master/src /opt/csw/src" then it fails
    like my gcc-5.1 did as well:

    import cycle not allowed
    package fmt

    imports errors

    imports runtime

    imports unsafe

    imports runtime
    I have a feeling the same zdefaultscc.go issue is happening to the opencsw
    version of gcc-5.2 as well but I don't really have a way to check since I
    am not the maintainer. I am worried that figuring this out is a bit over my
    head (I've been banging on it for a while now with no avail) so would
    appreciate ANY help from the community. Now that there is a gcc-5.2 version
    for sparc available in OpenCSW experimental, and not just my wonky gcc
    self-compile, I hope that others will be able to create test environments
    and replicate my issue with ease.

    Any help or guidance would be greatly appreciated. Truss of the build
    attached as a file above.

    @Ian: I would be happy to potentially give a go developer (like yourself or
    another [at google]) a test account on a sparc local zone to do testing if
    need be. It seems like the whole community could benefit from this if we
    can get it working.

    Thanks,
    JSo
    On Friday, May 15, 2015 at 3:56:09 PM UTC-7, Ian Lance Taylor wrote:

    On Fri, May 15, 2015 at 2:09 PM, Joshua Sonstroem <json...@ucsc.edu
    <javascript:>> wrote:

    The only two instances of this file are
    gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/zstdpkglist.go, which
    contains
    package main

    var stdpkg = map[string]bool{
    }

    and gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/s-zstdpkglist, which
    contains
    timestamp
    Is that the problem?
    Yes. The zstdpkglist.go file should have a list of all the standard
    packages. It should be created during the libgo build. Look for the
    s-zstdpkglist rule in libgo/Makefile.am. Or just try removing
    sparc-sun-solaris2.10/libgo/s-zstdpkglist and running "make" to see
    the commands that it runs. Something must be wrong there, but I don't
    know what.

    Ian
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at Aug 17, 2015 at 6:29 pm
    Hi all,

    One more time back with a quick update. Just to remove any potential
    conflicts from my manual builds of GCC5.1 I figured I should start fresh
    with my solaris 10 build environment, so I went ahead and tore down my old
    one and rebuilt a new localzone with the needed components. I added the
    opencsw packages for git and gcc-5.2 and tried to fetch the golang/tour
    github project. One significant change from the last build is that 'go get'
    now seems to work to some degree -- by which I mean it goes and checks out
    the code into $GOPATH "correctly" [it seems] -- but then it hangs horribly
    indefinitely and I have had to `kill -9` it to get out of the `go get`
    transaction. Not sure what is up there, but I'll run truss on it later
    today if I get a chance and will post the results. Nice that it works to
    checkout all the code. but the output shows the same errors in recognizing
    package objects as the manual `go build` I submitted in my last post. Here
    is an example of running `go get` a second time once it hung and I had kill
    -9'd it:

    *~/go/src/golang.org/x/tour** # */opt/csw/bin/go-5.2 get -x
    golang.org/x/tour/gotour

    package bufio: unrecognized import path "bufio"

    package bytes: unrecognized import path "bytes"

    package crypto/rand: unrecognized import path "crypto/rand"

    package crypto/sha1: unrecognized import path "crypto/sha1"

    package crypto/tls: unrecognized import path "crypto/tls"

    package encoding/base64: unrecognized import path "encoding/base64"

    package encoding/binary: unrecognized import path "encoding/binary"

    package encoding/json: unrecognized import path "encoding/json"

    package errors: unrecognized import path "errors"

    package flag: unrecognized import path "flag"

    package fmt: unrecognized import path "fmt"

    package go/ast: unrecognized import path "go/ast"

    package go/build: unrecognized import path "go/build"

    package go/parser: unrecognized import path "go/parser"

    package go/printer: unrecognized import path "go/printer"

    package go/token: unrecognized import path "go/token"

    package io: unrecognized import path "io"

    package io/ioutil: unrecognized import path "io/ioutil"

    package net: unrecognized import path "net"

    package net/http: unrecognized import path "net/http"

    package net/url: unrecognized import path "net/url"

    package runtime: unrecognized import path "runtime"

    package strings: unrecognized import path "strings"

    package sync: unrecognized import path "sync"

    package time: unrecognized import path "time"

    package log: unrecognized import path "log"

    package os: unrecognized import path "os"

    package os/exec: unrecognized import path "os/exec"

    package path/filepath: unrecognized import path "path/filepath"

    package strconv: unrecognized import path "strconv"

    package unicode/utf8: unrecognized import path "unicode/utf8"

    package html: unrecognized import path "html"

    package html/template: unrecognized import path "html/template"

    package regexp: unrecognized import path "regexp"

    package unicode: unrecognized import path "unicode"

    package image: unrecognized import path "image"

    package image/png: unrecognized import path "image/png"

    package math/rand: unrecognized import path "math/rand"
    Similarly, a `gmake` for the hashicorp serfdom.io project (the thing I set
    out to build to begin with) once I update the "go" command binary's path in
    the Makefile looks like so on the first run:

    *~/go/src/github.com/hashicorp/serf** # *gmake
    /opt/csw/bin/go-5.2 get -d -v ./...

    import "bufio": import path does not contain a slash

    package bufio: unrecognized import path "bufio"

    import "bytes": import path does not contain a slash

    package bytes: unrecognized import path "bytes"

    import "crypto/rand": import path does not begin with hostname

    package crypto/rand: unrecognized import path "crypto/rand"

    import "encoding/base64": import path does not begin with hostname

    package encoding/base64: unrecognized import path "encoding/base64"

    import "encoding/json": import path does not begin with hostname

    package encoding/json: unrecognized import path "encoding/json"

    import "errors": import path does not contain a slash

    package errors: unrecognized import path "errors"

    import "flag": import path does not contain a slash

    package flag: unrecognized import path "flag"

    import "fmt": import path does not contain a slash

    package fmt: unrecognized import path "fmt"

    github.com/armon/circbuf (download)

    import "runtime": import path does not contain a slash

    package github.com/armon/circbuf

    imports runtime: unrecognized import path "runtime"

    github.com/armon/go-metrics (download)

    import "io": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports io: unrecognized import path "io"

    import "log": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports log: unrecognized import path "log"

    import "math": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports math: unrecognized import path "math"

    import "net": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports net: unrecognized import path "net"

    import "os": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports os: unrecognized import path "os"

    import "os/signal": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports os/signal: unrecognized import path "os/signal"

    import "strings": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports strings: unrecognized import path "strings"

    import "sync": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports sync: unrecognized import path "sync"

    import "syscall": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports syscall: unrecognized import path "syscall"

    import "time": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports time: unrecognized import path "time"

    github.com/hashicorp/go-msgpack (download)

    import "encoding/binary": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports encoding/binary: unrecognized import path "encoding/binary"

    import "net/rpc": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports net/rpc: unrecognized import path "net/rpc"

    import "reflect": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports reflect: unrecognized import path "reflect"

    import "sort": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports sort: unrecognized import path "sort"

    import "unicode": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports unicode: unrecognized import path "unicode"

    import "unicode/utf8": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports unicode/utf8: unrecognized import path "unicode/utf8"

    github.com/hashicorp/go-syslog (download)

    import "log/syslog": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports log/syslog: unrecognized import path "log/syslog"

    github.com/hashicorp/logutils (download)

    github.com/hashicorp/mdns (download)

    github.com/hashicorp/go.net (download)

    import "unsafe": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports unsafe: unrecognized import path "unsafe"

    github.com/miekg/dns (download)

    import "crypto": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto: unrecognized import path "crypto"

    import "crypto/dsa": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/dsa: unrecognized import path "crypto/dsa"

    import "crypto/ecdsa": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/ecdsa: unrecognized import path "crypto/ecdsa"

    import "crypto/elliptic": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/elliptic: unrecognized import path "crypto/elliptic"

    import "crypto/hmac": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/hmac: unrecognized import path "crypto/hmac"

    import "crypto/md5": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/md5: unrecognized import path "crypto/md5"

    import "crypto/rsa": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/rsa: unrecognized import path "crypto/rsa"

    import "crypto/sha1": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/sha1: unrecognized import path "crypto/sha1"

    import "crypto/sha256": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/sha256: unrecognized import path "crypto/sha256"

    import "crypto/sha512": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/sha512: unrecognized import path "crypto/sha512"

    import "crypto/x509": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports crypto/x509: unrecognized import path "crypto/x509"

    import "encoding/base32": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports encoding/base32: unrecognized import path "encoding/base32"

    import "encoding/hex": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports encoding/hex: unrecognized import path "encoding/hex"

    import "hash": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports hash: unrecognized import path "hash"

    import "math/big": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports math/big: unrecognized import path "math/big"

    import "math/rand": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports math/rand: unrecognized import path "math/rand"

    import "strconv": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports strconv: unrecognized import path "strconv"

    import "text/scanner": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports text/scanner: unrecognized import path "text/scanner"

    github.com/hashicorp/memberlist (download)

    import "compress/lzw": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports github.com/hashicorp/memberlist

    imports compress/lzw: unrecognized import path "compress/lzw"

    import "crypto/aes": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports github.com/hashicorp/memberlist

    imports crypto/aes: unrecognized import path "crypto/aes"

    import "crypto/cipher": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports github.com/hashicorp/memberlist

    imports crypto/cipher: unrecognized import path "crypto/cipher"

    import "sync/atomic": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports github.com/hashicorp/memberlist

    imports sync/atomic: unrecognized import path "sync/atomic"

    import "io/ioutil": import path does not begin with hostname

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports github.com/hashicorp/memberlist

    imports io/ioutil: unrecognized import path "io/ioutil"

    import "regexp": import path does not contain a slash

    package github.com/armon/circbuf

    imports github.com/armon/go-metrics

    imports github.com/hashicorp/go-msgpack/codec

    imports github.com/hashicorp/go-syslog

    imports github.com/hashicorp/logutils

    imports github.com/hashicorp/mdns

    imports github.com/hashicorp/go.net/ipv4

    imports github.com/hashicorp/go.net/ipv6

    imports github.com/miekg/dns

    imports github.com/hashicorp/memberlist

    imports regexp: unrecognized import path "regexp"

    github.com/mitchellh/cli (download)

    Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1

    https fetch failed.

    Fetching http://golang.org/x/crypto/ssh/terminal?go-get=1

    Parsing meta tags from http://golang.org/x/crypto/ssh/terminal?go-get=1
    (status code 200)

    get "golang.org/x/crypto/ssh/terminal": found meta tag
    main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git",
    RepoRoot:"https://go.googlesource.com/crypto"} at
    http://golang.org/x/crypto/ssh/terminal?go-get=1

    get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta
    tag

    Fetching https://golang.org/x/crypto?go-get=1

    https fetch failed.

    Fetching http://golang.org/x/crypto?go-get=1

    Parsing meta tags from http://golang.org/x/crypto?go-get=1 (status code
    200)

    golang.org/x/crypto (download)
    and here is the output of the second run of `gmake`
    On Saturday, August 15, 2015 at 2:47:14 PM UTC-7, Joshua Sonstroem wrote:

    Hi again everyone,

    Sorry I have been gone from posting on this thread for a bit, but I was
    giving it some time to allow another -- hopefully someone at OpenCSW -- to
    approach compiling GCC5 for sparc before I tried again. Well, the waiting
    has paid off and there is now a version of GCC5, specifically 5.2 available
    on the experimental opencsw repo. Interested parties can find it here ->
    http://buildfarm.opencsw.org/experimental.html#gcc5

    And install it with pkgutil like so -> `pkgutil -t
    http://buildfarm.opencsw.org/opencsw/experimental/gcc5 -i gcc5core`

    I've downloaded it and got it setup and I am able to build and run
    hello-world in go using gcc-go (i.e. without the go tool) no problem. Just
    like my compile of gcc-5.1 the gccgo stuff is working fine. However, I
    never was able to get the "go" command to actually work in any way other
    than displaying help with my self-compiled gcc-5.1 even though I could
    build using gcc-go successfully.

    Well, my initial tests with gcc-5.2 from OpenCSW unfortunately give the
    same errors. We basically have the same situation with the go command as
    build by opencsw and gcc version 5.2. Running just a simple `go build` of
    hello-world fails just like my own compliled gcc5

    # /opt/csw/bin/go-5.2 build hello.go
    hello.go:3:8: cannot find package "fmt" in any of:
    /opt/csw/src/fmt (from $GOROOT)
    /home/jsonstro/go/src/fmt (from $GOPATH)
    package runtime: cannot find package "runtime" in any of:
    /opt/csw/src/runtime (from $GOROOT)
    /home/jsonstro/go/src/runtime (from $GOPATH)

    If you soft link the gcc master "src" directory into the location it is
    seeking, such as "ln -s golang/go-master/src /opt/csw/src" then it fails
    like my gcc-5.1 did as well:

    import cycle not allowed
    package fmt

    imports errors

    imports runtime

    imports unsafe

    imports runtime
    I have a feeling the same zdefaultscc.go issue is happening to the opencsw
    version of gcc-5.2 as well but I don't really have a way to check since I
    am not the maintainer. I am worried that figuring this out is a bit over my
    head (I've been banging on it for a while now with no avail) so would
    appreciate ANY help from the community. Now that there is a gcc-5.2 version
    for sparc available in OpenCSW experimental, and not just my wonky gcc
    self-compile, I hope that others will be able to create test environments
    and replicate my issue with ease.

    Any help or guidance would be greatly appreciated. Truss of the build
    attached as a file above.

    @Ian: I would be happy to potentially give a go developer (like yourself
    or another [at google]) a test account on a sparc local zone to do testing
    if need be. It seems like the whole community could benefit from this if we
    can get it working.

    Thanks,
    JSo
    On Friday, May 15, 2015 at 3:56:09 PM UTC-7, Ian Lance Taylor wrote:

    On Fri, May 15, 2015 at 2:09 PM, Joshua Sonstroem <json...@ucsc.edu>
    wrote:

    The only two instances of this file are
    gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/zstdpkglist.go, which
    contains
    package main

    var stdpkg = map[string]bool{
    }

    and gcc-5.1.0/objdir/sparc-sun-solaris2.10/libgo/s-zstdpkglist, which
    contains
    timestamp
    Is that the problem?
    Yes. The zstdpkglist.go file should have a list of all the standard
    packages. It should be created during the libgo build. Look for the
    s-zstdpkglist rule in libgo/Makefile.am. Or just try removing
    sparc-sun-solaris2.10/libgo/s-zstdpkglist and running "make" to see
    the commands that it runs. Something must be wrong there, but I don't
    know what.

    Ian
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joshua Sonstroem at Aug 17, 2015 at 11:23 pm
    Ok, so trussing the "go get" for the golang.org/tour project there are a
    few issues. First off, it takes a while to complete the first time thru the
    download process. Not sure why, but it gets to an exit(0) and just hangs
    indefinitely. If you wait long enough before you kill it, it does appear to
    finish downloading the codebase. Here is how the truss ends:

    2334: open64("refactor/satisfy/find.go", O_WRONLY|O_CREAT|O_EXCL, 0666) =
    4

    2334: write(4, " / / C o p y r i g h t".., 16384) = 16384

    2334: write(4, " - - - - - - - -\n\n / /".., 341) = 341

    2334: fstat64(4, 0xFFBFEE80) = 0

    2334: close(4) = 0

    2334: setitimer(ITIMER_REAL, 0xFFBFEF28, 0x00000000) = 0

    2334: sigaction(SIGALRM, 0xFFBFEDE8, 0xFFBFEE88) = 0

    2334: write(3, " D I R C\0\0\002\0\00287".., 8192) = 8192

    2334: write(3, "\0\01219 uF1 `18 / S D H".., 8192) = 8192

    2334: write(3, " l g r a p h / r t a / r".., 8192) = 8192

    2334: write(3, "\016 g o / s s a / b u i".., 8192) = 8192

    2334: write(3, "\0\0\0\0\0\0\0\0\0\01684".., 8192) = 8192

    2334: write(3, "C8E5 { s ;01CD _\0 " g o".., 8192) = 8192

    2334: write(3, " a / s r c / c a l l s /".., 8192) = 8192

    2334: write(3, "B5D70E xCE "DF1E\01E r e".., 2384) = 2384

    2334: fstat64(3, 0xFFBFF008) = 0

    2334: close(3) = 0

    2334: rename(".git/index.lock", ".git/index") = 0

    2334: access(".git/hooks/post-checkout", X_OK) Err#2 ENOENT

    2334: fstat64(1, 0xFFBFF4E0) = 0

    2334: getpid() = 2334 [2294]

    2334: write(1, " d o n e\n", 5) = 5

    2334: _exit(0)


    And basically it just sits there forever doing nothing. Let me know if
    anything else might be helpful. When I re-run the checkout it just gives me
    the error output I already included above.


    Thanks,
    JSo

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Michael Lazarou at Mar 1, 2016 at 1:08 pm

    On Friday, 15 May 2015 23:56:09 UTC+1, Ian Lance Taylor wrote:



    Yes. The zstdpkglist.go file should have a list of all the standard
    packages. It should be created during the libgo build. Look for the
    s-zstdpkglist rule in libgo/Makefile.am. Or just try removing
    sparc-sun-solaris2.10/libgo/s-zstdpkglist and running "make" to see
    the commands that it runs. Something must be wrong there, but I don't
    know what.

    Ian
    I've been struggling to get gccgo 5.3 to work on Solaris 10 as well and
    after a lot of searching this post helped me sort it.

    The line in the Makefile.am that creates the zstdpkglist.go is:

      echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's/\.lo /\":
    true,\n/g' | sed 's/\.lo/\": true,/' | sed 's/-go//' | grep -v _c | sed
    's/^/\t\"/' | sort | uniq >> zstdpkglist.go.tmp

    The issue seems to be the expression sed 's/\.lo /\": true,\n/g'. On
    Solaris 10 this does not add a newline and so ultimately nothing gets added
    as it is removed by the grep -v.

    Replacing that sed call with GNU sed was enough to fix the issue and I
    appear to have a working go tool now.

    Michael

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 7, '15 at 2:49p
activeMar 1, '16 at 1:08p
posts25
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase