Re: Error compiling pro*c thru make in HP-UX (143 Views)
Reply
Acclaimed Contributor
Dennis Handly
Posts: 25,049
Registered: ‎03-06-2006
Message 26 of 36 (149 Views)

Re: Error compiling pro*c thru make in HP-UX

>giving no output

I assume you replaced "paths-to-search" by something appropriate? "/" would work.

>I am calling it, its proto defined in the header file used by the program

Why are you calling something if you don't know where it is defined? Who owns the header? Where is the lib that defines those functions?
Frequent Advisor
hpuserhk
Posts: 31
Registered: ‎04-02-2007
Message 27 of 36 (149 Views)

Re: Error compiling pro*c thru make in HP-UX

I already used "/" in place otf path,but it dont give any output.
I am actually modifying some one else programm, with no documentation available
and this lib/function is called init.
I find out htat this function is part of third party software used here for decoding binary files
and this softwae is installed in one of direcroy
Acclaimed Contributor
Dennis Handly
Posts: 25,049
Registered: ‎03-06-2006
Message 28 of 36 (149 Views)

Re: Error compiling pro*c thru make in HP-UX

>I find out that this function is part of third party software used here for decoding binary files and this software is installed in one of directory

Any libs there? There is a chance it is in an object, so can you just do the above nm on any file with *.o?
Frequent Advisor
hpuserhk
Posts: 31
Registered: ‎04-02-2007
Message 29 of 36 (149 Views)

Re: Error compiling pro*c thru make in HP-UX

Thanks for your help
I find out one of the .o file was
having defination of this unsat function
after including this .o(object file)
programm compiled without any errors
(no error as such of unsat which i was getting before) and executable is generated
after running this executable, after
few steps of processing(i debug by printf) programm aborting with follwing:
Memory fault(coredump)

is this link with same reason (compilation problem in creating exe)
or some other issue ,if you suggest
where exactly is problem great help
Acclaimed Contributor
Dennis Handly
Posts: 25,049
Registered: ‎03-06-2006
Message 30 of 36 (149 Views)

Re: Error compiling pro*c thru make in HP-UX

[ Edited ]

>after running this executable, after few steps of processing(I debug by printf) program aborting with following:
Memory fault(coredump)

You'll need to compile with -g so you can debug it with gdb. You can download the latest from:
http://www.hp.com/go/wdb

Then you just use: gdb tapin.exe core
Or you can start from the beginning and run it in the debugger.

Frequent Advisor
hpuserhk
Posts: 31
Registered: ‎04-02-2007
Message 31 of 36 (143 Views)

Re: Error compiling pro*c thru make in HP-UX

but is this error related to insufficent memory or some bug:
Memory fault(coredump)
Acclaimed Contributor
Dennis Handly
Posts: 25,049
Registered: ‎03-06-2006
Message 32 of 36 (143 Views)

Re: Error compiling pro*c thru make in HP-UX

>but is this error related to insufficent memory or some bug:

If you don't check the return value from malloc, you can get signal 11. (Whether that is insufficient memory or a bug, I'll leave it up to you. :-) Otherwise signal 11 is a bug. But using the debugger will tell you that without guessing.

Also please read the following about how to assign points. You have gotten lots of answers to many questions. You can assign points to every answer.
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Frequent Advisor
hpuserhk
Posts: 31
Registered: ‎04-02-2007
Message 33 of 36 (143 Views)

Re: Error compiling pro*c thru make in HP-UX

gdb was already installed ,when i run gdb tapin.exe core
give following msg:
Program terminated with signal 11, Segmentation fault.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...#0 0xc01f7198 in __ldfcvt_r+0x2ec0 ()
from /usr/lib/libc.2
(gdb)
(gdb)
(gdb)
(gdb)
Acclaimed Contributor
Dennis Handly
Posts: 25,049
Registered: ‎03-06-2006
Message 34 of 36 (143 Views)

Re: Error compiling pro*c thru make in HP-UX

#0 0xc01f7198 in __ldfcvt_r+0x2ec0 ()

Now you need to use some debugging commands.

The first is "bt" for back trace.
ldfcvt seems to be a conversion function for floating point, possibly for printf?

Then you can use the "frame #" command to go to frame # and print out locals.
Frequent Advisor
hpuserhk
Posts: 31
Registered: ‎04-02-2007
Message 35 of 36 (143 Views)

Re: Error compiling pro*c thru make in HP-UX

Hello,

Thanks for your help
Actually i used printf in the programm
for debugging and was able to resolve the problem

Acclaimed Contributor
Dennis Handly
Posts: 25,049
Registered: ‎03-06-2006
Message 36 of 36 (143 Views)

Re: Error compiling pro*c thru make in HP-UX

>Thanks for your help... and was able to resolve the problem

If you have gotten your answers, you should read my previous reply about:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.