1834346 Members
2255 Online
110066 Solutions
New Discussion

Why the month is missing

 
zhaogui
Super Advisor

Why the month is missing

Hi,
Anybody knows how come I can compile and run my my program successfully on nodeA using Ansi C compiler, but after I copied it over to nodeB, where there is no Ansi C developer's bundle, the program generated a wrong output which does not contain month data as I expected on nodeA? More strangely, if I copied the source code to nodeC with Ansi C bundle and compiled it there and then copied it to nodeB, then the result is correct. In above compilation, I used "cc -Aa" option to make code Ansi-compliant.

Thanks,
7 REPLIES 7
Deepak Extross
Honored Contributor

Re: Why the month is missing

Are you compiling on NodeB or just copying the executables to it? Any warnings thrown up during compilation?

zhaogui
Super Advisor

Re: Why the month is missing

I only compiled the source code on nodeA or nodeC since there is no Ansi C bundle installed on nodeB.

The problem now is when I copied the executable to nodeB and run it I am getting the incorrect result. But this can be solved if I copied it from nodeC to nodeB rather than from nodeA.

When I compiled the source code using "cc src.c -o src.o -Aa" on either nodeA or nodeC, I always got the following warning message,

/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (src.o) was detected. The linked output may not run on a PA 1.x s
ystem.
Deepak Extross
Honored Contributor

Re: Why the month is missing

Would it be possible to paste src.c here? And the output?
zhaogui
Super Advisor

Re: Why the month is missing

It is not convienient to paste source code here because it is so huge and also requires input data file. But the executable can be run on nodeA or nodeC without any problem. All nodes are running HP-UX 11.00 with 64 bits.
Deepak Extross
Honored Contributor

Re: Why the month is missing

Did you compare the patch levels on NodeA and NodeC?
zhaogui
Super Advisor

Re: Why the month is missing

You are right. Just now I checked the patch level. On nodeC, there is patch PHSS_22272 1.0 ANSI C compiler cumulative patch. But it does not exist on nodeA.

Do you think this difference will affect the output behaviour of the executables?
Deepak Extross
Honored Contributor

Re: Why the month is missing

I thought PHSS_22272 was related to Oracle, but it won't hurt to try.