Package Details: imhex 1.37.4-1

Git Clone URL: https://aur.archlinux.org/imhex.git (read-only, click to copy)
Package Base: imhex
Description: A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM
Upstream URL: https://imhex.werwolv.net
Licenses: GPL-2.0-or-later
Conflicts: imhex-patterns-git
Provides: imhex-patterns
Submitter: KokaKiwi
Maintainer: KokaKiwi
Last Packager: KokaKiwi
Votes: 65
Popularity: 1.14
First Submitted: 2020-12-04 11:19 (UTC)
Last Updated: 2025-04-16 07:42 (UTC)

Latest Comments

1 2 3 4 5 6 .. 8 Next › Last »

leo980 commented on 2025-04-15 08:08 (UTC)

Besides, this package adopt options=(!strip) in its PKGBUILD, i have no clue on the reason of such practice.

Doing so would bundle the debug symbols with the binary package, instead of building a separated -debug package, which bloats the package size for those who do not need the debug symbols.

# file size with !strip
-rw-r--r-- 1 leo leo 175M Apr 15 13:05 imhex-1.37.4-1-x86_64.pkg.tar.zst

# file sizes without !strip
-rw-r--r-- 1 leo leo  27M Apr 15 13:15 imhex-1.37.4-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 leo leo 148M Apr 15 13:15 imhex-debug-1.37.4-1-x86_64.pkg.tar.zst

I would also propose a patch to remove this build option.

From d29b6e5e9514f0d226006c8c64623e8af14f0c23 Mon Sep 17 00:00:00 2001
From: Leo <i@hardrain980.com>
Date: Tue, 15 Apr 2025 13:09:49 +0800
Subject: [PATCH] PKGBUILD: remove `!strip` from build options

---
 .SRCINFO | 1 -
 PKGBUILD | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 4868c07..63e2b25 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -30,7 +30,6 @@ pkgbase = imhex
    provides = imhex-patterns
    conflicts = imhex-patterns-git
    options = !lto
-   options = !strip
    source = imhex-1.37.4.tar.gz::https://github.com/WerWolv/ImHex/releases/download/v1.37.4/Full.Sources.tar.gz
    source = imhex-patterns-1.37.4.tar.gz::https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v1.37.4.tar.gz
    source = 2a6d3059172dd236a756905769a1a4ece376d8a3.patch
diff --git a/PKGBUILD b/PKGBUILD
index 72d9d75..822861e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,7 +27,7 @@ sha256sums=('711481cc8dfc368d1b88f5d3e8a44d65f23fa43eb9db092599924f3a4cf1aaa2'
 b2sums=('11f93ca310ddec8ec7d074d5450a02f3147d40aaa92387fbe7fce3be08445e129bbd7336d923e971a2f7f2b6df778a6210de73060cb91abe85161e7fd88588b7'
         'c8699f9f26faeae784b4c4cb14b682d0f4d0c544ef8c9596b8688c19e6066d7101a7c32979ee807cd4a05225fe2548a8759b1fd0a07c578ea5c0fcdb9f104e69'
         'd7911a267d6d0ac31b0d3fa4cd2619bf77138481e83f5ace6e095c8f87d74d17b57cfcbe03fc264c40367cee8df0739f51146c308749b11f4c44fd5c64be3233')
-options=(!lto !strip)
+options=(!lto)

 prepare() {
   patch -p1 -i "${srcdir}/2a6d3059172dd236a756905769a1a4ece376d8a3.patch" -d "${srcdir}/ImHex/lib/third_party/edlib";
-- 
GitLab

leo980 commented on 2025-04-15 08:03 (UTC)

(2/2)

From 245fe76b0043fe0df6ae1e7767e986af5380a19c Mon Sep 17 00:00:00 2001
From: Leo <i@hardrain980.com>
Date: Tue, 15 Apr 2025 13:06:21 +0800
Subject: [PATCH] patch: cmake 4.x compatibility

---
 .SRCINFO                                      |  3 +++
 ...3059172dd236a756905769a1a4ece376d8a3.patch | 21 +++++++++++++++++++
 PKGBUILD                                      | 13 +++++++++---
 3 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 2a6d3059172dd236a756905769a1a4ece376d8a3.patch

diff --git a/.SRCINFO b/.SRCINFO
index 5567c6a..4868c07 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -33,9 +33,12 @@ pkgbase = imhex
    options = !strip
    source = imhex-1.37.4.tar.gz::https://github.com/WerWolv/ImHex/releases/download/v1.37.4/Full.Sources.tar.gz
    source = imhex-patterns-1.37.4.tar.gz::https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v1.37.4.tar.gz
+   source = 2a6d3059172dd236a756905769a1a4ece376d8a3.patch
    sha256sums = 711481cc8dfc368d1b88f5d3e8a44d65f23fa43eb9db092599924f3a4cf1aaa2
    sha256sums = 541eddc8cc427d1aeb749bc455911fccc87f64a7784bd4bbc35ecb7b56c03ad5
+   sha256sums = 915f9dc0b8b08c7292fc6e32f9e3d8987c1a5ec6fdf2e8deb796949d105e8ed9
    b2sums = 11f93ca310ddec8ec7d074d5450a02f3147d40aaa92387fbe7fce3be08445e129bbd7336d923e971a2f7f2b6df778a6210de73060cb91abe85161e7fd88588b7
    b2sums = c8699f9f26faeae784b4c4cb14b682d0f4d0c544ef8c9596b8688c19e6066d7101a7c32979ee807cd4a05225fe2548a8759b1fd0a07c578ea5c0fcdb9f104e69
+   b2sums = d7911a267d6d0ac31b0d3fa4cd2619bf77138481e83f5ace6e095c8f87d74d17b57cfcbe03fc264c40367cee8df0739f51146c308749b11f4c44fd5c64be3233

 pkgname = imhex
diff --git a/2a6d3059172dd236a756905769a1a4ece376d8a3.patch b/2a6d3059172dd236a756905769a1a4ece376d8a3.patch
new file mode 100644
index 0000000..8d91e5b
--- /dev/null
+++ b/2a6d3059172dd236a756905769a1a4ece376d8a3.patch
@@ -0,0 +1,21 @@
+From 2a6d3059172dd236a756905769a1a4ece376d8a3 Mon Sep 17 00:00:00 2001
+From: Ben Lawrence <ben.lawrence@nanoporetech.com>
+Date: Wed, 2 Apr 2025 12:54:46 +0100
+Subject: [PATCH] Bump minimum CMake version to 3.5
+
+With the recent release of CMake 4.0, support for versions less than
+3.5 have been removed.
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f2d0e20..0d72795 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+ project(edlib VERSION 1.2.6)
+ 
+ option(EDLIB_ENABLE_INSTALL "Generate the install target" ON)
diff --git a/PKGBUILD b/PKGBUILD
index 3483016..72d9d75 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,13 +19,20 @@ optdepends=('dotnet-runtime: support for .NET scripts')
 provides=('imhex-patterns')
 conflicts=('imhex-patterns-git')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/WerWolv/ImHex/releases/download/v$pkgver/Full.Sources.tar.gz"
-        "imhex-patterns-$pkgver.tar.gz::https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v$pkgver.tar.gz")
+        "imhex-patterns-$pkgver.tar.gz::https://github.com/WerWolv/ImHex-Patterns/archive/refs/tags/ImHex-v$pkgver.tar.gz"
+        '2a6d3059172dd236a756905769a1a4ece376d8a3.patch')
 sha256sums=('711481cc8dfc368d1b88f5d3e8a44d65f23fa43eb9db092599924f3a4cf1aaa2'
-            '541eddc8cc427d1aeb749bc455911fccc87f64a7784bd4bbc35ecb7b56c03ad5')
+            '541eddc8cc427d1aeb749bc455911fccc87f64a7784bd4bbc35ecb7b56c03ad5'
+            '915f9dc0b8b08c7292fc6e32f9e3d8987c1a5ec6fdf2e8deb796949d105e8ed9')
 b2sums=('11f93ca310ddec8ec7d074d5450a02f3147d40aaa92387fbe7fce3be08445e129bbd7336d923e971a2f7f2b6df778a6210de73060cb91abe85161e7fd88588b7'
-        'c8699f9f26faeae784b4c4cb14b682d0f4d0c544ef8c9596b8688c19e6066d7101a7c32979ee807cd4a05225fe2548a8759b1fd0a07c578ea5c0fcdb9f104e69')
+        'c8699f9f26faeae784b4c4cb14b682d0f4d0c544ef8c9596b8688c19e6066d7101a7c32979ee807cd4a05225fe2548a8759b1fd0a07c578ea5c0fcdb9f104e69'
+        'd7911a267d6d0ac31b0d3fa4cd2619bf77138481e83f5ace6e095c8f87d74d17b57cfcbe03fc264c40367cee8df0739f51146c308749b11f4c44fd5c64be3233')
 options=(!lto !strip)

+prepare() {
+  patch -p1 -i "${srcdir}/2a6d3059172dd236a756905769a1a4ece376d8a3.patch" -d "${srcdir}/ImHex/lib/third_party/edlib";
+}
+
 build() {
   export CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override"

-- 
GitLab

leo980 commented on 2025-04-15 08:02 (UTC)

(1/2)

imhex built fails with cmake>=4 because of cmake version conflict of a third-party library utilised by imhex.

The related build log is listed below:

CMake Error at lib/third_party/edlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

To address this issue, upstream commit 379d826 should be backported, which modified .gitmodules to redirect the problematic library to a patched version.

But unfortunately the released tarballs does not use git submodule, but bundled all submodules instead. Thus we need to backport commit 2a6d305 on the library to our Arch source package.

The patch below on this repository would do everything mentioned above with a confirmed-successful build with cmake==4.0.1-1

kruzah commented on 2025-03-19 11:01 (UTC)

The package already builds in parallel for me with MAKEFLAGS="-j$(nproc)" in /etc/makepkg.conf.

RadxaYuntian commented on 2025-03-10 10:48 (UTC)

Second suggestion for parallel build. For now I'll just use binary package.

RocketDev commented on 2024-12-28 13:23 (UTC)

It's a bit too slow to build the app... I guess it's a good idea to build it with cmake --build build -j 8 to speed up the build process. This option is added in CMake 3.12 and the latest CMake we have is 3.31, so that should be working.

directrix1 commented on 2024-10-13 06:11 (UTC) (edited on 2024-10-13 07:29 (UTC) by directrix1)

This doesn't include the standard magic also there is no option to download it.

frydac commented on 2024-10-10 11:47 (UTC)

Currently I'm getting the following issue: imhex: error while loading shared libraries: libfmt.so.10: cannot open shared object file: No such file or directory not sure when it started to happen.

When I manually install the fmt10 package, it works: https://aur.archlinux.org/packages/fmt10

the version of imhex on my system:

Version:     1.35.4
Commit:      master@4c1f6fc
Build time:  Sep 17 2024, 09:13:53
Type:        Installed

RocketDev commented on 2024-10-05 15:02 (UTC)

Please consider making parallelly. Currently only one job is running when building and it takes time to compile.

petris commented on 2024-07-09 12:41 (UTC)

Latest 1.35.4 update doesn't build in a clean chroot:

  [ 55%] Building CXX object lib/libimhex/CMakeFiles/libimhex.dir/source/helpers/fs.cpp.o
  In file included from /__w/aur-build/aur-build/packages/imhex/merged/src/ImHex/lib/third_party/nativefiledialog/src/include/nfd_glfw3.h:15,
                   from /__w/aur-build/aur-build/packages/imhex/merged/src/ImHex/lib/libimhex/source/helpers/fs.cpp:44:
  /usr/include/GLFW/glfw3native.h:119:12: fatal error: X11/extensions/Xrandr.h: No such file or directory
    119 |   #include <X11/extensions/Xrandr.h>
        |            ^~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [lib/libimhex/CMakeFiles/libimhex.dir/build.make:328: lib/libimhex/CMakeFiles/libimhex.dir/source/helpers/fs.cpp.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  make[1]: *** [CMakeFiles/Makefile2:2299: lib/libimhex/CMakeFiles/libimhex.dir/all] Error 2
  make: *** [Makefile:136: all] Error 2
  ==> ERROR: A failure occurred in build().
      Aborting...

Looks like libxrandr is needed as either a dependency or a make dependency.