I need help with a Disk quota exceeded error while compiling my C program

I am getting the error /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: final link failed: Disk quota exceeded when trying to compile with clang. My .c files are in a folder called src and my headers are in a folder called include. I believe it is a error with my makefile so I have included it below. If anyone can tell me what i am doing wrong it would be much apprieciated.

Edit: It wasn’t showing this previously but now in the repl resources it is saying that storage is close to limit

Repl link:

all: main

CC = clang
SRCS = $(shell find src -name '*.c')
HEADERS = $(shell find include -name '*h')
override CFLAGS += -g -Wno-everything -pthread -lm -I/nix/store/i8yhzspzcfhasp2drclzcx69ll764i4n-SDL2-2.0.14-dev/include/SDL2 -L/nix/store/nli3cgripsmk1fjabb81arsgz8437g54-SDL2-2.0.14/lib -Wl,-rpath,/nix/store/nli3cgripsmk1fjabb81arsgz8437g54-SDL2-2.0.14/lib -Wl,--enable-new-dtags -lSDL2 -lSDL2_image -lSDL2_ttf

main: $(SRCS) $(HEADERS)
	$(CC) $(CFLAGS) $(SRCS) -o main -Wall

	rm -f main main-debug

I have absolutely no clue about this, but on line three you have *.c, then on line four you have *h, should that be *.h?

your right, thank you for pointing that out

see if adding the -Ofast to the CFLAGS reduces the size, or if not -Oz. Still too large? Change -o main to -o ../main and add another . before ./main

I added that and now the error is final linked failed: no space left on device

Turns out valgrind had created vgcore files that were several gigabytes large. I deleted them and it work perfectly.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.