[JDEV] Building jabberd-2.0rc1: MySQL Path?

Douglas Anarino lists at syntropo.com
Fri Nov 28 12:00:48 CST 2003


Yay! It finally worked!

I was actually building on Mac OSX (a clean install of Panther). The 
core problem was that I was not building MySQL from source. The MySQL 
binaries for OSX did not seem to include the dynamic library file that 
the jabberd configure script was looking for (which on my system is 
called 'libmysqlclient.dylib'). When I built MySQL from source, this 
file did wind up at /usr/local/mysql/lib/mysql, but creating the 
temporary folder with the symbolic links worked like a charm!

So in summation, to get jabberd2 to build on Mac OSX Panther:

1) Build MySQL from SOURCE - download the MySQL source code. This is a 
tar.gz file which Stuffit Expander might delete, and you'll likely be 
left with just a tar file and the decompressed folder. Move the tar 
file to /usr/local. From the decompressed directory, open the 
INSTALL-SOURCE read me file and follow the directions for 'Installing 
source' (NOT the standard, binary install instructions). If you've 
already got a mysql user (because you have OSX Server, or created one 
manually) you can skip the first two steps (groupadd and useradd). The 
third step decompresses the tar.gz file, but you just have a tar file 
at this point, so use this instead:
    shell> tar -xvf mysql-VERSION.tar
Follow the rest of the MySQL installation instructions (configure, 
make, etc.)
2) Create Aliases - make a new directory somewhere and take note of its 
path (ALIAS-PATH below). I called mine mysql and put it in 
/usr/local/jabberd. Make symbolic links to mysql's lib and include 
directories in this new directory:
    shell> ln -s /usr/local/mysql/lib/mysql ALIAS-PATH/lib
    shell> ln -s /usr/local/mysql/include/mysql ALIAS-PATH/include
3) Build jabberd - pass the alias path to jabberd's configure script 
using the with-mysql switch:
    shell> ./configure --with-mysql=ALIAS-PATH
Follow the rest of the jabberd installation instructions (make, etc.)
4) Clean Up - you can delete the original tar file and the decompressed 
MySQL directory in your downloads folder. Keep the decompressed 
directory in /usr/local in case you need to rebuild MySQL in future. I 
would also keep the alias directory in case you need to rebuild 
jabberd.

Thanks, everyone, for your help getting this going...
doug

http://Syntropo.com


On Nov 26, 2003, at 9:20 PM, Paul Curtis wrote:

>
> On Wednesday, November 26, 2003, at 01:13 PM, Douglas Anarino wrote:
>
>> Thanks for your help! I don't have a libmysqlclient.so file in my 
>> MySQL installation, just libmysqlclient.a and libmysqlclient_r.a 
>> files. I installed MySQL from a package file - maybe it didn't 
>> include this file? Is there a way to build it from the files I have, 
>> or do I need to build MySQL from source?
>
> You probably have the same Solaris package of MySQL I have .... ;)
>
> Here's exactly what I did:
> Did a 'pkgadd' of the MySQL packages from www.sunfreeware.com
> Created a temporary directory '/opt/mysql'
> Symbolically linked '/usr/local/mysql/include/mysql' to 
> /opt/mysql/include'
> Symbolically linked '/usr/local/mysql/lib/mysql' to /opt/mysql/lib'
> Ran 'configure' with '--with-mysql=/opt/mysql' and the storage/auth 
> options.
> 'make'
>
>> This all seems very complex to me - I would think jabberd would just 
>> require some options in config.xml to use a database. Will I have to 
>> rebuild jabberd each time I switch databases?
>
> The issue is the Solaris packages for MySQL .... they install in 
> "non-standard" locations compared to every other MySQL installation 
> I've ever seen.
>
> This could be a dynamically loaded mechanism for databases, but still 
> would require source code specific to each database. Since you would 
> have to have database specific code, it doesn't really make much 
> difference whether you compile the libraries in or load them at 
> runtime .... you would still need the MySQL include and library files 
> available.
>
> Regards,
>
> Paul
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
>




More information about the JDev mailing list