Binary portability
- From: hobbes_7_8@xxxxxxxxx
- Date: 21 Nov 2006 09:25:04 -0800
Hi everybody!
I have two servers. On the development server I compiled hello world:
----------
$ uname -a
HP-UX porsx008 B.11.11 U 9000/800 2647643434 unlimited-user license
$ g++ hello.cpp -o hello
$ hello
Hello, world!
$ chatr +s enable hello
[...]
$ hello
Hello, world!
$ odump -sllibloadlist hello
Shared Library Load List for hello:
Order Name
0 hello
1 ^ /usr/local/lib/libstdc++.sl
2 ^ ^ /usr/lib/libm.2
3 ^ ^ /usr/lib/libc.2
4 ^ ^ ^ /usr/lib/libdld.2
5 ^ /usr/lib/libm.2
6 ^ /usr/lib/libc.2
7 ^ ^ /usr/lib/libdld.2
----------
.... then I transfer this binary to the production machine, along with
the libraries it depends on:
----------
PROD - ebs_jm@porsx013 [/home/ebs_jm/utils/jmdm/effMerger/orig] ->uname
-a
HP-UX porsx013 B.11.11 U 9000/800 3010439678 unlimited-user license
PROD - ebs_jm@porsx013 [/home/ebs_jm/utils/jmdm/effMerger/orig]
->export SHLIB_PATH=`pwd`
PROD - ebs_jm@porsx013 [/home/ebs_jm/utils/jmdm/effMerger/orig] ->odump
-sllibloadlist hello
Shared Library Load List for hello:
Order Name
0 hello
1 ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libstdc++.sl
2 ^ ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libm.2
3 ^ ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libc.2
4 ^ ^ ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libdld.2
5 ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libm.2
6 ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libc.2
7 ^ ^ /home/ebs_jm/utils/jmdm/effMerger/orig/libdld.2
PROD - ebs_jm@porsx013 [/home/ebs_jm/utils/jmdm/effMerger/orig] ->hello
Memory fault(coredump)
----------
.... so it seems the same binary doesn't run on these two machines. Does
anyone knows a way around this problem?
Thanks in advance,
André
.
- Follow-Ups:
- Re: Binary portability
- From: Paul Pluzhnikov
- Re: Binary portability
- Prev by Date: Re: Has someone got "/usr/ccs/bin/ld: Can't find library: "dl"" error
- Next by Date: Re: Binary portability
- Previous by thread: HP-UX 8 boot failure - missing console device
- Next by thread: Re: Binary portability
- Index(es):