This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

configure for mysql compile


Hi,

the mysqlclient library and the clients do not build OOTB. I didn't
get around to build the clients yet, but I found a way to compile
libmysqlclient.a which was more urgent for me. It shouldn't be too
hard to get to the clients from this point. Please see the
instructions and patches appended below. BTW this was 3.23.28-gamma.

regards,
Markus

dale henderson writes:
 > I am trying to compile the latest mysql sources on the latest cygwin. Does 
 > anyone know the correct ./configure parameters to get a successful mysql 
 > client. I have tried using:
 > 
 > ./configure --without-server
 > 
 >          AND
 > 
 > CC="gcc -mno-cygwin" CXX="c++ -mno-cygwin" ./configure --without-server 
 > --host=i686-pc-cygwin --target=i386-pc-mingw32
 > 
 > 
 > It has hung at different places, the last being with conftest
 > _________________________________________________________________
 > Get your FREE download of MSN Explorer at http://explorer.msn.com
 > 
 > 
 > --
 > Want to unsubscribe from this list?
 > Check out: http://cygwin.com/ml/#unsubscribe-simple
 > 

Build:
tar -xzf mysql...tar.gz
cd mysql...
patch < configure.diff
./configure --without-server
make
[will create some additional files we need to patch, but will eventually bomb out]
patch -p 0 < include.diff
patch -p 0 < libmysql.diff
patch -p 0 < mysys.diff
cd libmysql
make

Install:
cp .libs/libmysqlclient.a /usr/local/lib
mkdir /usr/local/include/mysql
cp ../include/mysql.h ../include/mysql_com.h ../include/mysql_version.h /usr/local/include/mysql

Compile apps:
gcc ... -lmysqlclient -lz

configure.diff:
--8<-----------------------
--- configure	Wed Nov 22 11:59:10 2000
+++ ../mysql-3.23.28-gamma-cyg/configure	Tue Dec  5 15:07:27 2000
@@ -3103,7 +3103,7 @@
       FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
       ;;
     *)
-      { echo "configure: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." 1>&2; exit 1; }
+#      { echo "configure: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual." 1>&2; exit 1; }
   esac
 fi
--8<-----------------------

include.diff:
--8<-----------------------
diff -U 3 include/global.h ../mysql-3.23.28-gamma-cyg/include/global.h
--- include/global.h	Wed Nov 22 11:59:00 2000
+++ ../mysql-3.23.28-gamma-cyg/include/global.h	Tue Dec  5 15:22:23 2000
@@ -21,11 +21,12 @@
 #ifndef _global_h
 #define _global_h
 
-#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
-#include <config-win.h>
-#else
+#undef __WIN__
+/*  #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) */
+/*  #include <config-win.h> */
+/*  #else */
 #include <my_config.h>
-#endif
+/*  #endif */
 #if defined(__cplusplus)
 #if defined(inline)
 #undef inline				/* fix configure problem */
diff -U 3 include/m_string.h ../mysql-3.23.28-gamma-cyg/include/m_string.h
--- include/m_string.h	Wed Nov 22 11:58:57 2000
+++ ../mysql-3.23.28-gamma-cyg/include/m_string.h	Tue Dec  5 15:23:34 2000
@@ -26,10 +26,10 @@
 #define __USE_GNU				/* We want to use stpcpy */
 #endif
 #if defined(HAVE_STRINGS_H)
-#include <strings.h>
+/*  #include <strings.h> */
 #endif
 #if defined(HAVE_STRING_H)
-#include <string.h>
+/*  #include <string.h> */
 #endif
 
 /* Correct some things for UNIXWARE7 */
@@ -51,12 +51,12 @@
 
 /*  This is needed for the definitions of bzero... on solaris */
 #if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread)
-#include <strings.h>
+/*  #include <strings.h> */
 #endif
 
 /*  This is needed for the definitions of memcpy... on solaris */
 #if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
-#include <memory.h>
+/*  #include <memory.h> */
 #endif
 
 #if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
diff -U 3 include/my_global.h ../mysql-3.23.28-gamma-cyg/include/my_global.h
--- include/my_global.h	Wed Nov 22 12:00:18 2000
+++ ../mysql-3.23.28-gamma-cyg/include/my_global.h	Tue Dec  5 15:22:26 2000
@@ -21,11 +21,12 @@
 #ifndef _global_h
 #define _global_h
 
-#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
-#include <config-win.h>
-#else
+#undef __WIN__
+/*  #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) */
+/*  #include <config-win.h> */
+/*  #else */
 #include <my_config.h>
-#endif
+/*  #endif */
 #if defined(__cplusplus)
 #if defined(inline)
 #undef inline				/* fix configure problem */
diff -U 3 include/mysql.h ../mysql-3.23.28-gamma-cyg/include/mysql.h
--- include/mysql.h	Wed Nov 22 11:58:57 2000
+++ ../mysql-3.23.28-gamma-cyg/include/mysql.h	Tue Dec  5 17:22:16 2000
@@ -29,9 +29,9 @@
 #ifndef _global_h				/* If not standard header */
 #include <sys/types.h>
 typedef char my_bool;
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
-#define __WIN__
-#endif
+/*  #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) */
+#undef __WIN__
+/*  #endif */
 #if !defined(__WIN__)
 #define STDCALL
 #else
--8<-----------------------

libmysql.diff:
--8<-----------------------
diff -U 3 libmysql/libmysql.c ../mysql-3.23.28-gamma-cyg/libmysql/libmysql.c
--- libmysql/libmysql.c	Wed Nov 22 11:58:57 2000
+++ ../mysql-3.23.28-gamma-cyg/libmysql/libmysql.c	Tue Dec  5 15:21:24 2000
@@ -14,11 +14,11 @@
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    MA 02111-1307, USA */
-
+#undef __WIN__
 #define DONT_USE_RAID
 #if defined(__WIN__) || defined(_WIN32) || defined(_WIN64)
-#include <winsock.h>
-#include <odbcinst.h>
+/*  #include <winsock.h> */
+/*  #include <odbcinst.h> */
 #endif
 #include <global.h>
 #include <my_sys.h>
@@ -36,7 +36,7 @@
 #ifdef	 HAVE_PWD_H
 #include <pwd.h>
 #endif
-#if !defined(MSDOS) && !defined(__WIN__)
+/*  #if !defined(MSDOS) && !defined(__WIN__) */
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -47,11 +47,11 @@
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#endif
+/*  #endif */
 #ifdef HAVE_SYS_UN_H
 #  include <sys/un.h>
 #endif
-#if defined(THREAD) && !defined(__WIN__)
+#if defined(THREAD)/*   && !defined(__WIN__) */
 #include <my_pthread.h>				/* because of signal()	*/
 #endif
 #ifndef INADDR_NONE
@@ -70,15 +70,15 @@
 #define CONNECT_TIMEOUT 0
 #endif
 
-#if defined(MSDOS) || defined(__WIN__)
-#define ERRNO WSAGetLastError()
-#define perror(A)
-#else
+/*  #if defined(MSDOS) || defined(__WIN__) */
+/*  #define ERRNO WSAGetLastError() */
+/*  #define perror(A) */
+/*  #else */
 #include <errno.h>
 #define ERRNO errno
 #define SOCKET_ERROR -1
 #define closesocket(A) close(A)
-#endif
+/*  #endif */
 
 static void mysql_once_init(void);
 static MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
diff -U 3 libmysql/my_getwd.c ../mysql-3.23.28-gamma-cyg/libmysql/my_getwd.c
--- libmysql/my_getwd.c	Wed Nov 22 11:58:59 2000
+++ ../mysql-3.23.28-gamma-cyg/libmysql/my_getwd.c	Tue Dec  5 15:33:42 2000
@@ -17,6 +17,8 @@
 
 /* my_setwd() and my_getwd() works with intern_filenames !! */
 
+#undef __WIN__
+#include <errno.h>
 #include "mysys_priv.h"
 #include <m_string.h>
 #include "mysys_err.h"
diff -U 3 libmysql/my_lib.c ../mysql-3.23.28-gamma-cyg/libmysql/my_lib.c
--- libmysql/my_lib.c	Wed Nov 22 11:58:59 2000
+++ ../mysql-3.23.28-gamma-cyg/libmysql/my_lib.c	Tue Dec  5 15:31:38 2000
@@ -18,6 +18,8 @@
 /* TODO: check for overun of memory for names. */
 /*	 Convert MSDOS-TIME to standar time_t */
 
+#undef __WIN__
+#include <errno.h>
 #define USES_TYPES		/* sys/types is included */
 #include	"mysys_priv.h"
 #include	<m_string.h>
diff -U 3 libmysql/my_malloc.c ../mysql-3.23.28-gamma-cyg/libmysql/my_malloc.c
--- libmysql/my_malloc.c	Wed Nov 22 11:58:58 2000
+++ ../mysql-3.23.28-gamma-cyg/libmysql/my_malloc.c	Tue Dec  5 15:30:07 2000
@@ -22,6 +22,7 @@
 #include "mysys_priv.h"
 #include "mysys_err.h"
 #include <m_string.h>
+#include <errno.h>
 
 	/* My memory allocator */
 
diff -U 3 libmysql/my_once.c ../mysql-3.23.28-gamma-cyg/libmysql/my_once.c
--- libmysql/my_once.c	Wed Nov 22 11:58:58 2000
+++ ../mysql-3.23.28-gamma-cyg/libmysql/my_once.c	Tue Dec  5 15:31:59 2000
@@ -24,6 +24,7 @@
 #include "mysys_priv.h"
 #include "my_static.h"
 #include "mysys_err.h"
+#include <errno.h>
 
 	/* alloc for things we don't nead to free */
 	/* No DBUG_ENTER... here to get smaller dbug-startup */
diff -U 3 libmysql/my_realloc.c ../mysql-3.23.28-gamma-cyg/libmysql/my_realloc.c
--- libmysql/my_realloc.c	Wed Nov 22 11:59:00 2000
+++ ../mysql-3.23.28-gamma-cyg/libmysql/my_realloc.c	Tue Dec  5 15:36:20 2000
@@ -21,6 +21,7 @@
 
 #include "mysys_priv.h"
 #include "mysys_err.h"
+#include <errno.h>
 
 	/* My memory re allocator */
--8<-----------------------

mysys.diff:
--8<-----------------------
diff -U 3 mysys/my_getwd.c ../mysql-3.23.28-gamma-cyg/mysys/my_getwd.c
--- mysys/my_getwd.c	Wed Nov 22 11:58:59 2000
+++ ../mysql-3.23.28-gamma-cyg/mysys/my_getwd.c	Tue Dec  5 15:33:42 2000
@@ -17,6 +17,8 @@
 
 /* my_setwd() and my_getwd() works with intern_filenames !! */
 
+#undef __WIN__
+#include <errno.h>
 #include "mysys_priv.h"
 #include <m_string.h>
 #include "mysys_err.h"
diff -U 3 mysys/my_lib.c ../mysql-3.23.28-gamma-cyg/mysys/my_lib.c
--- mysys/my_lib.c	Wed Nov 22 11:58:59 2000
+++ ../mysql-3.23.28-gamma-cyg/mysys/my_lib.c	Tue Dec  5 15:31:38 2000
@@ -18,6 +18,8 @@
 /* TODO: check for overun of memory for names. */
 /*	 Convert MSDOS-TIME to standar time_t */
 
+#undef __WIN__
+#include <errno.h>
 #define USES_TYPES		/* sys/types is included */
 #include	"mysys_priv.h"
 #include	<m_string.h>
diff -U 3 mysys/my_malloc.c ../mysql-3.23.28-gamma-cyg/mysys/my_malloc.c
--- mysys/my_malloc.c	Wed Nov 22 11:58:58 2000
+++ ../mysql-3.23.28-gamma-cyg/mysys/my_malloc.c	Tue Dec  5 15:30:07 2000
@@ -22,6 +22,7 @@
 #include "mysys_priv.h"
 #include "mysys_err.h"
 #include <m_string.h>
+#include <errno.h>
 
 	/* My memory allocator */
 
diff -U 3 mysys/my_once.c ../mysql-3.23.28-gamma-cyg/mysys/my_once.c
--- mysys/my_once.c	Wed Nov 22 11:58:58 2000
+++ ../mysql-3.23.28-gamma-cyg/mysys/my_once.c	Tue Dec  5 15:31:59 2000
@@ -24,6 +24,7 @@
 #include "mysys_priv.h"
 #include "my_static.h"
 #include "mysys_err.h"
+#include <errno.h>
 
 	/* alloc for things we don't nead to free */
 	/* No DBUG_ENTER... here to get smaller dbug-startup */
diff -U 3 mysys/my_realloc.c ../mysql-3.23.28-gamma-cyg/mysys/my_realloc.c
--- mysys/my_realloc.c	Wed Nov 22 11:59:00 2000
+++ ../mysql-3.23.28-gamma-cyg/mysys/my_realloc.c	Tue Dec  5 15:36:20 2000
@@ -21,6 +21,7 @@
 
 #include "mysys_priv.h"
 #include "mysys_err.h"
+#include <errno.h>
 
 	/* My memory re allocator */
--8<-----------------------
 

-- 
Markus Hoenicka, PhD
UT Houston Medical School
Dept. of Integrative Biology and Pharmacology
6431 Fannin MSB4.114
Houston, TX 77030
(713) 500-6313, -7477
(713) 500-7444 (fax)
Markus.Hoenicka@uth.tmc.edu
http://ourworld.compuserve.com/homepages/hoenicka_markus/


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]