- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Builind interdependent dunamic libraries
Operating System - HP-UX
1748217
Members
4161
Online
108759
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-02-2004 10:33 PM
тАО07-02-2004 10:33 PM
Builind interdependent dunamic libraries
Hi,
I am facing a problem in building two dynamic libraries which depended on each other. I am able to build these 2 libraries on other platforms.
I am doing the following steps.
I build libTest1.sl using the following link line
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest1.sl *.o
(I get all the symbols defined in lib2.sl as unsatisfied).
I build libTest2.sl using
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest2.sl *.o -lTest1
Now if I try again to build the libTest1.sl using
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest1.sl *.o -lTest2, I get an error as follows
/usr/ccs/bin/ld: Cannot specify input file (libTest1.sl) that is the same as the output file.
So I did
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest3.sl *.o -lTest2
and then moved libTest3.sl libTest1.sl.
Now if I do a lld -r on libTest1.sl and libTest2.sl, I find both libTest1 and libTest2 in both the libraries.
I am using aCC: HP ANSI C++ B3910B A.03.30 compiler.
Is it ok to design the libraries like this (which depend on each other)?
What is the correct way to build such libraries?
TIA
satya
I am facing a problem in building two dynamic libraries which depended on each other. I am able to build these 2 libraries on other platforms.
I am doing the following steps.
I build libTest1.sl using the following link line
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest1.sl *.o
(I get all the symbols defined in lib2.sl as unsatisfied).
I build libTest2.sl using
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest2.sl *.o -lTest1
Now if I try again to build the libTest1.sl using
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest1.sl *.o -lTest2, I get an error as follows
/usr/ccs/bin/ld: Cannot specify input file (libTest1.sl) that is the same as the output file.
So I did
CC -b +Z +DAportable -Wl,+vshlibunsats,-B,symbolic,+s -o libTest3.sl *.o -lTest2
and then moved libTest3.sl libTest1.sl.
Now if I do a lld -r on libTest1.sl and libTest2.sl, I find both libTest1 and libTest2 in both the libraries.
I am using aCC: HP ANSI C++ B3910B A.03.30 compiler.
Is it ok to design the libraries like this (which depend on each other)?
What is the correct way to build such libraries?
TIA
satya
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2004 11:56 PM
тАО07-02-2004 11:56 PM
Re: Builind interdependent dunamic libraries
Hai,
The above process is creating the libraries with same funtions. It is because,
libTest1.sl is created with all *.o files funtions. So lTest1 is ready to build with other applications.
libTest2.sl is created with same *.o funtions which linked in the libTest1.sl library.
In 3rd step,you are trying to rebuild the libTest1.so library with the libTest2.sl library which is linked using libTest1.sl.
libTest1.sl creations asks the linked functions of libTest2.sl and libTest2.sl calls the linked functions of libTest1.sl. So libTest1.sl modification needs it's previous update from libTest1.sl
To remove this,create the libTest2.sl without the libTest1.sl library. Now it will be created.
libTest3.sl creation as like libTest2.sl. And you are replacing libTest3.sl to the libTest1.sl. So no problem will come for that.
So two libraries contains the same libraries. check ldd or ldd -r command.
Regards,
Muthukumar.
The above process is creating the libraries with same funtions. It is because,
libTest1.sl is created with all *.o files funtions. So lTest1 is ready to build with other applications.
libTest2.sl is created with same *.o funtions which linked in the libTest1.sl library.
In 3rd step,you are trying to rebuild the libTest1.so library with the libTest2.sl library which is linked using libTest1.sl.
libTest1.sl creations asks the linked functions of libTest2.sl and libTest2.sl calls the linked functions of libTest1.sl. So libTest1.sl modification needs it's previous update from libTest1.sl
To remove this,create the libTest2.sl without the libTest1.sl library. Now it will be created.
libTest3.sl creation as like libTest2.sl. And you are replacing libTest3.sl to the libTest1.sl. So no problem will come for that.
So two libraries contains the same libraries. check ldd or ldd -r command.
Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2004 05:59 PM
тАО07-03-2004 05:59 PM
Re: Builind interdependent dunamic libraries
1. is it ok to have interdependent shared libraries (will they have runtime problems)?
it is fine to have such dependencies. we build /usr/lib/libdld.2 with a dependency on libc.2 which in turn needs libdld.2.
2. what is the right way to build them?
i guess the linker error is a mistake. this problem does not happen with the pa64 linker. we will fix ld32 for this. till then, the way you are building them is ok.
by the way, are you using CC or aCC? CC is obsolete and its usage is discouraged.
--
ranga (pa-risc linker/loader team)
--
ranga
[i work for hpe]
it is fine to have such dependencies. we build /usr/lib/libdld.2 with a dependency on libc.2 which in turn needs libdld.2.
2. what is the right way to build them?
i guess the linker error is a mistake. this problem does not happen with the pa64 linker. we will fix ld32 for this. till then, the way you are building them is ok.
by the way, are you using CC or aCC? CC is obsolete and its usage is discouraged.
--
ranga (pa-risc linker/loader team)
--
ranga
[i work for hpe]
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP