Cannot compile using "gcc -pg"

3 posts / 0 new
Last post
#1 Mon, 2017-09-04 06:14
zhanxw
  • zhanxw's picture
  • Offline
  • Last seen: 6 months 4 weeks ago
  • Joined: 2016-07-01

Hello,

I am using Alpine linux 3.5.
I can only compile a c program using gcc without "-pg" flag (for profiling purpose).
When "-pg" flag was used, I got this message:

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

Any suggestions on solving this problem?

Wed, 2017-11-01 13:46
bantl23
  • bantl23's picture
  • Offline
  • Last seen: 4 months 3 weeks ago
  • Joined: 2017-11-01

I get the same error. That file is contained in the package pcc-libs-dev @ /usr/lib/pcc/x86_64-alpine-linux-musl/1.1.0/lib

Not quite sure how to link it just yet but maybe that needs to be added in during the compile step?

Wed, 2017-11-01 15:48
bantl23
  • bantl23's picture
  • Offline
  • Last seen: 4 months 3 weeks ago
  • Joined: 2017-11-01

I could not get this working with -pg either. I tried adding it in during the compile step and link steps. I had to remove -pg completely.

Log in or register to post comments