News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Cannot Profile on Ubuntu

Started by *ptr, September 06, 2005, 09:43:53 AM

Previous topic - Next topic

*ptr

Hi Guys!

I try to profile my code on Ubuntu, and it seems to not work.

the compiler log is:

Switching to target: gcc-linux
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c cwcomp/CwUtl_LenBuf.c -o .objs/development/mp3-31.08/trunk/cwcomp/CwUtl_LenBuf.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c cwcomp/cwutl_bufpol.c -o .objs/development/mp3-31.08/trunk/cwcomp/cwutl_bufpol.o
cwcomp/cwutl_bufpol.c: In function `CwUtl_BufPol_Init':
cwcomp/cwutl_bufpol.c:63: warning: assignment makes pointer from integer without a cast
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c cwcomp/cwutl_quefix.c -o .objs/development/mp3-31.08/trunk/cwcomp/cwutl_quefix.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/bitstream.c -o .objs/development/mp3-31.08/trunk/src/bitstream.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/buffers.c -o .objs/development/mp3-31.08/trunk/src/buffers.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/cwmp3_afr.c -o .objs/development/mp3-31.08/trunk/src/cwmp3_afr.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/cwmp3_dec.c -o .objs/development/mp3-31.08/trunk/src/cwmp3_dec.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/cwmp3_ffp.c -o .objs/development/mp3-31.08/trunk/src/cwmp3_ffp.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/cwmp3_wav.c -o .objs/development/mp3-31.08/trunk/src/cwmp3_wav.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/dct32.c -o .objs/development/mp3-31.08/trunk/src/dct32.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/debug.c -o .objs/development/mp3-31.08/trunk/src/debug.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/dequant.c -o .objs/development/mp3-31.08/trunk/src/dequant.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/dqchan.c -o .objs/development/mp3-31.08/trunk/src/dqchan.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/huffman.c -o .objs/development/mp3-31.08/trunk/src/huffman.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/hufftabs.c -o .objs/development/mp3-31.08/trunk/src/hufftabs.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/imdct.c -o .objs/development/mp3-31.08/trunk/src/imdct.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/mp3dec.c -o .objs/development/mp3-31.08/trunk/src/mp3dec.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/mp3tabs.c -o .objs/development/mp3-31.08/trunk/src/mp3tabs.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/polyphase.c -o .objs/development/mp3-31.08/trunk/src/polyphase.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/scalfact.c -o .objs/development/mp3-31.08/trunk/src/scalfact.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/stproc.c -o .objs/development/mp3-31.08/trunk/src/stproc.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/subband.c -o .objs/development/mp3-31.08/trunk/src/subband.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/test_mp3.c -o .objs/development/mp3-31.08/trunk/src/test_mp3.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/timing.c -o .objs/development/mp3-31.08/trunk/src/timing.o
gcc   -pg -g -DCW_MP3_LINUX -D_LINUX    -Isrc -Ipub -Icwut-headers -Icwcomp -Itest_cases  -I/usr/include -c src/trigtabs.c -o .objs/development/mp3-31.08/trunk/src/trigtabs.o
g++   -Lcwut-headers  -L/usr/lib -o mp3 .objs/development/mp3-31.08/trunk/cwcomp/CwUtl_LenBuf.o .objs/development/mp3-31.08/trunk/cwcomp/cwutl_bufpol.o .objs/development/mp3-31.08/trunk/cwcomp/cwutl_quefix.o .objs/development/mp3-31.08/trunk/src/bitstream.o .objs/development/mp3-31.08/trunk/src/buffers.o .objs/development/mp3-31.08/trunk/src/cwmp3_afr.o .objs/development/mp3-31.08/trunk/src/cwmp3_dec.o .objs/development/mp3-31.08/trunk/src/cwmp3_ffp.o .objs/development/mp3-31.08/trunk/src/cwmp3_wav.o .objs/development/mp3-31.08/trunk/src/dct32.o .objs/development/mp3-31.08/trunk/src/debug.o .objs/development/mp3-31.08/trunk/src/dequant.o .objs/development/mp3-31.08/trunk/src/dqchan.o .objs/development/mp3-31.08/trunk/src/huffman.o .objs/development/mp3-31.08/trunk/src/hufftabs.o .objs/development/mp3-31.08/trunk/src/imdct.o .objs/development/mp3-31.08/trunk/src/mp3dec.o .objs/development/mp3-31.08/trunk/src/mp3tabs.o .objs/development/mp3-31.08/trunk/src/polyphase.o .objs/development/mp3-31.08/trunk/src/scalfact.o .objs/development/mp3-31.08/trunk/src/stproc.o .objs/development/mp3-31.08/trunk/src/subband.o .objs/development/mp3-31.08/trunk/src/test_mp3.o .objs/development/mp3-31.08/trunk/src/timing.o .objs/development/mp3-31.08/trunk/src/trigtabs.o     -pg -lgmon    cwut-headers/libCwutLib.a
/usr/bin/ld: cannot find -lgmon
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 50 seconds)
0 errors, 1 warnings


I read on the troubleshooting forum the posts, and I tried the suggestions, but with no results.
Can somebody help me, please?

Many thanks beforehands

mandrav

You 're right, that is a mistake.
Linux doesn't need libgmon.a (I don't think it even exists)...
Will fix it. Thanks for the info :)

If you need to fix this yourself, edit plugins/compilergcc/compilerMINGW.cpp and remove "-lgmon" from the line where "Profile code when executed" is defined...
I will add a conditional there for non-windows platforms.
Be patient!
This bug will be fixed soon...

*ptr

Thanx.

I made the mentioned modification on C::B, but still no results.  :(
The line that we're talkin' about is:
   m_Options.AddOption(_("Profile code when executed"), "-pg", _("Profiling"), "-pg - lgmon");
which is in plugins/compilergcc/compilerMINGW.cpp at line number: 82

Currently this line in my C::B looks like:
   m_Options.AddOption(_("Profile code when executed"), "-pg", _("Profiling"), "-pg");


The error message that I get with the newly compiled C::B is the same, as in the previous post.



mandrav

Check your project's linker options. The option to link gmon must be left there. You should remove it yourself...
Be patient!
This bug will be fixed soon...