On 20/11/2025 17:01, 'Stefano Cossu' via lua-l wrote:
> Hello,
>
> I am debugging a segfault in a C extension for Lua and I need to print
> out the stack trace to find which Lua line caused the segfault.
>
> In order to see meaningful info in the stack, I compiled Lua from source
> activating debug symbols (Lua 5.4.8 on Linux x64):
>
> make linux CFLAGS=-ggdb
Shouldn't that be:
MYCFLAGS=-ggdb make linux
The Lua Makefile (the main one in src/) uses the $(MYCFLAGS) env var to
add options to the build, and the var needs to be set before the make
command rather than after it.
Scott