From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98822 invoked by alias); 18 Mar 2015 19:38:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 98768 invoked by uid 48); 18 Mar 2015 19:38:00 -0000 From: "boger at us dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly Date: Wed, 18 Mar 2015 19:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: boger at us dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01867.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462 Bug ID: 65462 Summary: Use of 'go get' with gccgo is not finding dependencies correctly Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: boger at us dot ibm.com CC: cmang at google dot com When using the go tool provided with gccgo in gcc 5.0, the use of 'go get' doesn't always find and build the dependent packages correctly. Here is an example: go get -u github.com/mitchellh/gox There is a dependent package github.com/mitchellh/iochan but that never gets downloaded or built and as a result neither does github.com/mitchellh/gox. I can make it work by downloading them in separate steps this way: go get -u github.com/mitchellh/uchan go get -u github.com/mitchellh/gox After further debugging I found the problem has to do with the code in libgo/go/cmd/go/pkg.go in the load function where it does this check: .... p1 := loadImport(path, p.Dir, stk, p.build.ImportPos[path]) if !reqPkgSrc && p1.Root == "" { continue } .... When it tries to load the github.com/mitchellh/uchan package, p1.Root == "" so it skips the rest of the code in the loop that loads the package. Isn't this a case where p1.Root should have a non-null string and therefore not continue/skip the rest of the body of the loop and get it loaded?