Open inkeliz opened 5 months ago
Thanks for the bug report!
I think the patch in lfortran_intrinsics.c
is responsible for the failure. dl_phdr_info
is used for printing the runtime stack trace.
I think you can use the option --skip-run-with-dbg
to skip it for now.
Running with --skip-run-with-dbg
works. So, the issue is exclusive to stacktrace.
I think my patch can cause it, but I'm not sure. So far, I notice that dlpi_name == \0
is always false on FreeBSD. Also, on Linux it's documented as "For the main program, the dlpi_name field will be an empty string.", but that is not mentioned on FreeBSD docs (https://man.freebsd.org/cgi/man.cgi?query=dl_iterate_phdr&sektion=3).
I'll keep experimenting.
Currently, I think
conda-forge/miniforge
don't support FreeBSD (or any other BSD). The current README also doesn't hint any way to use LPython in FreeBSD (or NetBSD/DragonflyBSD/OpenBSD).I manage to compile it with some commands, described below. It seems to compile and work, but it's not possible to "show the lines which errors occur" (the stack-trace).
Setup:
Install:
Create "Alias":
Clone:
Patch
lfortran_intrinsics.c
:Without that change, it causes:
Compile:
Some tests seems to fail, specially some at
runtime_errors/*
. For instance,runtime_errors/test_assert_01.py
:I'm not sure why the "stack-trace" isn't working on FreeBSD. But, otherwise, it's working fine.