libbacktrace not supported on OpenBSD #22261
Labels
Bug
This tag is applied to issues which reports bugs.
OS: OpenBSD
Bugs/feature requests, that are specific to OpenBSD OS.
Describe the bug
libbacktrace is not supported on OpenBSD => error when building V code with
-d use_libbacktrace
flag.Reproduction Steps
Build Vlang on OpenBSD/amd64
Clone sources from Git for v-analyzer => https://github.com/vlang/v-analyzer
Try to build
v-analyzer
in normal mode =>-d use_libbacktrace
used inbuild.vsh
scriptExpected Behavior
No error when building V code with
-d use_libbacktrace
on OpenBSD.Current Behavior
Error when building
v-analyzer
on OpenBSD:Possible Solution
In
thirdparty/libbacktrace/base.c
, symbolKERN_PROC_PATHNAME
used bysyscall
is unknown on OpenBSD.It's a known issue on OpenBSD => devs don't want implement
KERN_PROC_PATHNAME
for syscall to locate the current executable path. :( See this response from Theo on OpenBSD misc mailing-list https://marc.info/?l=openbsd-misc&m=144987773230417&w=2An alternate solution is to use
whereami
library on OpenBSD to fix this issue inlibbacktrace
=> https://github.com/gpakosz/whereamiI will try to reproduce this problem on OpenBSD with the current version of
libbacktrace
and to create a similar issue upstream.After fix and merge upstream, I propose to update
libbacktrace
in Vlang sources (using amalgamation). Do you agree?Additional Information/Context
No response
V version
./v version V 0.4.7 9a0f4d8
Environment details (OS name and version, etc.)
V full version: V 0.4.7 63957f2.9a0f4d8
OS: openbsd, 7.6, GENERIC.MP#312
Processor: 2 cpus, 64bit, little endian
getwd: /home/fox/dev/vlang.git
vexe: /home/fox/dev/vlang.git/v
vexe mtime: 2024-09-19 13:51:18
vroot: OK, value: /home/fox/dev/vlang.git
VMODULES: OK, value: /home/fox/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.46.1
Git vroot status: weekly.2024.37-30-g9a0f4d84
.git/config present: true
CC version: OpenBSD clang version 16.0.6
thirdparty/tcc status: thirdparty-openbsd-amd64 8205cc59
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: