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] Improved import and display of custom encoding files
- [Bug] JSON export of Pattern Data contains undesired characters HOT 3
- License Question: Which one was used by this project, GPL-2.0-only or GPL-2.0-or-later HOT 1
- [Feature] Add the ability to use for/while loops in structs HOT 3
- [Feature] Zlib compressed bytes HOT 2
- [Bug] Hex Editor Panel: Right-Click Functionality Unavailable in Edit Mode HOT 1
- [Bug] MacOS x86 binary is broken on latest release HOT 22
- [Bug] Build fails on Apple silicon Ventura HOT 5
- [Bug] Conditional Unions do not properly report size
- [Feature] Add ability to access Pattern data structures inside Data Processor HOT 4
- [Bug] Opening a recent file provider with a non-existent file crashes Imhex HOT 2
- [Bug] crashed during initial setup (startup app after install crashes before gui) - settings json handling problem HOT 4
- [Bug] Process Memory Provider doesn't work. Linux.
- “imhex” is damaged and can’t be opened. You should move it to the Bin. HOT 6
- [Bug] Importing a pattern from a network directory crashes Imhex HOT 5
- [Bug] ImHex Crashes Immediately After Opening a File HOT 3
- [Bug] ImHex Searching only returns the first two results.
- [Feature] Add more prominent links to documentation HOT 3
- Try to link mbedtls statically for Arch Linux package HOT 1
- [Bug] double sign for negative int32_t
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.