helm / helm-classic

⚠️(OBSOLETE) Helm Classic v1
https://github.com/helm/helm
Other
574 stars 54 forks source link

Helm Build Resulting in errors #114

Closed kgrvamsi closed 8 years ago

kgrvamsi commented 8 years ago

I tried building up the binary both the ways

1)vagrant@vagrant-ubuntu-trusty-64:~$ go get github.com/deis/helm/...         
package k8s.io/kubernetes/pkg/apis/experimental: cannot find package "k8s.io/kubernetes/pkg/apis/experimental" in any of:
    /usr/lib/go/src/k8s.io/kubernetes/pkg/apis/experimental (from $GOROOT)
    /home/vagrant/go/src/k8s.io/kubernetes/pkg/apis/experimental (from $GOPATH)

2)vagrant@vagrant-ubuntu-trusty-64:~$ git clone https://github.com/deis/helm.git
Cloning into 'helm'...
remote: Counting objects: 646, done.
remote: Total 646 (delta 0), reused 0 (delta 0), pack-reused 646
Receiving objects: 100% (646/646), 116.08 KiB | 0 bytes/s, done.
Resolving deltas: 100% (324/324), done.
Checking connectivity... done.
vagrant@vagrant-ubuntu-trusty-64:~$ cd helm/
vagrant@vagrant-ubuntu-trusty-64:~/helm$ make build
go build -o bin/helm -ldflags "-X main.version=git-2996ede" helm/helm.go
../go/src/github.com/deis/helm/helm/manifest/manifest.go:16:2: cannot find package "k8s.io/kubernetes/pkg/apis/experimental" in any of:
    /usr/lib/go/src/k8s.io/kubernetes/pkg/apis/experimental (from $GOROOT)
    /home/vagrant/go/src/k8s.io/kubernetes/pkg/apis/experimental (from $GOPATH)
  make: *** [build] Error 1
kgrvamsi commented 8 years ago

Have a look into this issue with the change of kubernetes experimental folder strucutre

https://github.com/kubernetes/kubernetes/pull/15488

sgoings commented 8 years ago

You'll need to run make bootstrap before make build. Sorry about this! I have some updates to the README going in with #102.

bacongobbler commented 8 years ago

to clarify, we use glide to build this project to avoid the vendoring problem with go get. You'll need to install glide first, then run make bootstrap build as per the instructions @sgoings recently supplied in the README. Sorry about the confusion!

kgrvamsi commented 8 years ago
vagrant@vagrant-ubuntu-trusty-64:/github.com/deis/helm$ glide -v
glide version 0.6.1
vagrant@vagrant-ubuntu-trusty-64:/github.com/deis/helm$ make bootstrap
glide -y glide-full.yaml up
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/Masterminds/glide/cmd.Gopaths(0x0, 0x0, 0x0)
    /Users/mfarina/Code/go/src/github.com/Masterminds/glide/cmd/util.go:121 +0xba
github.com/Masterminds/glide/cmd.CowardMode(0x2b144530d670, 0xc8200f4b40, 0xc8200282b8, 0x0, 0x0, 0x0, 0x0)
    /Users/mfarina/Code/go/src/github.com/Masterminds/glide/cmd/util.go:68 +0x4b
github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo.(*Router).doCommand(0xc8200ed9a0, 0xc8200f5170, 0x2b144530d670, 0xc8200f4b40, 0x0, 0x0, 0x0, 0x0)
    /Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/router.go:209 +0x86
github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo.(*Router).runRoute(0xc8200ed9a0, 0x8dcb68, 0x6, 0x2b144530d670, 0xc8200f4b40, 0x8dcb00, 0x0, 0x0)
        /Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/router.go:164 +0x4c9
 github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo.(*Router).HandleRequest(0xc8200ed9a0, 0x8dcb68, 0x6, 0x2b144530d670, 0xc8200f4b40, 0xc8200c9400, 0x0, 0x0)
        /Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/router.go:131 +0x2fc

main.setupHandler(0xc8201220f0, 0x8dcb68, 0x6, 0x2b144530d670, 0xc8200f4b40, 0xc8200ed9a0) /Users/mfarina/Code/go/src/github.com/Masterminds/glide/glide.go:392 +0x2aa main.commands.func10(0xc8201220f0) /Users/mfarina/Code/go/src/github.com/Masterminds/glide/glide.go:326 +0x4cf github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.Command.Run(0x8dcb68, 0x6, 0x8dcb60, 0x2, 0xc820111dc0, 0x1, 0x1, 0x956ce0, 0x2a, 0x9be700, ...) /Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/command.go:127 +0x1052 github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.(App).Run(0xc8200a7500, 0xc82000a180, 0x4, 0x4, 0x0, 0x0) /Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/app.go:159 +0xc2f main.main() /Users/mfarina/Code/go/src/github.com/Masterminds/glide/glide.go:102 +0x494 make: ** [bootstrap] Error 2

vagrant@vagrant-ubuntu-trusty-64:/github.com/deis/helm$ go version
go version go1.5 linux/amd64
bacongobbler commented 8 years ago

That's odd. I wasn't able to reproduce this off master:

$ docker run -it golang:1.5.1 bash
root@4418c499e49b:/go# mkdir -p src/github.com/Masterminds
root@4418c499e49b:/go# cd src/github.com/Masterminds/
root@4418c499e49b:/go/src/github.com/Masterminds# git clone https://github.com/Masterminds/glide
root@4418c499e49b:/go/src/github.com/Masterminds# cd glide/
root@4418c499e49b:/go/src/github.com/Masterminds/glide# git checkout 0.6.1
root@4418c499e49b:/go/src/github.com/Masterminds/glide# go get ./...
root@4418c499e49b:/go/src/github.com/Masterminds/glide# cd ../..
root@4418c499e49b:/go/src/github.com# mkdir deis
root@4418c499e49b:/go/src/github.com# cd deis/
root@4418c499e49b:/go/src/github.com/deis# git clone https://github.com/deis/helm
root@4418c499e49b:/go/src/github.com/deis# cd helm/
root@4418c499e49b:/go/src/github.com/deis/helm# make bootstrap
glide -y glide-full.yaml up
[INFO] Fetching updates for github.com/rakyll/goini.
[...]

Same results when building locally off master

technosophos commented 8 years ago

This is a glide bug, and should be filed at github.com/Masterminds/glide. I'll CC in @mattfarina so he can see this.

technosophos commented 8 years ago

Also, if you can include the value of your $GOPATH, @kgrvamsi, I believe that will be helpful. And also whether you built from source or used a binary.

mattfarina commented 8 years ago

@kgrvamsi do you have the GOPATH environmental variable set?

kgrvamsi commented 8 years ago
vagrant@vagrant-ubuntu-trusty-64:~/go/github.com/deis/helm$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vagrant/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

vagrant@vagrant-ubuntu-trusty-64:~/go$ tree -d -L 3 . . ├── bin ├── github.com │   └── deis │   └── helm ├── pkg │   └── linux_amd64 │   ├── bitbucket.org │   ├── github.com │   ├── golang.org │   ├── google.golang.org │   ├── gopkg.in │   ├── k8s.io │   └── speter.net └── src ├── bitbucket.org │   └── bertimus9 ├── github.com │   ├── abbot │   ├── appc │   ├── aws │   ├── beorn7 │   ├── ClusterHQ │   ├── codegangsta │   ├── coreos │   ├── cpuguy83 │   ├── davecgh │   ├── daviddengcn │   ├── deis │   ├── dgrijalva │   ├── docker │   ├── elazarl │   ├── emicklei │   ├── evanphx │   ├── fsouza │   ├── garyburd │   ├── ghodss │   ├── godbus │   ├── gogo │   ├── golang │   ├── google │   ├── gorilla │   ├── imdario │   ├── inconshreveable │   ├── influxdb │   ├── jonboulle │   ├── juju │   ├── kardianos │   ├── kr │   ├── Masterminds │   ├── matttproud │   ├── mesos │   ├── miekg │   ├── mitchellh │   ├── mxk │   ├── onsi │   ├── pborman │   ├── prometheus │   ├── rackspace │   ├── russross │   ├── samuel │   ├── scalingdata │   ├── shurcooL │   ├── Sirupsen │   ├── skynetservices │   ├── spf13 │   ├── stretchr │   ├── syndtr │   ├── ugorji │   ├── vaughan0 │   └── xyproto ├── golang.org │   └── x ├── google.golang.org │   ├── api │   └── cloud ├── gopkg.in │   ├── natefinch │   └── yaml.v2 ├── k8s.io │   ├── heapster │   └── kubernetes └── speter.net └── go

83 directories

kgrvamsi commented 8 years ago

I saw there was a runtime issue before when i'm doing glide because of not enough resources but i changed them three times the present resource but still i face the problem

bacongobbler commented 8 years ago

@kgrvamsi if you have a copy of the Vagrantfile available I'd be happy to test what's going on and see if I can distill it into a bug report for @mattfarina.

kgrvamsi commented 8 years ago
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
  # The most common configuration options are documented and commented below.
 # For a complete reference, please see the online documentation at
 # https://docs.vagrantup.com.

 # Every Vagrant development environment requires a box. You can search for
 # boxes at https://atlas.hashicorp.com/search.
 config.vm.box = "ubuntu/trusty64"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  #  accessing "localhost:8080" will access port 80 on the guest machine.
  # config.vm.network "forwarded_port", guest: 80, host: 8080

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
   config.vm.provider "virtualbox" do |vb|
  #   # Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
   vb.memory = "1024"
   end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

   # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
   # such as FTP and Heroku are also available. See the documentation at
   # https://docs.vagrantup.com/v2/push/atlas.html for more information.
   # config.push.define "atlas" do |push|
   #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
    # end

   # Enable provisioning with a shell script. Additional provisioners such as
   # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
    # documentation for more information about their specific syntax and use.
    # config.vm.provision "shell", inline: <<-SHELL
    #   sudo apt-get update
    #   sudo apt-get install -y apache2
    # SHELL
 end
bacongobbler commented 8 years ago

@kgrvamsi I'm sorry but I was able to install helm with that Vagrantfile without any issues. Perhaps it's something to do with your specific environment?

$ vagrant up
$ vagrant ssh
$ sudo apt-get update && sudo apt-get install git
$ wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
$ tar xzf go1.5.1.linux-amd64.tar.gz
$ sudo mv go /usr/local/
$ export GOPATH=/home/vagrant/go
$ export PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
$ mkdir go
$ cd go/
$ mkdir -p src/github.com/Masterminds src/github.com/deis
$ cd src/github.com/Masterminds/
$ git clone https://github.com/Masterminds/glide
$ cd glide/
$ git checkout 0.6.1
$ go get ./...
$ cd ../../deis/
$ git clone https://github.com/deis/helm
$ cd helm/
$ make bootstrap build
glide -y glide-full.yaml up
[INFO] Fetching updates for github.com/rakyll/goini.
[...]
kgrvamsi commented 8 years ago

will give a try with the above steps may be some where i ended up with a wrong setup.....thanks for the steps and will reply you back when its done from my end

carmstrong commented 8 years ago

I ran into this as well. It resulted because I first tried to go get the dependencies that resulted in errors during a make build before realizing I had to install glide and glide up.

I fixed this by rm -rf ~/gocode/src/k8s.io and then issuing a make bootstrap again resolved it.

technosophos commented 8 years ago

Can I close this one now?

bacongobbler commented 8 years ago

Considering that it's been reproduced on @carmstrong's end, I think it's safe to close.