Error when trying to use GNU profiler on AIX


 
Thread Tools Search this Thread
Operating Systems AIX Error when trying to use GNU profiler on AIX
# 1  
Old 06-17-2014
Error when trying to use GNU profiler on AIX

Hello,

I'm trying to compile my code with ‘-pg' option in order to use GNU profiler as follows:
Code:
gcc example1.c -pg -o example1 -O2 -lc

But I'm getting this error :
Code:
collect2: gcrt0.o: cannot open as COFF file

I'm working on AIX 5.3

Thanks in advance for your help
# 2  
Old 06-17-2014
AIX XCOFF and COFF format files, but does support the older format, COFF. I think that file is in another format.

Try the file command on gcrt0.o - file /path/to/gcrt0.o See what it tells you. This is just a start. Please post the output.

I do not know enough AIX to know if there are gcc options on AIX to handle this problem. By default .o files from gcc compilation are COFF. I dunno what you have there.
# 3  
Old 06-18-2014
Hello Jim thanks for your reply

Apparently I don't have the gcrt0.o file in my system, I used the file command :
Code:
file /usr/lib/gcrt0.o

and I got this error:
Code:
/usr/lib/gcrt0.o: cannot open

any suggestions ?
# 4  
Old 06-18-2014
Check /lib and /usr/ccs/lib.
# 5  
Old 06-18-2014
Quote:
Originally Posted by CarloM
Check /lib and /usr/ccs/lib.
I checked the two directories butI didn't find it Smilie

Note:
when I use gprof command I got this result :
Code:
ksh: gprof:  not found


Last edited by SteAlma; 06-18-2014 at 11:17 AM..
# 6  
Old 06-18-2014
Maybe it's not installed?

What does this output (if anything)?
Code:
lslpp -ha bos.adt.prof

or
Code:
lslpp -w "*gprof*"

This User Gave Thanks to CarloM For This Post:
# 7  
Old 06-18-2014
with this command:
Code:
lslpp -ha bos.adt.prof

I got :
Code:
lslpp: Fileset bos.adt.prof not installed

and this one :
Code:
lslpp -w "*gprof*"

displays the following :
Code:
  File                                        Fileset                          Type
  ----------------------------------------------------------------------------
  /usr/share/man/info/EN_US/a_doc_lib/cmds/aixcmds2/gprof.htm
                               infocenter.man.EN_US.commands                   File

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

GNU TAR vs NATIVE AIX TAR

Hello, Getting this very strange error, made tar/zip through gnu tar GNU Tar ( successful tar and zip without any errors ) /opt/freeware/bin/tar cvf - /oraapp| gzip > /backup/bkp_15_6_16_oraapp.tgz GNU unTar error root@test8:/>gunzip < /config1/bkp_15_6_16_oraapp.tgz |... (5 Replies)
Discussion started by: filosophizer
5 Replies

2. UNIX for Advanced & Expert Users

Error due to unset variable - Solaris vs GNU Linux - Help needed

Hi all, I have a weird problem. When i run the below code in SunOS and Linux i get different outputs ==== $ cat tst.ksh #!/bin/ksh echo "Abc" > $LOG_FILE echo "Ret - $?" ===== In Solaris $ ./tst.ksh Abc Ret - 0 In GNU Linux (1 Reply)
Discussion started by: NickKnight
1 Replies

3. AIX

Cannot compile/install gnu program on AIX

Hello, I'm trying to install ansifilter which is a program that translates ansi text to HTML. The idea is to install it on AIX 7.1 but is failing. All de appropriate gcc libraries and requirements for this software were installed successfully, but when I do the gmake I get the following... (0 Replies)
Discussion started by: bazajav
0 Replies

4. AIX

gnu make fir AIX 5.3 and gcc 3.3.2

Hi all i had installed gcc version 3.3.2 on my AIX 5.3 machine. which make utility i have to instal so it will fit the gcc version tnx skfn (2 Replies)
Discussion started by: skfn1203
2 Replies

5. AIX

GNU/GCC on AIX server without Root rights

Hello I'm new to this Forum and I've got a big Problem. Currently I have to Install Bacula ( Backup Software) on a IBM machine(with AIX 5.3) via SSH there is no chance for me for a directly interaction with the Server. The Main problem is, I don't have Root access and no chance to get it. And... (5 Replies)
Discussion started by: maxkoch
5 Replies

6. Shell Programming and Scripting

AIX equivalent to GNU grep's -B and -A [print lines after or before matching lines]

Hi folks I am not allowed to install GNU grep on AIX. Here my code excerpt: grep_fatal () { /usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP" } Howto the same on AIX based machine? from manual GNU grep ‘--after-context=num’ Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

7. AIX

GNU Tar with compression for AIX 4.2 already compiled ?

Is there a GNU Tar available with compression option available for AIX 4.2 that I can directly use (not having to compile anything, simple installation) ? (1 Reply)
Discussion started by: Browser_ice
1 Replies

8. UNIX for Advanced & Expert Users

Porting GNU FTPD daemon from Linux to AIX

Dear All, I want to port GNU ftpd daemon server from Linux to AIX. I want to download GNU ftpd daemon for linux. Please tell me from where I can download this code and which code will be most suitable for this porting? Please help in this regard. Thanks Siva (0 Replies)
Discussion started by: srksn
0 Replies

9. UNIX for Advanced & Expert Users

GNU's make error codes - list

Hi, I often encounter make errors. Many a times, a corresponding error code is also shown, like make: Error 56 (ignored) make: Error 91 (ignored) make: Error 96 (ignored) et al. I tried google'ing as well as searching this forum for what these error codes mean. I know, make... (1 Reply)
Discussion started by: vino
1 Replies
Login or Register to Ask a Question