1831919 Members
3396 Online
110031 Solutions
New Discussion

Re: symbol not found

 
SOLVED
Go to solution
Jeff Fulmer_1
Occasional Advisor

symbol not found

I'm having an issue with mod_ssl.so on apache 2.0.59. It is uable to resolve the following symbols:

symbol not found: _SYSTEM_ID (/usr/lib/libc.2)
symbol not found: _end (/usr/lib/libc.2)
symbol not found: __dld_loc (/usr/lib/libdld.2)

I can find the first two:
$ nm /usr/lib/libc.2 | grep SYS
U _SYSTEM_ID
lccas243$
$ nm /usr/lib/libc.2 | grep _end
U _end

But I can't locate the third:
$ nm /usr/lib/libc.2 | grep dld_
(not found)

Any insight?
10 REPLIES 10
Matti_Kurkela
Honored Contributor

Re: symbol not found

The HP-packaged Apache from software.hp.com has some patch requirements for Apache versions 2.0.58 and above.

As Apache 2.0.59 seems to be not yet available from software.hp.com, I'm guessing you're compiling it yourself or getting it from some other site. These patches might be required by your version of Apache too.

From the product detail page of HP Apache-based Web Server 2.17: http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSATW217
-------------------------------------------
Starting with HP-UX Apache 2.0.58.00, there may be problems starting Apache. Apache may hang when attempting to start it. This is because of the changes made in the way modules get loaded dynamically. The solution for this is to install the following patches. These patches also need to be installed if the LoadFile directives are used.
For 11iv1:

* PHSS_33037 - ld(1) and linker tools cumulative patch
* PHSS_33944 - s700_800 11.11 HP aC++ -AA runtime libraries (aCC A.03.61)

For 11.00:

* PHSS_33036 s700_800 11.00 ld(1) and linker tools cumulative patch
* PHSS_33943 s700_800 11.X HP aC++ -AA runtime libraries (aCC A.03.61)

For 11iv2: No patches are required
--------------------------------------------

MK
MK
Dennis Handly
Acclaimed Contributor

Re: symbol not found

The above 3 symbols are only found in the executable. What program printed those messages?

This type of error can only occurs if you illegally linked with an archive libc and a shared one.
Jeff Fulmer_1
Occasional Advisor

Re: symbol not found

Matti,

Thanks for your reply. The patches you mentioned were already present when this problem appeared.

I need to correct my original post. __dld_loc is present in libdld.2 In the post above you can see I was checking the wrong library....
Jeff Fulmer_1
Occasional Advisor

Re: symbol not found

Dennis,

This message:
symbol not found: _SYSTEM_ID (/usr/lib/libc.2)
symbol not found: _end (/usr/lib/libc.2)
symbol not found: __dld_loc (/usr/lib/libdld.2)

Was the output of ldd -bd mod_ssl.so

I was able to find each of those symbols in the appropriate library with nm.

How can I tell if I illegally linked it to an archived version of libc? And how do I prevent that?


Jeff Fulmer_1
Occasional Advisor

Re: symbol not found

This problem is not limited to apache. Here's the output of ldd libz.sl which was compiled with gcc:

ldd -bd libz.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
symbol not found: _SYSTEM_ID (/usr/lib/libc.2)
symbol not found: _end (/usr/lib/libc.2)
symbol not found: __dld_loc (/usr/lib/libdld.2)

Dennis Handly
Acclaimed Contributor
Solution

Re: symbol not found

>__dld_loc is present in libdld.2

You are confused. The "U" means is an Unsat in that lib and not defined. You need to be looking for a T, B or D. As I said it is only defined in an executable.
$ odump -slexport /usr/bin/ksh | fgrep __dld_loc
000000006 -00000001 -0001 0x4000440c Stor 0x00000004 00 __dld_loc

>Was the output of ldd -bd mod_ssl.so

You should NOT be using ldd -d on shlibs. It gives you this type of bogus info.

>I was able to find each of those symbols in the appropriate library with nm.

(These are not the droids you want. ;-)

nm is the wrong command to look at shlibs.
The proper command is "odump -slexport". And -slimport for unsats.

What is your real problem?
Jeff Fulmer_1
Occasional Advisor

Re: symbol not found

Dennis,

My *real* problem is apache doesn't load mod_ssl. It dies with this error:

$ sudo bin/apachectl start
Syntax error on line 5 of /usr/local/httpd/conf/extra/ssl.conf:
Cannot load /usr/local/httpd/modules/mod_ssl.so into server: Unresolved external

So I ran ldd on the modules and found the following unresolved symbols:

symbol not found: _SYSTEM_ID (/usr/lib/libc.2)
symbol not found: _end (/usr/lib/libc.2)
symbol not found: __dld_loc (/usr/lib/libdld.2)

Interestingly, I downloaded HP's apache and and ran ldd on some of the modules they supplied and I found the same unresolved symbols.

Am I barking up the wrong tree?
Dennis Handly
Acclaimed Contributor

Re: symbol not found

>My *real* problem is apache doesn't load mod_ssl. It dies with this error:
Cannot load /usr/local/httpd/modules/mod_ssl.so into server: Unresolved external

Unfortunately it doesn't mention the symbol. :-(

>Am I barking up the wrong tree?

Well yes. :-)
A better tool is show_remaining_imports that you can find on one of my replies to this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1115429

You just provide the name of the executable and the module you are trying to load.
Jeff Fulmer_1
Occasional Advisor

Re: symbol not found

Dennis,

Here's the output. I'm not sure what this is telling me:

sudo show_remaining_imports bin/httpd modules/mod_ssl.so
Unsat for BIO_clear_flags
Code in modules/mod_ssl.so
Unsat for BIO_get_callback_arg
Code in modules/mod_ssl.so
Unsat for BIO_set_callback
Code in modules/mod_ssl.so
Unsat for BIO_set_callback_arg
Code in modules/mod_ssl.so
Unsat for BIO_set_flags
Code in modules/mod_ssl.so
Unsat for SSL_CTX_sess_set_get_cb
Code in modules/mod_ssl.so
Unsat for SSL_CTX_sess_set_new_cb
Code in modules/mod_ssl.so
Unsat for SSL_CTX_sess_set_remove_cb
Code in modules/mod_ssl.so
Unsat for SSL_CTX_set_client_cert_cb
Code in modules/mod_ssl.so
Unsat for SSL_CTX_set_info_callback
Code in modules/mod_ssl.so

Dennis Handly
Acclaimed Contributor

Re: symbol not found

>I'm not sure what this is telling me:

Either these are the unsats, or you need to add another shlib on the command line. I would have expected ldd to also print these?
(You probably don't need sudo to execute it.)

sudo show_remaining_imports bin/httpd modules/mod_ssl.so
Unsat for BIO_clear_flags
Code in modules/mod_ssl.so
Unsat for BIO_get_callback_arg
Unsat for BIO_set_callback
Unsat for BIO_set_callback_arg
Unsat for BIO_set_flags
Unsat for SSL_CTX_sess_set_get_cb
Unsat for SSL_CTX_sess_set_new_cb
Unsat for SSL_CTX_sess_set_remove_cb
Unsat for SSL_CTX_set_client_cert_cb
Unsat for SSL_CTX_set_info_callback

So you need to search for a shlib that defines these functions:
odump -slexport lib* | grep -e BIO_ -e SSL_CTX

I suppose you could also search the executable and if it wasn't built correctly it would have this problem. (-Wl,-E)

nm -px bin/httpd | grep -e BIO_ -e SSL_CTX