Operating System - HP-UX
1834609 Members
2855 Online
110069 Solutions
New Discussion

Re: /usr/lib/dld.sl: Unresolved symbol: SSLeay (code)

 
devshlom
Regular Advisor

/usr/lib/dld.sl: Unresolved symbol: SSLeay (code)

Hi,

I created a shared lib via gcc.
I'm trying to create a simple C tester that openes that tries to access this lib directly via dlopen().
GCC cmd:
"gcc -o testcsdkdllopen_hpux -pthread testcsdkdllopen.c"
When I run the exe - the program crashes with the following:
"/usr/lib/dld.sl: Unresolved symbol: SSLeay (code) from ABORT instruction (core dumped)"

-------------
Env details:
-------------
gcc - gcc version 4.2.2
OS: HPUX11.23 PARisc
"file ./testcsdkdllopen_hpux" returns:
./testcsdkdllopen_hpux: PA-RISC2.0 shared executable dynamically linked -not stripped
"ldd ./testcsdkdllopen_hpux" returns:
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libpthread.1 =>/usr/lib/libpthread.1


what do you think?!

tx,
shlom



4 REPLIES 4
devshlom
Regular Advisor

Re: /usr/lib/dld.sl: Unresolved symbol: SSLeay (code)

By the way,

My question regarded to C tester...
BUT the same error occurs when I compile run the same tester with c++ (cpp)
devshlom
Regular Advisor

Re: /usr/lib/dld.sl: Unresolved symbol: SSLeay (code)

more important info:

some of my libs (that were linked in the sl) require "openssl"
I didn't add the "-fpic" to the openssl compilation, since the sl was linked with no errors.
Could it be the reason for that?
devshlom
Regular Advisor

Re: /usr/lib/dld.sl: Unresolved symbol: SSLeay (code)

I managed to find the solution on my own.
The solution it to re-compiled also openssl with the "shared" option.
This created new "libcrypto.a" that you will have to re-link with the lib that needs it.

After doing all of this, re-create your shared lib, re-create your tester and everything work as it should.

Shlom
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/dld.sl: Unresolved symbol: SSLeay (code)

>The solution it to re-compiled also openssl with the "shared" option.
>This created new "libcrypto.a" that you will have to re-link with the lib that needs it.

Actually, you should just create libcrypto.sl so you can use it without including it in every load module.

>re-create your tester

You could also "include" all of libcrypto.a into your executable and link with -Wl,-E.