- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: g++ - static => shl_load unsatisfied symbols
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-13-2009 05:07 AM
тАО07-13-2009 05:07 AM
g++ - static => shl_load unsatisfied symbols
i hava a problem.
i try to compile a programm with "-static" and then the linker come back with this error:
/usr/css/bin/ld: unsatisfied symbols
shl_load (first referenced in /usr/lib/libc.a(setlocale.o))
/usr/css/bin/ld: unsatisfied symbols
shl_unload (first referenced in /usr/lib/libc.a(setlocale.o))
/usr/css/bin/ld: unsatisfied symbols
shl_findsym (first referenced in /usr/lib/libc.a(setlocale.o))
HP-UX B 11.11
g++ 3.2
Libraries:
Xm, xerces-c Xt X11 Xp Xext phtread
Greetings
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2009 06:09 PM
тАО07-13-2009 06:09 PM
Re: g++ - static => shl_load unsatisfied symbols
In order to use setlocale(3) and a bunch of networking functions, you must link with -l:libdld.sl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2009 09:10 PM
тАО07-13-2009 09:10 PM
Re: g++ - static => shl_load unsatisfied symbols
i want some application which is fully linked static.
Background is, we produce on a HPUX PA-Risc and linked it fully static for an itanium Intel 64Bit.
Also we need all libs static :-(
Is there any way to do this?
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 12:42 AM
тАО07-14-2009 12:42 AM
Re: g++ - static => shl_load unsatisfied symbols
> Also we need all libs static :-(
I think that could become difficult to get all required libraries as static ones.
As Dennis mentioned, some libraries should/must be shared because they a very specific for the system the run on (e.g. libnss). By the way, it is a bad idea to build a completely statically linked application (you may find some of these arguments useful: http://people.redhat.com/drepper/no_static_linking.html).
If you build your application on a PA-RISC system, you must have already set up your build environments with static/shared libraries and include header files for Itanium systems? Why don't you then just use the shared libraries? Probably the --sysroot option is useful for your case?
Best regards,
Andi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:06 AM
тАО07-14-2009 01:06 AM
Re: g++ - static => shl_load unsatisfied symbols
On IPF you can't do that since only libc.so is provided.
>we produce on a HP-UX PA-RISC and linked it fully static for Integrity.
You said you have done this before or it is failing now?
>Also we need all libs static :-(
You can only do this on PA and if you do, you must stub out setlocale and anything else that calls dlopen/shl_load. Or you must use static libs for all of your contributions but leave system libs as shlibs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:21 AM
тАО07-14-2009 01:21 AM
Re: g++ - static => shl_load unsatisfied symbols
mmhh i don't now exactly if we need the itanium libs. Our point is we use the compatibility mode from the Itanium to run the APP, so we don't need the Itanium lib(?).
therefore i think we need the HPUX libs as static?
sorry for my english.
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:28 AM
тАО07-14-2009 01:28 AM
Re: g++ - static => shl_load unsatisfied symbols
>On IPF you can't do that since only libc.so >is provided.
it means that on the IPF the libc.so is provided and we don't link it static?
and the dld?
>You said you have done this before or it is >failing now?
now, is a new project.
>You can only do this on PA and if you do, >you must stub out setlocale and anything >else that calls dlopen/shl_load. Or you >must use static libs for all of your >contributions but leave system libs as >shlibs.
ok i try this, but i don't find the flag for this option by gcc :-(
which flag is it?
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:30 AM
тАО07-14-2009 01:30 AM
Re: g++ - static => shl_load unsatisfied symbols
No, it means you need to copy your non-system PA shlibs to your IPF box.
Or you link your non-system libs as archive and the rest shared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:33 AM
тАО07-14-2009 01:33 AM
Re: g++ - static => shl_load unsatisfied symbols
There isn't any for a foreign devil compiler. If you were using aC++, you would just use +A.
So you have to invent your own stubs.
- Tags:
- foreign devil tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:33 AM
тАО07-14-2009 01:33 AM
Re: g++ - static => shl_load unsatisfied symbols
okay, sorry, then I just misunderstood you. I thought you were doing some cross-compiling on PA ...
You could check this page (http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=0208713ba4f02110713ba4f02110275d6e10RCRD) about ARIES ... I think you don't need the application to be linked statically to use ARIES.
See the example below
PA-RISC build:
hs0040:c5122564> uname -a
HP-UX hs0040 B.11.11 U 9000/800 151414671 unlimited-user license
hs0040> /opt/aCC/bin/aCC -Ae test.c -o test
hs0040> ./test
PA-RISC
hs0040> /usr/ccs/bin/ldd test
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
hs0040> file /usr/lib/libc.2
/usr/lib/libc.2: PA-RISC2.0 shared library -not stripped
Itanium run:
hs0138> ./test
PA-RISC