Package Details: memsed-git 0.1.r19.gcafbbe9-2

Git Clone URL: https://aur.archlinux.org/memsed-git.git (read-only, click to copy)
Package Base: memsed-git
Description: MEMory Search and EDit for Linux, inspired by Cheat Engine
Upstream URL: https://github.com/Willy-JL/MemSed
Licenses: GPL-3.0-only
Conflicts: memsed
Provides: memsed
Submitter: ImperatorStorm
Maintainer: ImperatorStorm
Last Packager: ImperatorStorm
Votes: 1
Popularity: 0.90
First Submitted: 2025-02-18 03:12 (UTC)
Last Updated: 2025-02-23 05:40 (UTC)

Dependencies (7)

Required by (0)

Sources (5)

Latest Comments

1 2 Next › Last »

WillyJL commented on 2025-02-23 05:43 (UTC)

Makes sense, thanks!

ImperatorStorm commented on 2025-02-23 05:41 (UTC)

@WillyJL cmake, meson, make, ninja, etc. default to gcc, but can be overrided in makepkg.conf by setting the CC and CXX env vars.

Removed the clang makedepend, gcc is part of base-devel and thus not necessary to be specified as a makedepend.

WillyJL commented on 2025-02-23 05:36 (UTC)

@ImperatorStorm btw, by not using the presets, turns out it wasn't using clang here xD

But no matter, since it was actually using gcc it showed some more warnings that I did not get with clang. I've switched to using gcc now, updated the presets, and fixed all build warnings.

Might be a good idea to switch the clang makedepend with gcc, and add -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ to the configure command (unless the compiler is also something that can be specified in makepkg.conf, in which case maybe neither gcc nor clang should be in makedepends? not sure, but I don't see it mentioned in the wiki page)

WillyJL commented on 2025-02-23 02:58 (UTC) (edited on 2025-02-23 02:58 (UTC) by WillyJL)

Truth be told, I like my implementation better than pthread_cancel() xD.

Confirmed it now stops the search fine when built with -fexceptions via PKGBUILD.

WillyJL commented on 2025-02-23 01:58 (UTC)

It's not very clear, but my best understanding is that:

The standard library functions throw an exception when the thread is canceled, which is a C++ feature.

When compiling with -fexceptions, if the exception unwinds the stack to a function that does not have exception handling data (which C doesn't support), it will abort().

So basically pthread_cancel() cannot be used in C if compiling with -fexceptions.

I'll just make my own canceling logic. I chose C EXACTLY to avoid bullshit like this, and somehow I'm still catching strays.

WillyJL commented on 2025-02-23 01:36 (UTC) (edited on 2025-02-23 01:36 (UTC) by WillyJL)

Indeed, it seems like -fexceptions from the default makepkg.conf is the cuprit.

I'll try to see if it's me doing something wrong, or that flag just conflicts with legitimate behavior of how pthread_cancel() works (which would be admittedly concerning if its a default on arch).

ImperatorStorm commented on 2025-02-23 01:13 (UTC) (edited on 2025-02-23 01:13 (UTC) by ImperatorStorm)

Doesn't appear to be exclusive to chroots, I can reproduce it with memsed built from the PKGBUILD outside of a chroot. Perhaps something with Arch's compile flags?

backtrace: https://paste.ee/p/n0wNf00F

WillyJL commented on 2025-02-23 00:58 (UTC)

I've noticed that when built with this PKGBUILD, starting a search and stopping it before it completes will crash with SIGABRT (zsh reports a IOT instruction).

However, I tried to build using the same steps from the PKGBUILD and the resulting binary doesn't have this issue...

Could it be related to the chroot environment somehow?

ImperatorStorm commented on 2025-02-22 01:38 (UTC)

Thanks for the dynamic linking option!

Wrt presets: Correct, see https://wiki.archlinux.org/title/CMake_package_guidelines#CMake_can_automatically_override_the_default_compiler_optimization_flag .

WillyJL commented on 2025-02-22 00:47 (UTC) (edited on 2025-02-22 01:19 (UTC) by WillyJL)

With 4174188 you can do:

cmake --preset release -DMEMSED_VENDORED_SDL3=OFF -DMEMSED_PYTHON_VENV=OFF
cmake --build -j $(nproc) --preset release

New toggles aside, that's how I usually do it, I assume you don't use the presets to instead use system's compile flags?

For GLAD, I'm not so sure how it would work with system package. The idea is to generate bindings for exactly what the app requires, with how many different OpenGL versions there are I would imagine the system glad package doesn't support all of them but only select ones?

EDIT: I see now that the glad arch package is just the GLAD generator, not bindings themselves, so bindings would still need to be generated, just maybe without cloning the GLAD repo. I don't see an easy way to do that using an existing glad binary through cmake, so I doubt I'll look into it myself.