Building MySQL 5.0.18 with multithreaded DLL run-time...
Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 12:01:16 von Radovan Chytracek
Hi,
our software requires multi-threaded DLL (/MD switch of VC++ 7.1)
run-time but MySQL client & server builds only with multi-threaded (/MT)
run-time. Mixing run-times leads to clear crash sooner-or-later so we
would like to know if /MD based MySQL build can be achieved. We've tried
to do it ourselves but we're running into link problems when building
libmysql.dll and mysql client programs.
With original MySQL binaries we had problem to link because of
_dosmaperr unresolved symbol which we even can't find a reasonable
information about.
Any info or advice is welcomed.
Cheers
Radovan
--
--
Radovan Chytracek CERN IT PSS
mailto:Radovan.Chytracek@cern.ch
phone: +41227674578 fax: +41227669830
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 13:14:41 von armin.schoeffmann
I see no risk to link libmysql.dll dynamically against a dll importing =
the /MD runtime.
Usually, you even don't know about the runtime-imports of a foreign dll.
Mixing runtimes causes trouble when linking statically, but libmysql.dll =
is the dynamic lib.
Regards Armin.
-----Original Message-----
From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]=20
Sent: Friday, March 10, 2006 12:01 PM
To: win32@lists.mysql.com
Subject: Building MySQL 5.0.18 with multithreaded DLL run-time...
Hi,
our software requires multi-threaded DLL (/MD switch of VC++ 7.1) =
run-time but MySQL client & server builds only with multi-threaded (/MT) =
run-time. Mixing run-times leads to clear crash sooner-or-later so we =
would like to know if /MD based MySQL build can be achieved. We've tried =
to do it ourselves but we're running into link problems when building =
libmysql.dll and mysql client programs.
With original MySQL binaries we had problem to link because of =
_dosmaperr unresolved symbol which we even can't find a reasonable =
information about.
Any info or advice is welcomed.
Cheers
Radovan
--
--
Radovan Chytracek CERN IT PSS
mailto:Radovan.Chytracek@cern.ch
phone: +41227674578 fax: +41227669830
--=20
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: =
http://lists.mysql.com/win32?unsub=3Darmin.schoeffmann@aegae on.de
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 14:53:11 von Radovan Chytracek
Hi,
the issue is that when trying to link against MySQL original client
library 5.0.18 we get unresolved reference to _dosmaperr call. We have
found that a different run-time is being used to build it.
In trying to build MySQL libmysql.lib & dll libs from sources using /MD
we run into more unresolved symbols.
Another issue is that even for debug builds of our software stack we
still use on windows only the multi-threaded DLL non-debug version but
include debug information only of our SW as we don't need to debug C/C++
run-time libs :-)
MySQL on the other hand uses debug version of the C/C++ run-time for its
debug builds.
We try to find out a way to use 5.0.18 client libs without link error
mentioned above. So far we only see the way of providing a hack using a
dummy _dosmaperr() call in order to avoid it. Of course if there is way
to avoid hacking MySQL sources we follow it.
Cheers
Radovan
On Fri, 2006-03-10 at 13:14 +0100, Armin Schöffmann wrote:
> I see no risk to link libmysql.dll dynamically against a dll importing th=
e /MD runtime.
> Usually, you even don't know about the runtime-imports of a foreign dll.
> Mixing runtimes causes trouble when linking statically, but libmysql.dll =
is the dynamic lib.
> Regards Armin.
>=20
>=20
>=20
> -----Original Message-----
> From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]=20
> Sent: Friday, March 10, 2006 12:01 PM
> To: win32@lists.mysql.com
> Subject: Building MySQL 5.0.18 with multithreaded DLL run-time...
>=20
> Hi,
>=20
> our software requires multi-threaded DLL (/MD switch of VC++ 7.1) run-=
time but MySQL client & server builds only with multi-threaded (/MT) run-ti=
me. Mixing run-times leads to clear crash sooner-or-later so we would like =
to know if /MD based MySQL build can be achieved. We've tried to do it ours=
elves but we're running into link problems when building libmysql.dll and m=
ysql client programs.
> With original MySQL binaries we had problem to link because of _dosmaperr=
unresolved symbol which we even can't find a reasonable information about.
>=20
> Any info or advice is welcomed.
>=20
> Cheers
>=20
> Radovan
>=20
> --
> --
> Radovan Chytracek CERN IT PSS
> mailto:Radovan.Chytracek@cern.ch
> phone: +41227674578 fax: +41227669830
>=20
>=20
--=20
--
Radovan Chytracek CERN IT PSS
mailto:Radovan.Chytracek@cern.ch
phone: +41227674578 fax: +41227669830
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 15:42:28 von armin.schoeffmann
UmFkb3ZhbiwNCmFnYWluc3Qgd2hpY2ggbGliIHRvIHlvdSBsaW5rPw0KbGli bXlzcWwubGliIG9y
IG15c3FsY2xpZW50LmxpYg0KDQpsaWJteXNxbC5saWIganVzdCBjb250YWlu cyB0aGUgc3R1YnMg
Zm9yIGVhc2llciBoYW5kbGluZyB0aGUgZHluYW1pYyBpbXBvcnRzIC0gaXQg ZG9lcyBub3QgcmVm
ZXJlbmNlIHJ1bnRpbWUtY2FsbHMuDQpZb3UgY291bGQgZXZlbiBvbW1pdCB0 aGUgc3RhdGljIGlt
cG9ydCBsaWJteXNxbC5saWIgYW5kIGltcG9ydCBkaXJlY3RseSBhdCBydW50 aW1lIGZyb20gbGli
bXlzcWwuZGxsDQpieSBMb2FkTGlicmFyeS8gR2V0UHJvY0FkZHJlc3MuDQoN CmFybWluLiANCg0K
LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IFJhZG92YW4gQ2h5 dHJhY2VrIFttYWls
dG86UmFkb3Zhbi5DaHl0cmFjZWtAY2Vybi5jaF0gDQpTZW50OiBGcmlkYXks IE1hcmNoIDEwLCAy
MDA2IDI6NTMgUE0NClRvOiBBcm1pbiBTY2jDtmZmbWFubg0KQ2M6IHdpbjMy QGxpc3RzLm15c3Fs
LmNvbQ0KU3ViamVjdDogUkU6IEJ1aWxkaW5nIE15U1FMIDUuMC4xOCB3aXRo I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gDQo+IA0KLS0N Ci0tDQpSYWRvdmFu
IENoeXRyYWNlayBDRVJOIElUIFBTUw0KbWFpbHRvOlJhZG92YW4uQ2h5dHJh Y2VrQGNlcm4uY2gN
CnBob25lOiArNDEyMjc2NzQ1NzggZmF4OiArNDEyMjc2Njk4MzANCg0KDQoN Cg==
RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 15:46:14 von Radovan Chytracek
Hi,
how can you avoid it when using MySQL C API in our apps DLLs?
Radovan
On Fri, 2006-03-10 at 15:42 +0100, Armin Schöffmann wrote:
> Radovan,
> against which lib to you link?
> libmysql.lib or mysqlclient.lib
>=20
> libmysql.lib just contains the stubs for easier handling the dynamic impo=
rts - it does not reference runtime-calls.
> You could even ommit the static import libmysql.lib and import directly a=
t runtime from libmysql.dll
> by LoadLibrary/ GetProcAddress.
>=20
> armin.=20
>=20
> -----Original Message-----
> From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]=20
> Sent: Friday, March 10, 2006 2:53 PM
> To: Armin Schöffmann
> Cc: win32@lists.mysql.com
> Subject: RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
>=20
> Hi,
> the issue is that when trying to link against MySQL original client l=
ibrary 5.0.18 we get unresolved reference to _dosmaperr call. We have found=
that a different run-time is being used to build it.
> In trying to build MySQL libmysql.lib & dll libs from sources using /MD w=
e run into more unresolved symbols.
>=20
> Another issue is that even for debug builds of our software stack we stil=
l use on windows only the multi-threaded DLL non-debug version but include =
debug information only of our SW as we don't need to debug C/C++ run-time l=
ibs :-) MySQL on the other hand uses debug version of the C/C++ run-time fo=
r its debug builds.
>=20
> We try to find out a way to use 5.0.18 client libs without link error men=
tioned above. So far we only see the way of providing a hack using a dummy =
_dosmaperr() call in order to avoid it. Of course if there is way to avoid =
hacking MySQL sources we follow it.
>=20
> Cheers
>=20
> Radovan
>=20
> On Fri, 2006-03-10 at 13:14 +0100, Armin Schöffmann wrote:
> > I see no risk to link libmysql.dll dynamically against a dll importing =
the /MD runtime.
> > Usually, you even don't know about the runtime-imports of a foreign dll=
..
> > Mixing runtimes causes trouble when linking statically, but libmysql.dl=
l is the dynamic lib.
> > Regards Armin.
> >=20
> >=20
> >=20
> > -----Original Message-----
> > From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]
> > Sent: Friday, March 10, 2006 12:01 PM
> > To: win32@lists.mysql.com
> > Subject: Building MySQL 5.0.18 with multithreaded DLL run-time...
> >=20
> > Hi,
> >=20
> > our software requires multi-threaded DLL (/MD switch of VC++ 7.1) ru=
n-time but MySQL client & server builds only with multi-threaded (/MT) run-=
time. Mixing run-times leads to clear crash sooner-or-later so we would lik=
e to know if /MD based MySQL build can be achieved. We've tried to do it ou=
rselves but we're running into link problems when building libmysql.dll and=
mysql client programs.
> > With original MySQL binaries we had problem to link because of _dosmape=
rr unresolved symbol which we even can't find a reasonable information abou=
t.
> >=20
> > Any info or advice is welcomed.
> >=20
> > Cheers
> >=20
> > Radovan
> >=20
> > --
> > --
> > Radovan Chytracek CERN IT PSS
> > mailto:Radovan.Chytracek@cern.ch
> > phone: +41227674578 fax: +41227669830
> >=20
> >=20
> --
> --
> Radovan Chytracek CERN IT PSS
> mailto:Radovan.Chytracek@cern.ch
> phone: +41227674578 fax: +41227669830
>=20
>=20
>=20
--=20
--
Radovan Chytracek CERN IT PSS
mailto:Radovan.Chytracek@cern.ch
phone: +41227674578 fax: +41227669830
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 17:53:16 von armin.schoeffmann
bWl4ZWQgQyAvQysrDQoNCndlIGN1cnJlbnRseSB1c2UgYSBjdXN0b20gbGli bXlzcWwuZGxsIHRv
IHdvcmthcm91bmQgYSBoYW5kbGUtbGVhayBpbiB0aGUgc2hhcmVkLW1lbS1w cm90b2NvbCx0aGF0
IG5vYm9keSB3YW50cyB0by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yMjc2NzQ1Nzgg ZmF4OiArNDEyMjc2
Njk4MzANCj4gPiANCj4gPiANCj4gPiANCj4gLS0NCj4gLS0NCj4gUmFkb3Zh biBDaHl0cmFjZWsg
Q0VSTiBJVCBQU1MNCj4gbWFpbHRvOlJhZG92YW4uQ2h5dHJhY2VrQGNlcm4u Y2gNCj4gcGhvbmU6
ICs0MTIyNzY3NDU3OCBmYXg6ICs0MTIyNzY2OTgzMA0KPiANCj4gDQo+IA0K LS0NCi0tDQpSYWRv
dmFuIENoeXRyYWNlayBDRVJOIElUIFBTUw0KbWFpbHRvOlJhZG92YW4uQ2h5 dHJhY2VrQGNlcm4u
Y2gNCnBob25lOiArNDEyMjc2NzQ1NzggZmF4OiArNDEyMjc2Njk4MzANCg0K DQoNCg==
RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
am 10.03.2006 18:32:08 von Radovan Chytracek
Well, the whole story is that we have our own component plug-in
architecture which, on-demand, links dynamically our own plug-in DLLs
one of which is the plug-in providing acces to MySQL databases. The
whole system is well shielded from the implementation details of DLL/.so
loading in a cross-platform way.
We don't want to mess-up the system by explicit loading of external libs
on a particular platform if we can build our own shared lib plug-in
directly using the external libraries.
We had already some configuration/deployment issues when we were using
UnixODBC/ODBC based implementation of our plug-in for MySQL as it
launches chain of shared libs loading during ODBC run-time
initialization.
So far we had no problem linking against the mysqlclient.lib of version
4.0.x. We recently updated external dependencies after we successfully
migrated code to mysql client version 5.0.18 on Linux and suddenly the
build crashed on Win32 platform due to the unresolved symbol (infamous
_dosmaperr). The strange thing is that the symbol is not in all of the
VC++ 7.1 run-time versions. Definitely not in the msvc(p)rt library(ies)
which we link against. It looks like the symbol reference has been
introduced only recently, see: http://lists.mysql.com/internals/32243
Looking at the patch I don't see a good reason for that undocumented
call to be used but on Google one can find that it is rather popular in
PostgreSQL community too :-)
Interesting post discussing the problem we're facing is at:
http://caml.inria.fr/pub/ml-archives/caml-
list/2000/12/13419674475a4250f4a536c670a3f7ed.en.html
After reading the post I can conclude that MySQL developer(s) made a
mistake to rely on the undocumented Win32 call instead of implementing
error code translation properly.
Cheers
Radovan
On Fri, 2006-03-10 at 17:53 +0100, Armin Schöffmann wrote:
> mixed C /C++
>=20
> we currently use a custom libmysql.dll to workaround a handle-leak in the=
shared-mem-protocol,that nobody wants to fix, but it works also with the o=
riginal distributions.
>=20
> it's sufficient to reference the lib once. the pragma is a ms-extension f=
orcing the linker to include the assigned lib. Alternatively you could list=
the lib-name as additional library in the linker options.
>=20
> I observed similar linking issues with the static library mysqlclient.lib=
, anyway in my opinion it's preferable to use the dynamic lib - already con=
cerning bugfixes and upgrades to the api.=20
>=20
> something prevents you from linking to the dll?
>=20
> armin.=20
>=20
> -----Original Message-----
> From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]=20
> Sent: Friday, March 10, 2006 4:32 PM
> To: Armin Schöffmann
> Subject: RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
>=20
> Sorry, I have overlooked your earlier question about the libs we link aga=
inst. My problem is only to link against mysqlclient.lib.
> The only & single unresolved symbol is the _dosmaperr which is blocking u=
s from complete build and the only reason we started to look at the way the=
MySQL client lib is built.
>=20
> Radovan
>=20
> On Fri, 2006-03-10 at 15:59 +0100, Armin Schöffmann wrote:
> > we have several multithreaded (dlls/applications) using c-runtime from=20
> > which the mysql c-api is called, i statically link against=20
> > libmysql.lib, include the mysql-headers and that's it
> >=20
> > #include "mysql\mysql.h"=20
> > #include "mysql\errmsg.h"
> > [...]
> > #pragma comment(lib, "libmysql.lib")
> >=20
> > if you don't want to link the static part "libmysql.lib"
> > take a look into win32 documentation for LoadLibrary and GetProcAddress=
..
> >=20
> > The disadvantage in this case: you have to map each used mysql-api func=
tion by hand (GetProcAddress) and have to write an individual typedef-cast =
for the function-ptrs.
> >=20
> >=20
> >=20
> >=20
> > -----Original Message-----
> > From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]
> > Sent: Friday, March 10, 2006 3:46 PM
> > To: Armin Schöffmann
> > Cc: win32@lists.mysql.com
> > Subject: RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
> >=20
> > Hi,
> >=20
> > how can you avoid it when using MySQL C API in our apps DLLs?
> >=20
> > Radovan
> >=20
> > On Fri, 2006-03-10 at 15:42 +0100, Armin Schöffmann wrote:
> > > Radovan,
> > > against which lib to you link?
> > > libmysql.lib or mysqlclient.lib
> > >=20
> > > libmysql.lib just contains the stubs for easier handling the dynamic =
imports - it does not reference runtime-calls.
> > > You could even ommit the static import libmysql.lib and import=20
> > > directly at runtime from libmysql.dll by LoadLibrary/ GetProcAddress.
> > >=20
> > > armin.=20
> > >=20
> > > -----Original Message-----
> > > From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]
> > > Sent: Friday, March 10, 2006 2:53 PM
> > > To: Armin Schöffmann
> > > Cc: win32@lists.mysql.com
> > > Subject: RE: Building MySQL 5.0.18 with multithreaded DLL run-time...
> > >=20
> > > Hi,
> > > the issue is that when trying to link against MySQL original clie=
nt library 5.0.18 we get unresolved reference to _dosmaperr call. We have f=
ound that a different run-time is being used to build it.
> > > In trying to build MySQL libmysql.lib & dll libs from sources using /=
MD we run into more unresolved symbols.
> > >=20
> > > Another issue is that even for debug builds of our software stack we =
still use on windows only the multi-threaded DLL non-debug version but incl=
ude debug information only of our SW as we don't need to debug C/C++ run-ti=
me libs :-) MySQL on the other hand uses debug version of the C/C++ run-tim=
e for its debug builds.
> > >=20
> > > We try to find out a way to use 5.0.18 client libs without link error=
mentioned above. So far we only see the way of providing a hack using a du=
mmy _dosmaperr() call in order to avoid it. Of course if there is way to av=
oid hacking MySQL sources we follow it.
> > >=20
> > > Cheers
> > >=20
> > > Radovan
> > >=20
> > > On Fri, 2006-03-10 at 13:14 +0100, Armin Schöffmann wrote:
> > > > I see no risk to link libmysql.dll dynamically against a dll import=
ing the /MD runtime.
> > > > Usually, you even don't know about the runtime-imports of a foreign=
dll.
> > > > Mixing runtimes causes trouble when linking statically, but libmysq=
l.dll is the dynamic lib.
> > > > Regards Armin.
> > > >=20
> > > >=20
> > > >=20
> > > > -----Original Message-----
> > > > From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]
> > > > Sent: Friday, March 10, 2006 12:01 PM
> > > > To: win32@lists.mysql.com
> > > > Subject: Building MySQL 5.0.18 with multithreaded DLL run-time...
> > > >=20
> > > > Hi,
> > > >=20
> > > > our software requires multi-threaded DLL (/MD switch of VC++ 7.1=
) run-time but MySQL client & server builds only with multi-threaded (/MT) =
run-time. Mixing run-times leads to clear crash sooner-or-later so we would=
like to know if /MD based MySQL build can be achieved. We've tried to do i=
t ourselves but we're running into link problems when building libmysql.dll=
and mysql client programs.
> > > > With original MySQL binaries we had problem to link because of _dos=
maperr unresolved symbol which we even can't find a reasonable information =
about.
> > > >=20
> > > > Any info or advice is welcomed.
> > > >=20
> > > > Cheers
> > > >=20
> > > > Radovan
> > > >=20
> > > > --
> > > > --
> > > > Radovan Chytracek CERN IT PSS
> > > > mailto:Radovan.Chytracek@cern.ch
> > > > phone: +41227674578 fax: +41227669830
> > > >=20
> > > >=20
> > > --
> > > --
> > > Radovan Chytracek CERN IT PSS
> > > mailto:Radovan.Chytracek@cern.ch
> > > phone: +41227674578 fax: +41227669830
> > >=20
> > >=20
> > >=20
> > --
> > --
> > Radovan Chytracek CERN IT PSS
> > mailto:Radovan.Chytracek@cern.ch
> > phone: +41227674578 fax: +41227669830
> >=20
> >=20
> >=20
> --
> --
> Radovan Chytracek CERN IT PSS
> mailto:Radovan.Chytracek@cern.ch
> phone: +41227674578 fax: +41227669830
>=20
>=20
>=20
--=20
--
Radovan Chytracek CERN IT PSS
mailto:Radovan.Chytracek@cern.ch
phone: +41227674578 fax: +41227669830
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org