Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Make fail: Failed to retrieve a list of dependencies: Error resolving imports #46

Open
saurabh-deochake opened this issue Aug 2, 2017 · 3 comments

Comments

@saurabh-deochake
Copy link

saurabh-deochake commented Aug 2, 2017

Snap daemon version (use snapteld -v): snapteld version 1.3.0

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  NAME="CentOS Linux"
  VERSION="7 (Core)"
  ID="centos"
  ID_LIKE="rhel fedora"
  VERSION_ID="7"
  PRETTY_NAME="CentOS Linux 7 (Core)"
  ANSI_COLOR="0;31"
  CPE_NAME="cpe:/o:centos:centos:7"
  HOME_URL="https://www.centos.org/"
  BUG_REPORT_URL="https://bugs.centos.org/"
  
  CENTOS_MANTISBT_PROJECT="CentOS-7"
  CENTOS_MANTISBT_PROJECT_VERSION="7"
  REDHAT_SUPPORT_PRODUCT="centos"
  REDHAT_SUPPORT_PRODUCT_VERSION="7"
  • Kernel (e.g. uname -a): Linux node2 3.10.0-514.21.1.el7.x86_64 Disk statistics collector #1 SMP Thu May 25 17:04:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Relevant tools (e.g. plugins used with Snap): snap-plugin-collector-pciessd, snap-plugin-publisher-file, snap-plugin-collector-disk
  • Others (e.g. deploying with Ansible):

What happened:
Upon make of source code, I get above error of [ERROR] Failed to retrieve a list of dependencies: Error resolving imports

What you expected to happen:
make builds the plugin in ./build/

Steps to reproduce it (as minimally and precisely as possible):

  1. Clone the repo to $GOPATH/src/github.com/intelsdi-x/
  2. Build the plugin using make

Anything else do we need to know (e.g. issue happens only occasionally):
Upon reviewing glide logs using glide --debug up, I found out that it cannot find a package fileutils at
github.com/intelsdi-x/snap/pkg/fileutils.

Posting a snapshot of logs here:

[WARN]  Unable to checkout golang.org/x/sys/unix

**[ERROR] Error looking for golang.org/x/sys/unix: Cannot detect VCS**

[INFO]  Found Godeps.json file in /root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities
[INFO]  --> Parsing Godeps metadata...
[DEBUG] Trying to open github.com/intelsdi-x/snap-plugin-utilities/config (/root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config)
[DEBUG] Package github.com/intelsdi-x/snap-plugin-utilities/config imports github.com/intelsdi-x/snap/control/plugin
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[INFO]  --> Setting version for github.com/intelsdi-x/snap to 5c1177efc47eccc10dc459e3be44083372ea08c3.
[DEBUG] Package github.com/intelsdi-x/snap-plugin-utilities/config imports github.com/intelsdi-x/snap/core/ctypes
[DEBUG] Missing github.com/intelsdi-x/snap/core/ctypes. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/intelsdi-x/snap/control/plugin/encoding (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/control/plugin/encoding)
[DEBUG] Package github.com/intelsdi-x/snap/control/plugin/encoding imports github.com/intelsdi-x/snap/control/plugin/encrypter
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin/encrypter. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/intelsdi-x/snap/control/plugin/encrypter (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/control/plugin/encrypter)
[DEBUG] Trying to open github.com/intelsdi-x/snap/core/cdata (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/core/cdata)
[DEBUG] Package github.com/intelsdi-x/snap/core/cdata imports github.com/intelsdi-x/snap/core/ctypes

**[DEBUG] Missing github.com/intelsdi-x/snap/core/ctypes. Trying to resolve.**

[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core/cdata imports github.com/intelsdi-x/snap/pkg/ctree
[DEBUG] Missing github.com/intelsdi-x/snap/pkg/ctree. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/intelsdi-x/snap/core/ctypes (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/core/ctypes)
[DEBUG] Trying to open github.com/asaskevich/govalidator (/root/.glide/cache/src/https-github.com-asaskevich-govalidator)
[DEBUG] Trying to open github.com/intelsdi-x/snap/core/serror (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/core/serror)
[DEBUG] Trying to open github.com/intelsdi-x/snap/pkg/fileutils (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils)
[DEBUG] ImportDir error on /root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils: open /root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils: no such file or directory

**[ERROR] Error scanning github.com/intelsdi-x/snap/pkg/fileutils: open /root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils: no such file or directory**

[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[DEBUG] Trying to open github.com/intelsdi-x/snap/pkg/schedule (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/schedule)
[DEBUG] Package github.com/intelsdi-x/snap/pkg/schedule imports github.com/Sirupsen/logrus
[DEBUG] Missing github.com/Sirupsen/logrus. Trying to resolve.
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/pkg/schedule imports github.com/robfig/cron
[DEBUG] Missing github.com/robfig/cron. Trying to resolve.
[INFO]  --> Fetching updates for github.com/robfig/cron
[INFO]  --> Setting version for github.com/robfig/cron to 32d9c273155a0506d27cf73dd1246e86a470997e.
[DEBUG] Trying to open github.com/intelsdi-x/snap/scheduler/wmap (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/scheduler/wmap)
[DEBUG] Package github.com/intelsdi-x/snap/scheduler/wmap imports github.com/intelsdi-x/snap/core/cdata
[DEBUG] Missing github.com/intelsdi-x/snap/core/cdata. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/scheduler/wmap imports github.com/intelsdi-x/snap/core/ctypes
[DEBUG] Missing github.com/intelsdi-x/snap/core/ctypes. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/scheduler/wmap imports gopkg.in/yaml.v2
[DEBUG] Missing gopkg.in/yaml.v2. Trying to resolve.
[INFO]  --> Fetching gopkg.in/yaml.v2
[WARN]  Unable to checkout gopkg.in/yaml.v2

**[ERROR] Error looking for gopkg.in/yaml.v2: Cannot detect VCS**

[DEBUG] Trying to open github.com/intelsdi-x/snap/pkg/ctree (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/ctree)
[DEBUG] Package github.com/intelsdi-x/snap/pkg/ctree imports github.com/Sirupsen/logrus
[DEBUG] Missing github.com/Sirupsen/logrus. Trying to resolve.
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/robfig/cron (/root/.glide/cache/src/https-github.com-robfig-cron)
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports
@PatrykMatyjasek
Copy link

@saurabh-deochake did you tried with "glide cc" command?

@IzabellaRaulin
Copy link
Contributor

I agree with @PatrykMatyjasek - posted logs point that cached deps are used and that might be a root cause of your issue - [DEBUG] Trying to open github.com/intelsdi-x/snap/control/plugin/encoding (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/control/plugin/encoding)

@saurabh-deochake
Copy link
Author

Thank you for your reply @PatrykMatyjasek and @IzabellaRaulin. I tried glide cc, however I am still getting the same problem. I also get Cannot detect CVS errors for golang.org/x/sys/unix and gopkg.in/yaml.v2.

I posting some excerpts of the glide --debug here:

...
...
[WARN]  Unable to checkout github.com/intelsdi-x/snap
[ERROR] Error looking for github.com/intelsdi-x/snap/control/plugin: Unable to get repository
..
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin/cpolicy. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/core/cdata
[DEBUG] Missing github.com/intelsdi-x/snap/core/cdata. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/core/serror
[DEBUG] Missing github.com/intelsdi-x/snap/core/serror. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/pkg/fileutils
[DEBUG] Missing github.com/intelsdi-x/snap/pkg/fileutils. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/pkg/schedule
[DEBUG] Missing github.com/intelsdi-x/snap/pkg/schedule. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/scheduler/wmap
[DEBUG] Missing github.com/intelsdi-x/snap/scheduler/wmap. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/Sirupsen/logrus (/root/.glide/cache/src/https-github.com-Sirupsen-logrus)
[DEBUG] Package github.com/Sirupsen/logrus imports golang.org/x/crypto/ssh/terminal
[DEBUG] Missing golang.org/x/crypto/ssh/terminal. Trying to resolve.
[INFO]  --> Fetching golang.org/x/crypto/ssh/terminal
[WARN]  Unable to checkout golang.org/x/crypto/ssh/terminal
[ERROR] Error looking for golang.org/x/crypto/ssh/terminal: Cannot detect VCS
...
...
[WARN]  Unable to checkout golang.org/x/sys/unix
[ERROR] Error looking for golang.org/x/sys/unix: Cannot detect VCS
[DEBUG] Trying to open github.com/intelsdi-x/snap-plugin-utilities/config (/root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config)
[DEBUG] ImportDir error on /root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config: open /root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config: no such file or directory
...
...
[DEBUG] Missing gopkg.in/yaml.v2. Trying to resolve.
[INFO]  --> Fetching gopkg.in/yaml.v2
[WARN]  Unable to checkout gopkg.in/yaml.v2
[ERROR] Error looking for gopkg.in/yaml.v2: Cannot detect VCS
[DEBUG] Trying to open github.com/intelsdi-x/snap-plugin-utilities/config (/root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config)
[DEBUG] Package github.com/intelsdi-x/snap-plugin-utilities/config imports github.com/intelsdi-x/snap/control/plugin
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin. Trying to resolve.
...
...
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

Am I missing anything?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants