Operating System - Linux
1827809 Members
1939 Online
109969 Solutions
New Discussion

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

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

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?
hpuserhk
Frequent Advisor

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
Dennis Handly
Acclaimed Contributor

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?
hpuserhk
Frequent Advisor

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
Dennis Handly
Acclaimed Contributor

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

>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.

hpuserhk
Frequent Advisor

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

but is this error related to insufficent memory or some bug:
Memory fault(coredump)
Dennis Handly
Acclaimed Contributor

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
hpuserhk
Frequent Advisor

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)
Dennis Handly
Acclaimed Contributor

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.
hpuserhk
Frequent Advisor

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

Dennis Handly
Acclaimed Contributor

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