bnagy / gapstone

gapstone is a Go binding for the capstone disassembly library
Other
151 stars 43 forks source link

Strange issue with capstone.h when run from CircleCI #20

Closed angrygoats closed 7 years ago

angrygoats commented 7 years ago

Here is the following output I get after installing gapstone with glide on a CircleCI instance and attempting to run go test:

vendor/github.com/bnagy/gapstone/arm64_constants.go:22:32: fatal error: capstone/capstone.h: No such file or directory
 // #include <capstone/capstone.h>
                                ^
compilation terminated.

This doesn't occur on my local, and tests pass. However for some reason it is occurring on CircleCI. My glide.yaml includes:

import:
- package: github.com/bnagy/gapstone
  version: ~3.0.3

and everything seems to install successfully:

cd ${PROJECT_DIR}/${CIRCLE_PROJECT_REPONAME} && glide up
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching github.com/bnagy/gapstone.
[INFO]  --> Fetching github.com/sirupsen/logrus.
[INFO]  --> Fetching gopkg.in/urfave/cli.v2.
[INFO]  --> Fetching github.com/stretchr/testify.
[INFO]  --> Detected semantic version. Setting version for github.com/sirupsen/logrus to v0.11.5.
[INFO]  --> Detected semantic version. Setting version for github.com/bnagy/gapstone to 3.0.3.
[INFO]  --> Detected semantic version. Setting version for github.com/stretchr/testify to v1.1.4.
[INFO]  --> Detected semantic version. Setting version for gopkg.in/urfave/cli.v2 to v1.19.1.
[INFO]  Resolving imports
[INFO]  --> Fetching golang.org/x/sys.
[INFO]  Found Godeps.json file in /home/ubuntu/.glide/cache/src/https-github.com-stretchr-testify
[INFO]  --> Parsing Godeps metadata...
[INFO]  --> Fetching github.com/davecgh/go-spew.
[INFO]  --> Setting version for github.com/davecgh/go-spew to 6d212800a42e8ab5c146b8ace3490ee17e5225f9.
[INFO]  --> Fetching github.com/pmezard/go-difflib.
[INFO]  --> Setting version for github.com/pmezard/go-difflib to d8ed2627bdf02c080bf22230dbb337003b7aba2d.
[INFO]  Downloading dependencies. Please wait...
[INFO]  Setting references for remaining imports
[INFO]  Exporting resolved dependencies...
[INFO]  --> Exporting github.com/pmezard/go-difflib
[INFO]  --> Exporting github.com/stretchr/testify
[INFO]  --> Exporting github.com/sirupsen/logrus
[INFO]  --> Exporting github.com/bnagy/gapstone
[INFO]  --> Exporting github.com/davecgh/go-spew
[INFO]  --> Exporting golang.org/x/sys
[INFO]  --> Exporting gopkg.in/urfave/cli.v2
[INFO]  Replacing existing vendor dependencies
[INFO]  Versions did not change. Skipping glide.lock update.
[INFO]  Project relies on 5 dependencies.

What could be causing this issue?

FrickHazard commented 7 years ago

Hey I had this same issue on windows, what did you do to get it fixed? It happens when I run

go get -u github.com/bnagy/gapstone

I have setup capstone and the like. But I'm still not sure what the issue is.