Package: gforth
Version: 0.7.3+dfsg-9+b3
Severity: important
Tags: upstream
X-Debbugs-Cc: thecoolestofbe...@protonmail.com

Dear Maintainer,

a few weeks back i tried to use some sdl2 bindings for gforth
(https://github.com/JeremiahCheatham/Gforth-SDL2-Bindings)
and encountered an "open-lib failed" error. some days ago i finally
started looking into it to figure out if its a problem with the package,
gforth in general or my specific environment and after walking through
the error with the dbg debugger, staring holes into straces and eventually
comparing results both with a friend encountering the same issue on gentoo
and a gforth build i compiled myself i have to write the strangest bug
report of my life

when gforth is compiled with some combination of cflags the open-lib
primitive simply cannot open specific .so files, including those created
by the c-library interface (no discernible pattern but always the same ones,
sdl_main.so.0 and sdl_video.so.0 as created by the c-library system in my case)

this does not occur with gforth freshly compiled from source using
CFLAGS='std=gnu99 -O2' (no debian patches) but it did occur for a friend
compiling it on gentoo only when using -O2 (makes no difference for me so
potentially a different flag when combined with -O2 triggers this
problem)

strace records an openat call for the file followed by some related mmap
calls, then munmaps it all again, closes the file, tries to open the same
file but in its parent directory ~/.gforth/libcc-named/ rather than
~/.gforth/libcc-named/.libs/. i dont even know if that is at all helpful
information to have, but i have it and im passing it onto you. good luck

feel free to email me with any followup questions, good night


-- System Information:
Debian Release: 12.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-26-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gforth depends on:
ii  emacsen-common  3.0.5
ii  gforth-common   0.7.3+dfsg-9
ii  gforth-lib      0.7.3+dfsg-9+b3
ii  libc6           2.36-9+deb12u9
ii  libltdl7        2.4.7-7~deb12u1

gforth recommends no packages.

gforth suggests no packages.

-- no debconf information

Reply via email to