You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Whitson <st...@gmail.com> on 2010/09/01 17:27:20 UTC

[users@httpd] Can't load driver file apr_dbd_mysql.so

  Hi,

I have a freshly built apache server v2.2.16 (exact same error on a 
fresh 2.2.10 too).  When I add the config directive
     DBDriver mysql

I get the following error:
     Can't load driver file apr_dbd_mysql.so

The driver file built ok using the configure directives
      --with-mysql=/usr/local --with-included-apr

Here they are:
./lib/apr-util-1/apr_dbd_mysql-1.so
./lib/apr-util-1/apr_dbd_mysql.so -> apr_dbd_mysql-1.so
./lib/apr-util-1/apr_dbd_mysql.la
./lib/apr-util-1/apr_dbd_mysql.a

I have a couple servers I built a couple years ago which are working 
just fine (2.2.9 & 2.2.10), one on this same sparc system and one on a 
x86 solaris system (both loading this same apr_dbd_mysql driver).  I 
just needed to rebuild this one to support some new features (ssl to 
name one).

Any ideas?  Any help would be greatly appreciated.

This is on a solaris 10 sparc system.

Thanks much,
     -Steve

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Steve Whitson <st...@gmail.com>.
  This worked!  It built using my 5.0.67 version of mysql.

After that I installed the 2.2.16 build, added the 5.0.67 mysql lib 
folder to the LD_LIBRARY_PATH in envvars and all was well! :)

The configuration entry 'DBDriver mysql' now loads apr_dbd_mysql.so  yea!

Nick I appreciate your inputs!
     -Steve

On 9/2/2010 9:02 AM, Steve Whitson wrote:
> I modified the mysql_config to replace "-xarch=v8" with "-mcpu=v8"
>     based on: http://www.zabbix.com/forum/showthread.php?t=13151
>     and http://forums.mysql.com/read.php?51,7767,183553#msg-183553
>
> That seems to allow it to configure at least recognize that it has a 
> usable mysql :)
>
> Thanks!  I'll post what I find once the build finished (now using 
> 2.2.16, and 5.0.67).
>     -Steve
>
>
> On 9/2/2010 8:46 AM, Nick Kew wrote:
>> On Thu, 02 Sep 2010 07:04:01 -0500
>> Steve Whitson<st...@gmail.com>  wrote:
>>
>>> configure:27065: gcc -o conftest -g -O2  -DSOLARIS2=10
>>> -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
>>> -I/usr/local/mysql/include -xarch=v8  -L/usr/local/mysql/lib
>>>   -lmysqlclient_r -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl
>>> -lm  -lpthread -lthread conftest.c -lmysqlclient_r  -lrt  -xarch=v8
>>> -L/usr/local/mysql/lib -lmysqlclient_r
>>> -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl -lm>&5
>>> gcc: language arch=v8 not recognized
>>> ld: fatal: file conftest.c: unknown file type
>> Where does that configure come from?  -xarch=v8 looks like an
>> option for Sun CC, but breaks gcc.  As a workaround, remove it
>> (if nothing else breaks, for the same reason).  Or use Sun CC.
>>
>


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Steve Whitson <st...@gmail.com>.
  I modified the mysql_config to replace "-xarch=v8" with "-mcpu=v8"
     based on: http://www.zabbix.com/forum/showthread.php?t=13151
     and http://forums.mysql.com/read.php?51,7767,183553#msg-183553

That seems to allow it to configure at least recognize that it has a 
usable mysql :)

Thanks!  I'll post what I find once the build finished (now using 
2.2.16, and 5.0.67).
     -Steve


On 9/2/2010 8:46 AM, Nick Kew wrote:
> On Thu, 02 Sep 2010 07:04:01 -0500
> Steve Whitson<st...@gmail.com>  wrote:
>
>> configure:27065: gcc -o conftest -g -O2  -DSOLARIS2=10
>> -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
>> -I/usr/local/mysql/include -xarch=v8  -L/usr/local/mysql/lib
>>   -lmysqlclient_r -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl
>> -lm  -lpthread -lthread conftest.c -lmysqlclient_r  -lrt  -xarch=v8
>> -L/usr/local/mysql/lib -lmysqlclient_r
>> -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl -lm>&5
>> gcc: language arch=v8 not recognized
>> ld: fatal: file conftest.c: unknown file type
> Where does that configure come from?  -xarch=v8 looks like an
> option for Sun CC, but breaks gcc.  As a workaround, remove it
> (if nothing else breaks, for the same reason).  Or use Sun CC.
>


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 02 Sep 2010 07:04:01 -0500
Steve Whitson <st...@gmail.com> wrote:

> configure:27065: gcc -o conftest -g -O2  -DSOLARIS2=10
> -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
> -I/usr/local/mysql/include -xarch=v8  -L/usr/local/mysql/lib
>  -lmysqlclient_r -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl
> -lm  -lpthread -lthread conftest.c -lmysqlclient_r  -lrt  -xarch=v8
> -L/usr/local/mysql/lib -lmysqlclient_r
> -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl -lm >&5
> gcc: language arch=v8 not recognized
> ld: fatal: file conftest.c: unknown file type

Where does that configure come from?  -xarch=v8 looks like an
option for Sun CC, but breaks gcc.  As a workaround, remove it
(if nothing else breaks, for the same reason).  Or use Sun CC.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Steve Whitson <st...@gmail.com>.
 Here's the error in the config log for 2.2.10 built against prebuilt
mysql 5.0.67

configure:39653: checking for mysql_init in -lmysqlclient_r
configure:39688: gcc -o conftest -g -O2  -DSOLARIS2=10
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
-I/usr/local/mysql/include -xarch=v8  -L/usr/local/mysql/lib
-lmysqlclient_r -l
z -lpthread -lthread -lposix4 -lgen -lsocket -lnsl -lm  -lpthread
-lthread conftest.c -lmysqlclient_r  -lrt  -xarch=v8
-L/usr/local/mysql/lib -lmysqlclient_r -lz -lpthread -lthread -lposix4 -lgen
-lsocket -lnsl -lm >&5
gcc: language arch=v8 not recognized
ld: fatal: file conftest.c: unknown file type
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status

I believe this is why it is setting apu_have_mysql='0'.

Thanks,
    -Steve


On 9/2/2010 7:04 AM, Steve Whitson wrote:
>  In the config.log for apr-util I see an error when I use the (from
> mysql community) prebuilt 5.0.67 version of mysql & when I use the
> prebuild latest version of 5.1.x of mysql.
>
> Here's an example (not sure which of the two I was building against with
> this error, since I went back to trying builds of 2.2.9 & 2.2.10)...
>
> configure:27065: gcc -o conftest -g -O2  -DSOLARIS2=10
> -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
> -I/usr/local/mysql/include -xarch=v8  -L/usr/local/mysql/lib
>  -lmysqlclient_r -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl
> -lm  -lpthread -lthread conftest.c -lmysqlclient_r  -lrt  -xarch=v8
> -L/usr/local/mysql/lib -lmysqlclient_r
> -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl -lm >&5
> gcc: language arch=v8 not recognized
> ld: fatal: file conftest.c: unknown file type
>
> It results in setting
>     apu_have_mysql='0'
>
> and therefore doesn't build the mysql drivers.
>
> I may result in building my own mysql to see if that helps... unless you
> have any ideas...
>
> Thanks much,
>     -Steve
>
> On 9/1/2010 7:44 PM, Nick Kew wrote:
>> On 1 Sep 2010, at 23:03, Steve Whitson wrote:
>>
>>> I did notice that this version of mysql is 4.0.  I want to be using 5.0 but the libmysqlclient_r library isn't available in this installation.  As I had mentioned, I do have an apache 2.2.9 working using the mysql 4.0 version client.
>> Is it possible you may have built against a different version to what you're
>> trying to run with?  APR shouldn't work with any MySQL older than 4.1!
>>
>>> Anyway, I'm downloading a 5.0 version of mysql to see if it will work.  Apparently 5.1 isn't known, since in the config.log for apr_util (I'm sticking to just building this piece util I get it right) it had problems.
>> You've lost me there!
>>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Steve Whitson <st...@gmail.com>.
 In the config.log for apr-util I see an error when I use the (from
mysql community) prebuilt 5.0.67 version of mysql & when I use the
prebuild latest version of 5.1.x of mysql.

Here's an example (not sure which of the two I was building against with
this error, since I went back to trying builds of 2.2.9 & 2.2.10)...

configure:27065: gcc -o conftest -g -O2  -DSOLARIS2=10
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
-I/usr/local/mysql/include -xarch=v8  -L/usr/local/mysql/lib
 -lmysqlclient_r -lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl
-lm  -lpthread -lthread conftest.c -lmysqlclient_r  -lrt  -xarch=v8
-L/usr/local/mysql/lib -lmysqlclient_r
-lz -lpthread -lthread -lposix4 -lgen -lsocket -lnsl -lm >&5
gcc: language arch=v8 not recognized
ld: fatal: file conftest.c: unknown file type

It results in setting
    apu_have_mysql='0'

and therefore doesn't build the mysql drivers.

I may result in building my own mysql to see if that helps... unless you
have any ideas...

Thanks much,
    -Steve

On 9/1/2010 7:44 PM, Nick Kew wrote:
> On 1 Sep 2010, at 23:03, Steve Whitson wrote:
>
>> I did notice that this version of mysql is 4.0.  I want to be using 5.0 but the libmysqlclient_r library isn't available in this installation.  As I had mentioned, I do have an apache 2.2.9 working using the mysql 4.0 version client.
> Is it possible you may have built against a different version to what you're
> trying to run with?  APR shouldn't work with any MySQL older than 4.1!
>
>> Anyway, I'm downloading a 5.0 version of mysql to see if it will work.  Apparently 5.1 isn't known, since in the config.log for apr_util (I'm sticking to just building this piece util I get it right) it had problems.
> You've lost me there!
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Nick Kew <ni...@webthing.com>.
On 1 Sep 2010, at 23:03, Steve Whitson wrote:

> I did notice that this version of mysql is 4.0.  I want to be using 5.0 but the libmysqlclient_r library isn't available in this installation.  As I had mentioned, I do have an apache 2.2.9 working using the mysql 4.0 version client.

Is it possible you may have built against a different version to what you're
trying to run with?  APR shouldn't work with any MySQL older than 4.1!

> Anyway, I'm downloading a 5.0 version of mysql to see if it will work.  Apparently 5.1 isn't known, since in the config.log for apr_util (I'm sticking to just building this piece util I get it right) it had problems.

You've lost me there!

-- 
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Steve Whitson <st...@gmail.com>.
  Still no luck... I added the path /usr/sfw/lib to the envvars 
LD_LIBRARY_PATH, I had also tried adding to my path before launching.

I did notice that this version of mysql is 4.0.  I want to be using 5.0 
but the libmysqlclient_r library isn't available in this installation.  
As I had mentioned, I do have an apache 2.2.9 working using the mysql 
4.0 version client.

Anyway, I'm downloading a 5.0 version of mysql to see if it will work.  
Apparently 5.1 isn't known, since in the config.log for apr_util (I'm 
sticking to just building this piece util I get it right) it had problems.

Thanks much,
     -Steve


On 9/1/2010 4:04 PM, Nick Kew wrote:
> On Wed, 01 Sep 2010 14:57:37 -0500
> Steve Whitson<st...@gmail.com>  wrote:
>
>>    ldd informs me that libmysqlclient is linked in at the following path:
>>       /usr/sfw/lib/libmysqlclient_r.so.12
>>
>> I've never tried loading the library explicitly,  I see what that
>> does.... odd that the 'working' apache installation has the same module
>> with the same dependencies (libmysqlclient) and works.
> It could be that your apache installation doesn't know about /usr/sfw.
> If so, adding /usr/sfw/lib to LD_LIBRARY_PATH in apache's bin/envvars
> may be the fix you want (though explicit loading should also work).
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 01 Sep 2010 14:57:37 -0500
Steve Whitson <st...@gmail.com> wrote:

>   ldd informs me that libmysqlclient is linked in at the following path:
>      /usr/sfw/lib/libmysqlclient_r.so.12
> 
> I've never tried loading the library explicitly,  I see what that 
> does.... odd that the 'working' apache installation has the same module 
> with the same dependencies (libmysqlclient) and works.

It could be that your apache installation doesn't know about /usr/sfw.
If so, adding /usr/sfw/lib to LD_LIBRARY_PATH in apache's bin/envvars
may be the fix you want (though explicit loading should also work).

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Steve Whitson <st...@gmail.com>.
  ldd informs me that libmysqlclient is linked in at the following path:
     /usr/sfw/lib/libmysqlclient_r.so.12

I've never tried loading the library explicitly,  I see what that 
does.... odd that the 'working' apache installation has the same module 
with the same dependencies (libmysqlclient) and works.

Thanks much for your reply!
     -Steve

On 9/1/2010 2:19 PM, Nick Kew wrote:
> On Wed, 01 Sep 2010 10:27:20 -0500
> Steve Whitson<st...@gmail.com>  wrote:
>
>> I get the following error:
>>       Can't load driver file apr_dbd_mysql.so
>>
>> The driver file built ok using the configure directives
>>        --with-mysql=/usr/local --with-included-apr
>>
>> Here they are:
>> ./lib/apr-util-1/apr_dbd_mysql-1.so
>> ./lib/apr-util-1/apr_dbd_mysql.so ->  apr_dbd_mysql-1.so
>> ./lib/apr-util-1/apr_dbd_mysql.la
>> ./lib/apr-util-1/apr_dbd_mysql.a
> Is the driver file apr_dbd_mysql.so linked to libmysqlclient_r.so?
> What does ldd tell you?
>
> You might want to check your LD_LIBRARY_PATH.  Or load the library
> explicitly with
>
> LoadFile /path/to/libmysqlclient_r.so
>
> before your DBDriver in httpd.conf
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Can't load driver file apr_dbd_mysql.so

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 01 Sep 2010 10:27:20 -0500
Steve Whitson <st...@gmail.com> wrote:

> I get the following error:
>      Can't load driver file apr_dbd_mysql.so
> 
> The driver file built ok using the configure directives
>       --with-mysql=/usr/local --with-included-apr
> 
> Here they are:
> ./lib/apr-util-1/apr_dbd_mysql-1.so
> ./lib/apr-util-1/apr_dbd_mysql.so -> apr_dbd_mysql-1.so
> ./lib/apr-util-1/apr_dbd_mysql.la
> ./lib/apr-util-1/apr_dbd_mysql.a

Is the driver file apr_dbd_mysql.so linked to libmysqlclient_r.so?
What does ldd tell you?

You might want to check your LD_LIBRARY_PATH.  Or load the library
explicitly with

LoadFile /path/to/libmysqlclient_r.so

before your DBDriver in httpd.conf

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org