Skip to content

Vendoring + cross compilation = missing procfs.Proc.NewStat #206

@piotrkowalczuk

Description

@piotrkowalczuk

Hi,

I'm trying to compile project on OS X for docker container:

$ CGO_ENABLED=0 GOOS=linux go build -v -ldflags "${LDFLAGS}" -o .publish/${SERVICE}d ${CMD}

Sadly I'm getting such issue:

# 
<project-path>/vendor/github.com/prometheus/client_golang/prometheus
vendor/github.com/prometheus/client_golang/prometheus/process_collector.go:119: p.NewStat undefined (type procfs.Proc has no field or method NewStat)
net/http/pprof

It looks similar to the #68 . I'm using package in version v0.7.0. This version is vendoring a procfs package that use CGO (https://github.com/prometheus/client_golang/tree/0.7.0/Godeps/_workspace/src/github.com/prometheus/procfs)

- package: github.com/prometheus/client_golang
  version: ~0.7.0
  subpackages:
  - prometheus

Glide is taking automatically version from Godeps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions