On Mon, Mar 17, 2003 at 07:19:22PM +1100, Stas Bekman wrote:
I'm painfully trying to figure out how to resolve all the dependencies of mod_perl 2.0 on aix. Currently I'm stuck at startup time:
Can't load '/build/mod_perl/modperl-2.0/blib/arch/Apache2/auto/Apache/RequestUtil/RequestUtil.so' for module Apache::RequestUtil: 0509-130 Symbol resolution failed for /usr/local/apache2/lib/libaprutil.so because:
0509-136 Symbol _GLOBAL__FI_libexpat_so (number 108) is not exported from
dependent module /usr/local/apache2/lib/libexpat.a(libexpat.so.0).
0509-136 Symbol _GLOBAL__FD_libexpat_so (number 109) is not exported from
dependent module /usr/local/apache2/lib/libexpat.a(libexpat.so.0).
0509-192 Examine .loader section symbols with the
'dump -Tv' command. at /usr/local/lib/perl5/5.8.0/aix-thread-multi/DynaLoader.pm line 229.
....
I haven't worked with aix till a week ago, so I'm learning ropes. All this import/export symbols seems too weird to me, but I'm getting there.
I'd hoped the resident AIX expert would have answered with an easy "do
this" but he must be distracted :)
I have no clue about this particular error, but one thing I'd try would be to fix the Makefiles so that libaprutil.so and libapr.so are linked against the libraries they are dependent on. e.g. for apr-util, change the libtool --mode=link lines and add -lexpat on the end.
Can you run and link a simple application which links against libaprutil.so?
I think I've solved the problem by not importing apr/ap symbols during the linking, but instead of using -berok which will ignore unresolved symbols. Then things get resolved at run time.
However it seems that apr-util coming with 2.0.44 doesn't export apr_generate_random_bytes (I see that fixed in the current apr-util), so I have to import that symbol alone. If I import any other symbols I get weird segfaults. Go figure.
Any ideas why that causes a problem? Looking at the core traces, I can't see any relationships between duplicated import symbols and the segfault. But it seems to be the cause: if a library exports symbols and then I import them again and link against that library things seem to go wrong.
It's also weird that many times dlopen fails, but dlerror doesn't report anything at all.
Other relevant questions might be: are you on AIX >= 4.3? Are all these libraries getting linked with -brtl? Are you using a native CC or gcc?
5.1, CC=cc_r, -brtl.
Looks like I've figured how to get mod_perl 2.0 linked with apr/apr-util work now, as long as I manually import only the symbols that were missed out in export list by apr/apr-util (in older releases :(
Thanks Joe.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com