12 messages in com.mysql.lists.javaRe: Building connector 3.1.10 from sr...
FromSent OnAttachments
Mark Kirkwood12 Sep 2005 01:06.diff
Matthew Seaman12 Sep 2005 09:37 
Mark Kirkwood12 Sep 2005 16:59 
Matthew Seaman13 Sep 2005 06:30 
Mark Kirkwood13 Sep 2005 16:04 
Matthew Seaman14 Sep 2005 01:43 
Mark Kirkwood14 Sep 2005 16:15 
Mark Matthews14 Sep 2005 20:14 
Mark Kirkwood14 Sep 2005 21:26 
Matthew Seaman15 Sep 2005 00:50 
Matthew Seaman15 Sep 2005 02:29 
Mark Kirkwood15 Sep 2005 17:01 
Subject:Re: Building connector 3.1.10 from src, some bugs and fixes
From:Matthew Seaman (m.se@infracaninophile.co.uk)
Date:09/12/2005 09:37:24 AM
List:com.mysql.lists.java

On Mon, Sep 12, 2005 at 08:06:36PM +1200, Mark Kirkwood wrote:

I decided to have a go at this, on FreeBSD 6.0Beta4, with linux jdk 1.4.2 and ant 1.6.5

A number of interesting problems emerged:

1) compile fails, as build.xml assumes a directory build/mysql-connector-java-3.1.10/lib-nodist exists, and it is not created anywhere.

2) junit.jar and log4j.jar are required by the build process, and are not part of the standard jdk (on this platform anyway).

3) (after patching to fix 1 and 2 above) compile fails with:

compile:

dist: [mkdir] Created dir: /home/mysql/develop/java/mysql-connector-java-3.1.10/build/META-INF

BUILD FAILED /home/mysql/develop/java/mysql-connector-java-3.1.10/build.xml:265: Manifest file: /home/mysql/develop/java/mysql-connector-java-3.1.10/build/MANIFEST.MF does not exist.

The line number for unpatched build.xml is 256. The error seems reasonable, as there is no manifest file in that location, I think it should be using build/META-INF/MANIFEST.MF.

Patching as indicated gives a successful build.

I don't think that any of these are FreeBSD specific, so I have attached the patched build.xml

Thank you for your interest. however the FreeBSD port of MySQL Connector Java already contains an equivalent patch for build.xml -- see:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/mysql-connector-java/files/patch-build.xml

The port gives you the option of installing the pre-compiled .jar downloaded from MySQL.com or recompiling it yourself.

I note that the fix to META-INF/MANIFEST.MF went into MySQL's cvs some time ago: see http://bugs.mysql.com/bug.php?id=11849 The junit and log4j dependencies however seem to be environment specific, so the fix in the FreeBSD port won't apply to other systems.

Cheers,

Matthew