- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Different behaviour of programs in different OS ve...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2006 10:27 PM
тАО07-31-2006 10:27 PM
Different behaviour of programs in different OS version
I received the below query from my customer and the problem is well explained by customer's example and scenario below, Please help me to understand why there is a difference in the program behaviour across different OS versions.
The problem details are as below:
-----------------------------------------------------
Problem: The potline programs compiled on HP UX 10.20 are crashing when it is run on HP-UX11.23.
Here is the sample program to illustrate the problem with "basename" function call:
File :dispka.c
#include
#include
main(int argc, char *argv[])
{
char *pname;
printf("Entering=%s\n", argv[0]);
pname = basename(argv[0]);
printf("Base name=%s\n", pname);
}
TEST 1:
Compilation:
Program is compiled on HP-UX 10.20 with following option,
cc -Aa dispka.c -o dispka
This executable is run on a different HP-UX versions and the following results were observed.
HP-UX10.20 and HP-UX 11.11
potline7 {line7} /home/line7 $ uname -a
HP-UX potline7 B.11.11 U 9000/800 2056943722 unlimited-user license
potline7 {line7} /home/line7 $ dispka
Entering=dispka
Base name=dispka
potline7 {line7} /home/line7 $ ./dispka
Entering=./dispka
Base name=dispka
HP-UX 11.23
dubal73 {line7} /home/line7 $ uname -a
HP-UX dubal73 B.11.23 U 9000/800 2377613077 unlimited-user license
dubal73 {line7} /home/line7 $ dispka
Entering=dispka
Memory fault(coredump)
dubal73 {line7} /home/line7 $ ./dispka
Entering=./dispka
Base name=dispka
In HPUX-11.23, if program is executed with prefix "./" , then it works. If it is removed it crashes with coredump.
In older versions (like 10.20 & 11.11) with or without prefix("./") it works.
TEST 2:
Compiler option:
cc dispka -o dispka compiled on HP-UX 11.23
If the same program is compiled on HP-UX 11.23 and executed on the same machine. It works with both the options(i.e with or without prefix "./");
From the above tests, it concludes that the executables generated on HP-UX10.20 may have some limitations when run on the HPUX11.11 version.
-------------------------------------------------------------
With regards,
Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2006 11:17 PM
тАО07-31-2006 11:17 PM
Re: Different behaviour of programs in different OS version
The header files and compilers may be different in the various OS's. They need to be compared for consistency.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 12:00 AM
тАО08-01-2006 12:00 AM
Re: Different behaviour of programs in different OS version
Thanks for your reply. They are using the same compiler on all the OS versions. Of course the compiler version itself is different.
I have to check about the header file. But customer had indicated if the same program is compiled on 11.23 the problem does not arise. The problem comes only when the program is compiled on the lower version of OS and executed on 11.23. Do you still think the header could be an issue?
I am really dumb in this area, so forgive me if it was a silly question.
With regards,
Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 01:15 AM
тАО08-01-2006 01:15 AM
Re: Different behaviour of programs in different OS version
$ type dispka
on 11.23 make sure it returns the version that is in your current directory and not some other (old) version that you copied across.
So you see it may not be anything to do with the compilation, just the way that you run it.
So, check $PATH across operating systems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 03:28 PM
тАО08-01-2006 03:28 PM
Re: Different behaviour of programs in different OS version
Your problem should have been fixed in 1998 with JAGaa06034. It appears this fix was never made to the 10.20 libc.1, in any following OS releases?
Looking at the machine code in libc.1, I don't see how it would work on 10.20, 11.00, 11.11, 11.23 or 11.31?
It may be related to your shell. On 10.20, when I execute a.out in a "real" (ksh) shell, I get the full absolute path. Same as on 11.23.
- Tags:
- dirname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 05:13 PM
тАО08-01-2006 05:13 PM
Re: Different behaviour of programs in different OS version
It looks like there is a patch for this issue.
PHCO_33710 - 11.23 cumulative 10.20 libc compatibility support
I am going to install this patch and check. I will then assign points to you all. Please be patient.
With regards,
Mohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2008 01:52 AM
тАО04-24-2008 01:52 AM