Segmentation fault running pdc on MacOS 15.3.2

I am trying to compile a C library into a Playdate HelloWorld example. The compilation (using SDK 2.6.2) is segfaulting on pdc Source HelloWorld.pdx. I cannot seem to run lldb against this command to see any more detail. Where can i look to debug this?

The built in HelloWorld example does compile fine.

My example compiles with no errors up to the segfault.

The example also worked on a previous SDK version, I don't remember which, but it was a few months ago.

My Makefile:

HEAP_SIZE      = 8388208
STACK_SIZE     = 61800

PRODUCT = HelloWorld.pdx

# Locate the SDK
SDK = ${PLAYDATE_SDK_PATH}
ifeq ($(SDK),)
    SDK = $(shell egrep '^\s*SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
endif

ifeq ($(SDK),)
$(error SDK path not found; set ENV value PLAYDATE_SDK_PATH)
endif

######
# IMPORTANT: You must add your source folders to VPATH for make to find them
# ex: VPATH += src1:src2
######

VPATH += src


# List C source files here
SRC = src/main.c 
SRC += $(addprefix /Users/bwhitman/outside/amy/src/, \
    amy.c \
    algorithms.c \
    custom.c \
    patches.c \
    delay.c \
    envelope.c \
    filters.c \
    oscillators.c \
    transfer.c \
    sequencer.c \
    partials.c \
    pcm.c \
    log2_exp2.c \
    interp_partials.c \
)

# List all user directories here
UINCDIR = /Users/bwhitman/outside/amy/src/

# List user asm files
UASRC = 

# List all user C define here, like -D_DEBUG=1
UDEFS = -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wpointer-arith \
-Wno-float-conversion -Wno-missing-declarations -Wno-strict-prototypes -Wno-double-promotion \
-Wno-old-style-declaration 

# Define ASM defines here
UADEFS = 

# List the user directory to look for the libraries here
ULIBDIR =

# List all user libraries here
ULIBS = --specs=nosys.specs

include $(SDK)/C_API/buildsupport/common.mk

I was able to find a pdc crash log in Console, it says:

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_platform.dylib      	       0x187da4164 _platform_strlen + 4
1   libsystem_c.dylib             	       0x187c11870 stpcpy + 36
2   libsystem_c.dylib             	       0x187c11804 __strcpy_chk + 36
3   pdc                           	       0x104cb2078 compileMediaFile + 184
4   pdc                           	       0x104cb1a54 compiler_run + 1360
5   pdc                           	       0x104c9685c main + 432
6   dyld                          	       0x1879f0274 start + 2840

But i'm not sure how to proceed

I think i've figured this out, but i don't understand why. If your project folder doesn't have an existing Source folder in it, the build step will cp build/pdex.dylib Source, which of course will just create a copy of pdex.dylib called Source, not a folder called Source. And then i get pdc will die trying to read the contents of a directory that's actually a file. I don't see this in the docs anywhere so maybe something to point out for others getting started.