Comments (13)
I deleted the cloned directory and started over. I did have capstone downloaded, compiled and installed and I ran CC=gcc-10 CXX=g++-10 cmake ..
and this time it compiled successfully so I'm not sure if it was the capstone, the change in cmake, or just user error.
from imhex.
If you change CMakeLists.txt like so, you should be able to build:
target_link_libraries(ImHex libglfw.so libmagic.so libcrypto.so libdl.so libcapstone.so ${LLVM_LIBRARY_DIRS}/libLLVMDemangle.a ${Python_LIBRARIES} nlohmann_json::nlohmann_json)
I haven't tested all the functionality yet, but it compiles and executes.
from imhex.
Ubuntu 20.10 has capstone 4.0.1 which also fails.
Except, it doesn't really. For reasons I can't figure out, Debian and Ubuntu have packaged 3.0.5 and called it 4.0.1: https://packages.ubuntu.com/groovy/libcapstone3 shows 4.0.1+really+3.0.5-2
as the version string. I've never seen anything like it, but if you look at the source, it really is a 3.0.5 build.
from imhex.
Hi!
It's possible that Ubuntu has an older version of capstone than the one I'm using. It builds fine with Capstone 4.0.2 on Arch linux as well as on mingw. I'll add the version requirement to the cmake script
from imhex.
Thanks for the quick reply! Yes, Ubuntu has capstone 3.x, so I guess I'll try building a newer one from source to fulfil that. Cheers!
from imhex.
Had the same issues on Ubuntu. Posting here so hopefully helps other folks compiling on Ubuntu.
- Modified the CMakeLists.txt Python line to
find_package(Python 3.8 COMPONENTS Interpreter Development)
- Built and installed Capstone 4.0.2 from source
- Called cmake:
CC="gcc-10" CXX="g++-10" cmake ..
to fix thefatal error: concepts: No such file or directory 6 | #include <concepts>
Now stuck at /usr/bin/ld: cannot find -lLLVMDemangle
. llvm is installed but guessing I'm not using a new enough version.
[ 88%] Building CXX object CMakeFiles/ImHex.dir/libs/ImGui/source/imgui_demo.cpp.o
[ 91%] Building CXX object CMakeFiles/ImHex.dir/libs/ImGui/source/imgui_impl_opengl3.cpp.o
[ 94%] Building CXX object CMakeFiles/ImHex.dir/libs/ImGui/source/ImGuiFileBrowser.cpp.o
[ 97%] Building CXX object CMakeFiles/ImHex.dir/libs/ImGui/source/TextEditor.cpp.o
In file included from <redated>/opt/ImHex/source/lang/parser.cpp:3:
<redated>/opt/ImHex/include/helpers/utils.hpp: In instantiation of βstd::string hex::format(const string&, Args ...) [with Args = {}; std::string = std::__cxx11::basic_string<char>]β:
<redated>/opt/ImHex/source/lang/parser.cpp:300:87: required from here
<redated>/opt/ImHex/include/helpers/utils.hpp:25:32: warning: format not a string literal and no format arguments [-Wformat-security]
25 | ssize_t size = snprintf( nullptr, 0, format.c_str(), args ... );
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<redated>/opt/ImHex/include/helpers/utils.hpp:31:17: warning: format not a string literal and no format arguments [-Wformat-security]
31 | snprintf(buffer.data(), size + 1, format.c_str(), args ...);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[100%] Linking CXX executable ImHex
/usr/bin/ld: cannot find -lLLVMDemangle
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ImHex.dir/build.make:595: ImHex] Error 1
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/ImHex.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
from imhex.
It would be nice if this could build with out-of-the-box stuff on Ubuntu 20.04 (as it's a popular LTS), though it requires GCC 10 (Ubuntu has GCC 9) and I had to hack the CMake file to require Python 3.8.5 instead of 3.8.6. Still haven't pulled off a full build. Will keep trying.
from imhex.
@xorhex Neither Debian nor Ubuntu seems to ship LLVMDemangle as a shared library, only a static library. I'm trying to figure out a way to link against the static version instead.
from imhex.
Ubuntu 20.10 has capstone 4.0.1 which also fails.
from imhex.
When my projects have dependencies on likely-to-not-be-present packages, I usually make the related functionality optional in the project (e.g. if LLVM demangling is not available, disable demangling via a define from CMake). Could perhaps be a possibility for some of the deps.
from imhex.
So is this issue fixed? I'm having the problem mentioned above on Ubuntu 20.10--the weird updated but not really updated deal.
from imhex.
yes, builds fine for me on a 20.10 box.
from imhex.
I just tried on a fresh install of 20.04.1 and following this thread I'm still getting the "concepts error:
george@Ubuntu-20:~/ImHex/build$ make clean
george@Ubuntu-20:~/ImHex/build$ CC=gcc-10 CXX=g++-10 cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/george/ImHex/build
george@Ubuntu-20:~/ImHex/build$ make -j 2
[ 5%] Building CXX object CMakeFiles/ImHex.dir/source/window.cpp.o
[ 5%] Building CXX object CMakeFiles/ImHex.dir/source/main.cpp.o
In file included from /home/george/ImHex/source/main.cpp:1:
/home/george/ImHex/include/window.hpp:3:10: fatal error: concepts: No such file or directory
3 | #include <concepts>
| ^~~~~~~~~~
compilation terminated.
In file included from /home/george/ImHex/source/window.cpp:1:
/home/george/ImHex/include/window.hpp:3:10: fatal error: concepts: No such file or directory
3 | #include <concepts>
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ImHex.dir/build.make:63: CMakeFiles/ImHex.dir/source/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/ImHex.dir/build.make:76: CMakeFiles/ImHex.dir/source/window.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/ImHex.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
from imhex.
Related Issues (20)
- [Feature] Framing clicked 'pattern data' not only in the hex editor (indicated by a range of bytes) but also in the 'Pattern Data' (indicatd by a range of elements)
- [Feature] Mouse-over on 'Pattern Data' element shows affected bytes in 'hex-view' as framed.
- [Feature] Don't scroll the hex-editor view down if values fit completely in 'visible range'
- [Bug] DDS pattern is incorrect HOT 4
- [Feature] Bookmarks: Change order of bookmarks HOT 5
- [Feature] Renaming view
- [Bug] Bookmark: Tooltip for "open in new view" is not shown
- [Bug] Highlight Rules not saved
- [Feature] ASCII only view
- [Bug] GUI Layout is broken in 1.34
- [Bug] Imhex shows incorrectly version in Winget even after update
- [Bug] Linking CXX shared library libimhex.dll FAILED: libimhex.dll lib/libimhex/liblibimhex.dll.a HOT 1
- zlib_decompress to process raw deflate data (w/o zlib or gzip header).
- [Bug] Keyboard shortcuts in editor for macOS no long work in 1.34.0 HOT 7
- [Feature] UTF-16 LE/BE and Chinese Character Encoding Issues Without TBL File
- [Feature] Access prior items in Array
- [Confirmation] Pronunciation of "ImHex" regarding adoption of "Kawaii" logo HOT 3
- [Bug] High CPU utilization with 2 x 2MB files open when windows are not active
- [Bug] Cursor is not properly mapped to the window HOT 2
- [Bug] Disassembler always disassembles as little endian
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imhex.