pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/52644: 'go build' command fails with 'undefined' variable error.



>Number:         52644
>Category:       pkg
>Synopsis:       'go build' command fails with 'undefined' variable error.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 23 11:10:00 +0000 2017
>Originator:     Utkarsh Anand
>Release:        http://nycdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.1/All/go-1.8.3.tgz
>Organization:
NetBSD
>Environment:
NetBSD utkarsh.localhost 7.99.71 NetBSD 7.99.71 (XEN3_DOM0) #1: Sat Jun 10 13:41:43 IST 2017  root@utkarsh-GP62-6QE:/extra/obj/sys/arch/amd64/compile/XEN3_DOM0 amd64
>Description:
import ( 
        ?http://github.com/blahblahblah/osutil? 
) 
osutil.Myfunc() 

This throws an ?undefined? error for osutil.Myfunc(), although Myfunc is defined inside $GOPATH/src/github.com/blahblahblah/osutil/somefile.go
I had to copy the entire function to that file to make it work.

NB: It works in linux.
>How-To-Repeat:
install the go package from:
http://nycdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.1/All/go-1.8.3.tgz

set GOPATH env variable.

go get <Any github repository of your choice.>

Then type go build inside the desired package folder.

NB: The github repository of your choice must contain a go file that imports something from another package downloaded from github.
>Fix:


Home | Main Index | Thread Index | Old Index