bnagy / gapstone

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

go get failed #5

Closed ipfans closed 10 years ago

ipfans commented 10 years ago

After I installed capstone with Homebrew, trying to install gapstone:

go get github.com/bnagy/gapstone
# github.com/bnagy/gapstone
37: error: use of undeclared identifier 'CS_ARCH_SYSZ'
38: error: use of undeclared identifier 'CS_ARCH_SPARC'
38: error: use of undeclared identifier 'CS_MODE_V9'
aquynh commented 10 years ago

this is because Capstone on Homebrew is 2.1.2, but Gapstone requires latest code in the "next" branch on Github: https://github.com/aquynh/capstone/tree/next

so the solution is to get latest github code, then compile & install the "next" branch. after that, you can try to install Gapstone again.

cheers.

StalkR commented 10 years ago

With both capstone and gapstone on next: 39: error: 'ARM64_REG_MAX' undeclared (first use in this function) 39: error: 'ARM64_GRP_MAX' undeclared (first use in this function) 39: error: 'ARM64_INS_MAX' undeclared (first use in this function)

capstone next 11f8e7c5969c1c43304bfd32dc7ef2d7972d4f3d gapstone next 209088ba4501154d3c3c8e7e5281babe909aed87

StalkR commented 10 years ago

Looks like they've been renamed s/MAX/ENDING/ in https://github.com/aquynh/capstone/commit/d7e42b7d3659a6d3a5e065afd19ce9547dea8dbe I've fixed those and others but unfortunately there are more build errors after. I'll send a PR if I get to the bottom of it.

StalkR commented 10 years ago

Alternatively: if you take gapstone/next at head (209088ba4501154d3c3c8e7e5281babe909aed87), it builds against capstone/next at 2c425fcbe2524f2bdd04d810e7a2fe13a59f9f2f (around the same dates).

ipfans commented 10 years ago

thanks

bnagy commented 10 years ago

Give me ~1-2 weeks and I'll be finishing the rest of gapstone against capstone v3, we were waiting for the last of the architectures to stabilise.

StalkR commented 10 years ago

ok, thx!

hitzhangjie commented 4 years ago

go get still failed.