Help needed: dlyd problems starting Apache 1.3.19 with mod_php and 
mod_perl under OS X 10.0.3

I'm having some some difficulties with Apache 1.3.19 and various 
modules. Everything builds fine, but I get dyld multiple definition 
errors in some circumstances. I believe this is connected to dyld's 
insistence on freaking out with multiple definitions, but I'm not sure 
what the fix is. I've spent quite a long time on this, and am getting 
quite desparate. Any pointers would be helpful, preferably by email as 
well as to the list.

I'm used to using persistent database connections under mod_perl and 
Apache, via the Apache::DBI modules, and Tim Bunce's excellent DBD 
modules. This is a common production configuration for web sites, so I 
was keen to get it to run on Mac OS X.

I also like to build everything myself. So, I downloaded and installed 
Perl 5.6.1, Apache 1.3.19, mod_perl 1.25, mysql 3.23.36, the 
Msql-Mysql-modules 1.2216, DBI 1.15, Apache::DBI 0.88 and php 4.05.

After some fiddling, and with some help from Mac OS X Hints and Stepwise 
(Thanks especially to the macosx-perl mailing list, Scott Anguish at 
Stepwise, and Merlin Tishauser <[EMAIL PROTECTED]>), I got everything to 
build. I also got persistent database connections to a mysql database.

When I added mod_php to the build, via apxs, my apache build started 
dying on startup, with the following error message:

dyld: /usr/local/apache1.3.19/bin/httpd multiple definitions of symbol 
__dig_vec
/usr/local/apache1.3.19/libexec/libphp4.so definition of __dig_vec
/Library/Perl/site_perl/5.6.1/darwin/auto/DBD/mysql/mysql.bundle 
definition of __dig_vec
/usr/local/apache/bin/apachectl start: httpd could not be started

I tracked the error down to a startup script that I run via a 
PerlRequire directive (see the mod_perl docs), to open an initial 
database handle, and load various perl Modules. Commenting out the 
PerlRequire stopped the error, but when I requested my test_database.pl 
script (which runs a simple select on the database), from a mod_perl 
directory, the browser hung, and similar dyld errors appeared in the 
error log. Strangely, a copy of the script that I keep in in a non 
mod_perl cgi-bin directory runs with no problem. Within the script, the 
errors originate with the line "use DBD::MySQL", or at an open 
connection statement, which is effectively the same thing.

I think what is happening is that the __dig_vec symbol being loaded from 
the DBD::MySQL bundle is conflicting with the same symbol in mod_php. I 
looked in the Apache 1.3.19 source, and can see handlers for multiple 
definition in os/unix/os.c, but I guess that the DBD::MySQL module is 
being loaded by code in perl or mod_perl.

I guess my question is, is there an easy way to fix this conflict, or do 
perl and/or mod_perl need to be patched with similar dyld error handlers 
to the ones in Apache (see os/unix/os.c)?

My config info is as follows:

Perl:

     config_args='-ds -Dmksymlinks -Adefine:prefix=/usr/local 
-Dccflags=-g -pipe -Dfirstmakefile=GNUmakefile 
-Adefine:privlib=/Library/Perl/5.6.1 
-Adefine:sitelib=/Library/Perl/site_perl/5.6.1 
-Adefine:vendorlib=/Network/Library/Perl/5.6.1 
-Dman1dir=/usr/local/man/man1 -Dman3dir=/usr/local/man/man3 
-Uinstallusrbinperl'

Apache:

./configure \
"--prefix=/usr/local/apache1.3.19" \
"--with-layout=Apache" \
"--enable-module=all" \
"--enable-shared=max" \

mod_perl: built via apxs, with EVERYTHING=1

PHP (patched as advised by Merlin Tishauser):

./configure \
   --with-xml \
   --with-zlib \
   --with-apxs=/usr/local/apache/bin/apxs \
   --with-mysql=/usr/local/mysql \
   --disable-pear \
   --enable-track-vars \

==========================================================================
===

Reply via email to