1748051 Members
5227 Online
108757 Solutions
New Discussion юеВ

unresolved external

 
Ryan Fox
New Member

unresolved external

I am trying to enable mod_authnz_ldap for apache 2.2.4. I've compiled it against openldap.

When I start apache with this module enabled, I get the error:
httpd: Syntax error on line 193 of /opt/apache2/conf/httpd.conf: Cannot load /opt/apache2/modules/util_ldap.so into server: Unresolved external

chatr just shows util_ldap.so linking with libc, so I'm not sure how to figure out why it's unhappy.

shared library list:
dynamic /usr/lib/libc.2

Any help is appreciated. Thanks!
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: unresolved external

>so I'm not sure how to figure out why it's unhappy.

It appears apache isn't very helpful. It should load the shlib again with verbose mode so you can see what errors you have.

>chatr just shows util_ldap.so linking with libc

That's the wrong command. You need to use ldd(1) on it. Then weed out the ones not in libc.

You can also use my show_remaining_imports in this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1115429
Ryan Fox
New Member

Re: unresolved external

Thanks for your help.

I have some output from ldd and show_remaining_imports, but I don't see anything wrong. Hopefully it means something more to you. :)

# ldd -r /opt/apache2/modules/util_ldap.so
/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: ap_rputs (/opt/apache2/modules/util_ldap.so)
symbol not found: util_ald_cache_display (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_thread_mutex_unlock (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_unbind_s (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_ldap_init (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_set_option (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_is_empty_array (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_ldap_set_option (/opt/apache2/modules/util_ldap.so)
symbol not found: ap_log_error (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_simple_bind_s (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_thread_mutex_lock (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_thread_mutex_trylock (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_palloc (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_thread_mutex_create (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pstrdup (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_array_copy_hdr (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pool_cleanup_null (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pool_cleanup_register (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_global_mutex_lock (/opt/apache2/modules/util_ldap.so)
symbol not found: util_ald_cache_fetch (/opt/apache2/modules/util_ldap.so)
symbol not found: util_ald_create_caches (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_global_mutex_unlock (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_search_ext_s (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_first_entry (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_get_dn (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_msgfree (/opt/apache2/modules/util_ldap.so)
symbol not found: util_ald_cache_insert (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_memfree (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_time_now (/opt/apache2/modules/util_ldap.so)
symbol not found: util_ald_cache_remove (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_compare_s (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_count_entries (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_get_values (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pstrcat (/opt/apache2/modules/util_ldap.so)
symbol not found: ldap_value_free (/opt/apache2/modules/util_ldap.so)
symbol not found: ap_check_cmd_context (/opt/apache2/modules/util_ldap.so)
symbol not found: ap_server_root_relative (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_psprintf (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_array_push (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_stat (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pool_create_ex (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_array_make (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_array_append (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_ldap_ssl_deinit (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pool_userdata_get (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_pool_userdata_set (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_file_remove (/opt/apache2/modules/util_ldap.so)
symbol not found: util_ldap_cache_init (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_global_mutex_create (/opt/apache2/modules/util_ldap.so)
symbol not found: unixd_set_global_mutex_perms (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_ldap_info (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_ldap_ssl_init (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_global_mutex_child_init (/opt/apache2/modules/util_ldap.so)
symbol not found: apr_dynamic_fn_register (/opt/apache2/modules/util_ldap.so)
symbol not found: ap_hook_post_config (/opt/apache2/modules/util_ldap.so)
symbol not found: ap_hook_handler (/opt/apache2/modules/util_ldap.so)
symbol not found: ap_hook_child_init (/opt/apache2/modules/util_ldap.so)
symbol not found: __dld_loc (/usr/lib/libdld.2)



# /tmp/show_remaining_imports /opt/apache2/modules/util_ldap.so
Unsat for _SYSTEM_ID
Data in /usr/lib/libc.2
Unsat for __dld_loc
Data in /usr/lib/libdld.2
Unsat for _end
Data in /usr/lib/libc.2
Unsat for ap_check_cmd_context
Code in /opt/apache2/modules/util_ldap.so
Unsat for ap_hook_child_init
Code in /opt/apache2/modules/util_ldap.so
Unsat for ap_hook_handler
Code in /opt/apache2/modules/util_ldap.so
Unsat for ap_hook_post_config
Code in /opt/apache2/modules/util_ldap.so
Unsat for ap_log_error
Code in /opt/apache2/modules/util_ldap.so
Unsat for ap_rputs
Code in /opt/apache2/modules/util_ldap.so
Unsat for ap_server_root_relative
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_array_append
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_array_copy_hdr
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_array_make
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_array_push
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_dynamic_fn_register
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_file_remove
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_global_mutex_child_init
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_global_mutex_create
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_global_mutex_lock
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_global_mutex_unlock
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_is_empty_array
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_ldap_info
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_ldap_init
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_ldap_set_option
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_ldap_ssl_deinit
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_ldap_ssl_init
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_palloc
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pool_cleanup_null
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pool_cleanup_register
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pool_create_ex
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pool_userdata_get
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pool_userdata_set
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_psprintf
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pstrcat
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_pstrdup
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_stat
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_thread_mutex_create
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_thread_mutex_lock
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_thread_mutex_trylock
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_thread_mutex_unlock
Code in /opt/apache2/modules/util_ldap.so
Unsat for apr_time_now
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_compare_s
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_count_entries
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_first_entry
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_get_dn
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_get_values
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_memfree
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_msgfree
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_search_ext_s
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_set_option
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_simple_bind_s
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_unbind_s
Code in /opt/apache2/modules/util_ldap.so
Unsat for ldap_value_free
Code in /opt/apache2/modules/util_ldap.so
Unsat for main
Code in /usr/lib/libc.2
Unsat for unixd_set_global_mutex_perms
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_display
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_fetch
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_insert
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_remove
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_create_caches
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ldap_cache_init
Code in /opt/apache2/modules/util_ldap.so
Dennis Handly
Acclaimed Contributor

Re: unresolved external

>I have some output from show_remaining_imports

You need to read the comments in the script. :-)
Basically you need to use:
/tmp/show_remaining_imports apache-executable \
/opt/apache2/modules/util_ldap.so

apache-executable should provide symbols and other shlibs to resolve most of those unsats.
Ryan Fox
New Member

Re: unresolved external

Thanks again.

If I run with just the apache executable and util_ldap.so, I get some unsats.

# /tmp/show_remaining_imports /opt/apache2/bin/httpd /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_display
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_fetch
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_insert
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_cache_remove
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ald_create_caches
Code in /opt/apache2/modules/util_ldap.so
Unsat for util_ldap_cache_init
Code in /opt/apache2/modules/util_ldap.so


But, if I include all the other ldap modules (which are set to load through httpd.conf), there are no unsats.

# /tmp/show_remaining_imports /opt/apache2/bin/httpd /opt/apache2/modules/util_ldap.so /opt/apache2/modules/util_ldap_cache.so /opt/apache2/modules/mod_authnz_ldap.so /opt/apache2/modules/util_ldap_cache_mgr.so
Dennis Handly
Acclaimed Contributor

Re: unresolved external

>if I include all the other ldap modules (which are set to load through httpd.conf), there are no unsats.

You may have to order these modules so that if the first depends on the second, you'll have problems?

You can use show_remaining_imports to see if there is a order that won't have problems.

It is probably better if you make one dummy shlib where it has your 4 shlibs as dependencies and just list that in httpd.conf.
Shinji Teragaito_1
Respected Contributor

Re: unresolved external

I have not enabled mod_authnz_ldap. Here's my configure line when building 2.2.9:

% cd /tmp/httpd-2.2.9
% env CC=cc CFLAGS="+O2 +DD64" \
LDFLAGS="-Wl,-E
-Wl,+b,/usr/local/apache2/lib:/usr/local/lib/hpux64 \
-L/usr/local/lib/hpux64 -L`pwd`/srclib/apr/.libs \
-L`pwd`/srclib/xml/expat/lib/.libs \
-L`pwd`/srclib/apr-util/.libs \
./configure --enable-so --with-mpm=worker --enable-mods-shared=all \
--prefix=/usr/local/apache2

'-Wl,+b,dir1:dir2:...' may solve your problem.