How to solve problem using gcc -pg on alpine?

178 Views Asked by At

I have dockerfile:

FROM alpine:3.18.2
WORKDIR /app
RUN apk add gdb gcc musl-dev make binutils
COPY ./src /app
RUN gcc main.c -pg -o app

But compilation fails with an error:

/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find gcrt1.o: No such file or directory

Tried find / -name gcrt1.o but didn't find anything

Which package should be installed for gcrt1.o?

0

There are 0 best solutions below