-pg does not generate gmon.out file

Bug #2040041 reported by Skewray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
New
Undecided
Unassigned

Bug Description

compiling with -pg has two issues. First, many "gcov" routines are not found during ld. I fixed this by adding "-L/usr/lib/gcc/x86_64-linux-gnu/12 -lgcov" to the ld command. That's pretty arcane. Second, the program generates .gcda files, but not the gmon.out required by the "gprof" command.

The manual entries for gcc and gprof do not imply that this functionality has been removed or altered.

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: gcc 4:12.2.0-3ubuntu1
ProcVersionSignature: Ubuntu 6.2.0-34.34-generic 6.2.16
Uname: Linux 6.2.0-34-generic x86_64
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: XFCE
Date: Fri Oct 20 22:23:12 2023
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 SHELL=/bin/tcsh
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to lunar on 2023-05-01 (172 days ago)

Revision history for this message
Skewray (ubuntu-skewray) wrote :
Revision history for this message
Skewray (ubuntu-skewray) wrote :

-pg and gprof worked fine sometime earlier this year or last year.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.