delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/05/06:39:18

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42F341CB.5010602@etr-usa.com>
Date: Fri, 05 Aug 2005 04:39:07 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Trouble making .so (undefined symbols)
References: <42F02793 DOT 8080109 AT etr-usa DOT com> <42F07A02 DOT 4040308 AT familiehaase DOT de> <42F20ACF DOT 8050309 AT etr-usa DOT com> <42F2134E DOT 59A5E50F AT dessent DOT net> <42F23B1F DOT 7000303 AT etr-usa DOT com> <42F2564F DOT 5020603 AT etr-usa DOT com> <42F2ACD8 DOT 461F9EA8 AT dessent DOT net>
In-Reply-To: <42F2ACD8.461F9EA8@dessent.net>
X-IsSubscribed: yes

--------------020804080601050001000907
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Brian Dessent wrote:
> http://cygwin.com/ml/cygwin/2004-11/msg00159.html

Okay...that gets the DLL to build.  For the archives, the pthread 
changes are no longer required with current v4.1.x versions.

But the MySQL++ examples still hang when built against a Cygwin MySQL 
client DLL.

>>New problem: example programs link, and run for a short while, then
> 
> This is with a native server?  Or a Cygwin server?

With a native Linux server, on another box.  :)

You might be interested to try it yourself.  Apply the attached patch to 
MySQL++.  Then say "./bootstrap" to re-build all the autoconf stuff, and 
then "make" them.  The very first example you need to run, 
examples/resetdb, exhibits the problem.

But don't bother if you're not personally interested.  I've all but 
given up myself, because of the whole Cygwin GPL issue.  The main point 
of getting shared libraries working is to be able to comply with the 
LGPL (which MySQL++ is licensed under) in a commercial program.  But 
past posts on this list say there are very few commercial Cygwin 
licensees.  How many commercial licensees can there be that also want to 
use MySQL++?

I think efforts are better spent elsewhere, unless there's an easy fix, 
or someone is chasing this problem for reasons not specifically related 
to MySQL++.

Thanks for your help in any case.  You've answered my questions with 
aplomb.  Perhaps the answers will be useful to someone else, in a 
slightly different situation.

--------------020804080601050001000907
Content-Type: text/plain;
 name="mysqlpp-cygwin-dll.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mysqlpp-cygwin-dll.patch"

Index: config/mysql_loc.m4
===================================================================
--- config/mysql_loc.m4	(revision 1007)
+++ config/mysql_loc.m4	(working copy)
@@ -32,15 +32,23 @@
 		[MYSQL_inc_check="$with_mysql_include $with_mysql_include/include $with_mysql_include/include/mysql"])
 
 	#
-	# Decide which C API library to use, based on thread support
+	# Decide which C API library to use
 	#
-	if test "x$acx_pthread_ok" = xyes
-	then
-		MYSQL_C_LIB=mysqlclient_r
-	else
-		MYSQL_C_LIB=mysqlclient
-	fi
+	case $host_os in
+	cygwin*)
+		MYSQL_C_LIB=mysqlclient.dll
+		;;
 
+	*)
+		if test "x$acx_pthread_ok" = xyes
+		then
+			MYSQL_C_LIB=mysqlclient_r
+		else
+			MYSQL_C_LIB=mysqlclient
+		fi
+		;;
+	esac
+
 	#
 	# Look for MySQL C API library
 	#
Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am	(revision 1007)
+++ lib/Makefile.am	(working copy)
@@ -22,7 +22,7 @@
 
 lib_LTLIBRARIES=libmysqlpp.la
 
-libmysqlpp_la_LDFLAGS=-version-info @MYSQLPP_LIBTOOL_VERSION@
+libmysqlpp_la_LDFLAGS=-version-info @MYSQLPP_LIBTOOL_VERSION@ -no-undefined
 
 libmysqlpp_la_SOURCES = \
 	coldata.cpp connection.cpp datetime.cpp fields.cpp field_names.cpp \


--------------020804080601050001000907
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------020804080601050001000907--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019