gcarmix / HexWalk

Hex Viewer/Editor/Analyzer compatible with Linux/Windows/MacOS
https://www.hexwalk.com
GNU General Public License v3.0
733 stars 30 forks source link

Linux: Disassembly dialog has undefined references to capstone library #38

Closed neoh4x0r closed 1 month ago

neoh4x0r commented 2 months ago

On my system (Debian/Bookworm) with libcapstone-dev installed -- the disassembly dialog fails to link to the capstone ibrary (which was added in 6f15efc2a26f3a826afb036b87225df925c0305c).

The linker reports this error:

disasmdialog.cpp:(.text+0x2c5): undefined reference to `cs_open'
/usr/bin/ld: disasmdialog.cpp:(.text+0x324): undefined reference to `cs_disasm'
/usr/bin/ld: disasmdialog.cpp:(.text+0x39d): undefined reference to `cs_free'
/usr/bin/ld: disasmdialog.cpp:(.text+0x3a5): undefined reference to `cs_close'
collect2: error: ld returned 1 exit status

I suppose -lcapstone is not being set on Linux -- I see it in hexwalk/hexwalk.pro for windows.

gcarmix commented 2 months ago

Yes, I can reproduce this, this is because the main repository is still a work in progress for the next release of the software which added capstone library dependance. If you want to compile from source I suggest you to use the version available in the release section (latest release is 1.7.1)

neoh4x0r commented 2 months ago

Yeah I used git bisect to find the latest commit that didn't have the problem -- coincidentally it was the 1.7.1 release tag.

gcarmix commented 1 month ago

Solved with release v1.8.0