On 5/10/06, Kevin Williams <[EMAIL PROTECTED]> wrote:
The extension problem is the mysql extension doesn't build on thecurrent 1.8.4 
One Click Installer when using the same process from the1.8.2 gem build 
(http://rubyforge.org/projects/mysql-win). I'm workingwith Curt and a few 
others to figure out why. I wasn't referring tothe Mongrel extension.

Kevin,

I used the plain ruby-mswin32, even the new stable snapshot.

Based on your problems, I do the following:

* checkout out mysql-win trunk (guess is where the code you and Curt
are working on).
* added to includes mysql-5.0.21-win32\include
* added to lib mysql-5.0.21-win32\lib\opt
(Because I don't use mysql, download the 39MB no installer available
on their site).

* next I do was go to the ext/ folder of mysql-win (rake compile
rejected generate the makefile)

Anyway, inside ext/, run:

ruby extconf.rb
checking for mysql.h... yes
checking for mysql_query() in libmysql.lib... yes
checking for mysql_ssl_set()... no
creating Makefile

nmake
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        C:\Ruby\bin\ruby -e "puts 'EXPORTS', 'Init_mysql'"  > 
mysql-i386-mswin32.def
        cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-IC:/Ruby/lib/ruby/1.8/i386-mswin32
-IC:/Ruby/lib/ruby/1.8/i386-mswin32 -I. -DHAVE_MYSQL_H -c -Tcmysql.c
mysql.c
d:\programming\sources\ruby\extensions\mysql-win\ext\mysql.c(1703) :
warning C4716: 'time_initialize' : must return a value
        cl -nologo -LD -Femysql.so mysql.obj msvcrt-ruby18.lib libmysql.lib
oldnames.lib user32.lib advapi32.lib wsock32.lib  -link
-incremental:no -debug -opt:ref -opt:icf -dll -libpath:"C:/Ruby/lib"
-def:mysql-i386-mswin32.def -implib:mysql-i386-mswin32.lib
-pdb:mysql-i386-mswin32.pdb
  Creating library mysql-i386-mswin32.lib and object mysql-i386-mswin32.exp

=====

* Next I needed to modify the require line in the test file.

from:
require "./mysql.o"

to:
require "./mysql.so"

That typo is important, there is not .o file in win32, and in linux
are object files, not shared objects (or dll as win32).

* Run the test.rb agains my local MySQL - 5.0.20-community

Attached are the failures reported against empty test database.

My build environment is:

cl:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

lib:
Microsoft (R) Library Manager Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

nmake:
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

Platform SDK:
Windows Server 2003 SP1 SDK Release

Hope this information is helpful. Any hel I could provide, just mail me.

Regards,

Luis
Loaded suite test
Started
..................F......................................FFF......F.................F...............F.........
Finished in 1.993 seconds.

  1) Failure:
test_sqlstate(TC_Mysql2) [test.rb:154]:
<"00000"> expected but was
<"HY000">.

  2) Failure:
test_fetch_bigint(TC_MysqlStmt2) [test.rb:799]:
<[-1]> expected but was
<[9223372036854775807]>.

  3) Failure:
test_fetch_bigint_unsigned(TC_MysqlStmt2) [test.rb:812]:
<[-1]> expected but was
<[0]>.

  4) Failure:
test_fetch_binary(TC_MysqlStmt2) [test.rb:1009]:
<["abc"]> expected but was
<["abc\000\000\000\000\000\000\000"]>.

  5) Failure:
test_fetch_double(TC_MysqlStmt2) [test.rb:860]:
<-1.79769313486232e+308> expected but was
<-1.79769313486232e+308>.

  6) Failure:
test_fetch_timestamp(TC_MysqlStmt2) [test.rb:950]:
<[#<Mysql::Time:2037-12-31 23:59:59>]> expected but was
<[#<Mysql::Time:0000-00-00 00:00:00>]>.

  7) Failure:
test_sqlstate(TC_MysqlStmt2) [test.rb:1280]:
<""> expected but was
<"00000">.

110 tests, 340 assertions, 7 failures, 0 errors


_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to