03-28-2006
Can't dlopen() a library containing Thread Local Storage
Hi,
I have a small test c program which tries to dlopen a shared library(libjvm.sl).
But i get error as "Can't dlopen() a library containing Thread Local Storage"
My program is as below
Quote:
#include <stdio.h>
#include <errno.h>
#include <dlfcn.h>
void main(void)
{
void *handle;
handle = dlopen("/opt/weblogic810sp3/jdk142_03/jre/lib/PA_RISC/server/libjvm.sl", RTLD_LAZY);
if( handle == NULL )
{
printf("errno[%d], errmsg[%s]\n", errno, dlerror());
return;
}
else
{
printf("\nJVM loaded successfully");
}
dlclose(handle);
}
when i run the program i get error
Quote:
$ testjvm
errno[0], errmsg[Can't dlopen() a library containing Thread Local Storage: /opt/weblogic810sp3/jdk142_03/jre/lib/PA_RISC/server/libjvm.sl]
$
any pointers why the error??
I am using hp-ux . The same program run well on solaris.
thanks in advance.
-Ashish
9 More Discussions You Might Find Interesting
1. Programming
hi all,
can anyone tell me some good site for the mutithreading tutorials, its application, and some code examples.
-sushil (2 Replies)
Discussion started by: shushilmore
2 Replies
2. Programming
Is there anybody has documents about NPTL
I wanna study about it , but can't find the documents....
anyone help appreciate
:) :) :) (1 Reply)
Discussion started by: alan.zhao
1 Replies
3. Programming
What I'm given:
Pure C code in one file that has to compile on Windows, SunOS, and AIX. My task is making minimal changes to the code to make it thread safe. I'm not in control of threads - they are created elsewhere. The code has a function invoked externally. The first call to this function is... (1 Reply)
Discussion started by: vkleban
1 Replies
4. Shell Programming and Scripting
Hello,
I've been searching your forum for an answer to the following question and whilst I've seen several which may help I'm afraid my inexperience with UNIX systems has got the better of me and I'm incapable of piecing your considerable expertise together.
Problem:
I have a linux box which... (5 Replies)
Discussion started by: julezsht
5 Replies
5. Programming
Hi,
I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum.
In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Discussion started by: shade82
5 Replies
6. Programming
I am attempting to port a program from OS X to Linux. It's C++ & Qt Creator and I did the original Windows to OS X port, so I tried to make it as POSIX-compliant as possible; the OS X port works well, and the Linux port builds and starts (it's on Ubuntu 9.10) but has some issues running.
The... (2 Replies)
Discussion started by: Hodapp87
2 Replies
7. Programming
As I know threads share the memory. But, what about the local variables in the thread function? if i call multiple threads would they allocate seperate local variables for themselves?
like
thread_func()
{
int i, j;
string...
}
Are the above local variables defined for each of... (1 Reply)
Discussion started by: saman_glorious
1 Replies
8. Solaris
Hello.
I have a solaris box with several local disks and several come from SYMMETRIX storage. Is there any way to tell format (or other util) to show only local disks? (6 Replies)
Discussion started by: urello
6 Replies
9. Solaris
I am newbies in solaris, hope u guys can help me,
I need to transfer /export/home directory that currently mount at storage and migrate into local disk. may i know the best way to do it?
Thanks (6 Replies)
Discussion started by: Deeo
6 Replies
LEARN ABOUT ULTRIX
dlerror
DLERROR(3) Linux Programmer's Manual DLERROR(3)
NAME
dlerror - obtain error diagnostic for functions in the dlopen API
SYNOPSIS
#include <dlfcn.h>
char *dlerror(void);
Link with -ldl.
DESCRIPTION
The dlerror() function returns a human-readable, null-terminated string describing the most recent error that occurred from a call to one
of the functions in the dlopen API since the last call to dlerror(). The returned string does not include a trailing newline.
dlerror() returns NULL if no errors have occurred since initialization or since it was last called.
VERSIONS
dlerror() is present in glibc 2.0 and later.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------+---------------+---------+
|Interface | Attribute | Value |
+----------+---------------+---------+
|dlerror() | Thread safety | MT-Safe |
+----------+---------------+---------+
CONFORMING TO
POSIX.1-2001.
NOTES
The message returned by dlerror() may reside in a statically allocated buffer that is overwritten by subsequent dlerror() calls.
History
This function is part of the dlopen API, derived from SunOS.
EXAMPLE
See dlopen(3).
SEE ALSO
dladdr(3), dlinfo(3), dlopen(3), dlsym(3)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 DLERROR(3)