Bug #282 Wrong Library Included in MySQL Lib32 Distribution
Submitted: 13 Apr 2003 1:57 Modified: 14 Apr 2003 8:47
Reporter: Marc Olivier Chouinard Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.12 OS:Microsoft Windows (Windows XP)
Assigned to: CPU Architecture:Any

[13 Apr 2003 1:57] Marc Olivier Chouinard
Description:
Im not a power mysql user, but here what happened :
I've try to port a .C server file I made to windows witch include mysqlclient
so I used cygwin to compile it.  I've work hard finding the dlltools and making a def file.  And it work, but it keep crashing and giving random error.

so I try to use the dlltools and it keep giving me error as before with the nm thing to create the .def file.

I found it strange that mysql_thread_init() wasn't avalable neither... only my_thread_init() was (and IT build 4.0.12 install from your website(I dont have a previous build install on my machine at all)

Need proff check out c:\mysql\include\Libmysql.def and TRY to find mysql_thread_init(), it not there.  Only my_thread_init() (and YES it 4.0.12 Build, not the old 3.0.. one)

How to repeat:
Try to compile something with cygwin and play with it.
Where it crash for me is there I use alot of function call.. When it try to return from a function, it give a segment fault

also  check c:\mysql\include\Libmysql.def  and see that the DEF is wrong

Suggested fix:
So to FIX my cygwin problem.. I've downloaded the mysql UNIX source and compiled it without server with cygwin.

At one point it crash but still the mysqlclient library are created, so I did make install and it copied the good lib and include to default install.

I've specified the makefile to get the newly created LIB and it compile and WORK as it does on my linux and freebsd box.

I hope you can fix it.  And Maybe ADD the cygwin mysqlclient lib.. I dont think it would be that hard, and might help alot of us out there

If you need more information, I will try to help out.

Thanks
[14 Apr 2003 5:33] MySQL Verification Team
The Windows source is native VC++, so the correct way
for to compile with Cygwin is using the Unix source
like you did.
[14 Apr 2003 8:37] Marc Olivier Chouinard
Before Closing this case, look at the file c:\mysql\include\Libmysql.def
It not good as far as I understand.
So I dont know how it is compiled, but if it use this file under VC++...
[14 Apr 2003 8:47] MySQL Verification Team
You should use the libmysqld.def on bk tree
/libmysqld directory or wait for the next
release