- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Error loading shared library from Java application
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
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
тАО05-28-2008 05:13 AM
тАО05-28-2008 05:13 AM
aCC runtime: Use of "-mt" must be consistent during both compilation and linking.
Even though aCC is installed on the machine I do not understand why its runtime libraries are used. Do I need to deinstall the native compiler again? gcc (version 4.2.3) was installed after aCC.
Is there any g++/gcc option I am missing here? I am only using -fPIC and -shared for the linker step.
Thanks in advance!
Marc
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 08:22 AM
тАО05-28-2008 08:22 AM
Re: Error loading shared library from Java application
See:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1211991662054+28353475&threadId=1123742
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 08:43 AM
тАО05-28-2008 08:43 AM
Re: Error loading shared library from Java application
Here is the output of the ldd command on the .so that is loaded from the Java side:
libstdc++.so => /usr/local/lib/libstdc++.so
libunwind.so.1 => /usr/lib/hpux32/libunwind.so.1
libm.so.1 => /usr/lib/hpux32/libm.so.1
libc.so.1 => /usr/lib/hpux32/libc.so.1
libstdc++.so => /usr/local/lib/gcc/ia64-hp-hpux11.31/4.2.3/../../../libstdc++.so
libm.so.1 => /usr/lib/hpux32/libm.so.1
libc.so.1 => /usr/lib/hpux32/libc.so.1
libuca.so.1 => /usr/lib/hpux32/libuca.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
Any help is highly appreciated!
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 09:12 AM
тАО05-28-2008 09:12 AM
Re: Error loading shared library from Java application
Since Java is compiled with aC++, you will not be able to have a JNI compiled with g++, just gcc.
What OS version and what type of hardware do you have? Do you get a core file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 09:17 AM
тАО05-28-2008 09:17 AM
Re: Error loading shared library from Java application
So you are saying I cannot link any modules that were generated with g++ because the JVM libraries were (at least partially) compiled with aCC ? That's bad since most of our code is written in C++, not C. So that actually means I need to use aCC/cc to create the .so files in order to load them from Java using System.loadLibrary(). I will then try to do the port using the native compiler, then.
Thanks for your help!
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 09:37 AM
тАО05-28-2008 09:37 AM
SolutionYes though I've never seen that error symptom before.
>So that actually means I need to use aCC/cc to create the .so files in order to load them from Java using System.loadLibrary().
Yes.