Any attempt to run the ebuild binary of jhead fails with SIGSEGV. Reproducible: Always Steps to Reproduce: 1. Install ebuild of media-gfx/jhead 2. Run "jhead" Actual Results: $ jhead Segmentation fault (core dumped) Expected Results: No SIGSEGV. Taking the tgz source archive and building by hand, without the ebuild patch, results in a working executable.
Thank you for the report. We need to have all information at hand before ticket assignment as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket Please provide [ ] the complete build.log as attachment [ ] the output of emerge --info <category/packagename> in the comment text and reopen this ticket (Status:UNCONFIRMED) afterwards.
In particular, see https://wiki.gentoo.org/wiki/Debugging#Per-package.
I can reproduce. I'll take a look.
``` $ valgrind ./jhead ==950677== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==950677== Bad permissions for mapped region at address 0x108000 ==950677== at 0x108000: ??? (in /var/tmp/portage/media-gfx/jhead-3.08/work/jhead-3.08/jhead) ==950677== ``` lol: ``` Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7fe1000 in ?? () (gdb) bt #0 0x00007ffff7fe1000 in ?? () #1 0x0000000000000001 in ?? () #2 0x00007fffffffe54b in ?? () #3 0x0000000000000000 in ?? () (gdb) ``` LDFLAGS is wrong, it tries to build the executable as a library.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=736ee1f27b0f84869cb6b99db0afffd833e69413 commit 736ee1f27b0f84869cb6b99db0afffd833e69413 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-05 16:40:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-05 16:41:03 +0000 media-gfx/jhead: fix LDFLAGS patch We don't want to build jhead itself with -shared, just libjhead. Closes: https://bugs.gentoo.org/931225 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/jhead/files/jhead-3.08-fix-makefile.patch | 4 ++-- media-gfx/jhead/{jhead-3.08.ebuild => jhead-3.08-r1.ebuild} | 0 2 files changed, 2 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d994e07488e48d462dff33a281ab8692415c35c5 commit d994e07488e48d462dff33a281ab8692415c35c5 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-05 16:44:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-05 16:44:21 +0000 media-gfx/jhead: add (very basic) smoketest to src_test Left a TODO for someone else to improve. Bug: https://bugs.gentoo.org/931225 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/jhead/jhead-3.08-r1.ebuild | 6 ++++++ 1 file changed, 6 insertions(+)
> + jhead -V || die I would expect `src_test()` to refer something from `$WORKDIR` or `./`, not `$PATH`. At least the test run on a system without `jhead` installed fails as: # FEATURES=test emerge -v1 jhead ... >>> Test phase: media-gfx/jhead-3.08-r1 /dev/shm/portage/media-gfx/jhead-3.08-r1/temp/environment: line 1620: jhead: command not found
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a67ea57e40822e253dc734cad20e39559a39ff57 commit a67ea57e40822e253dc734cad20e39559a39ff57 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-05 22:00:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-05 22:00:31 +0000 media-gfx/jhead: actually test the just-built binary Oops. Pointed out by slyfox on the bug. Bug: https://bugs.gentoo.org/931225 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/jhead/jhead-3.08-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)