FreeTDS and TinyTDS enter a bar...

160 views
Skip to first unread message

Luis Lavena

unread,
Feb 3, 2011, 8:25:34 PM2/3/11
to railsin...@googlegroups.com
And ask the bartender:

- You know if that nice guy, Windows came by?

- Yes, is over there.

- Let's get him some beers, we are celebrating!

Stupid joke aside:

FreeTDS both cross compiles and natively compiles using mingw-w64 and
RubyInstaller DevKit respectively. Patch sent to FreeTDS group and
tracker:

http://lists.ibiblio.org/pipermail/freetds/2011q1/026730.html

Hope they apply soon.

TinyTDS cross compiles and compiles natively against the static
library of FreeTDS:

https://gist.github.com/810579

Next step is run test against SQL Server.

Will provide the Rake recipe for TinyTDS developers once I look
carefully at their coding style.

This means the TinyTDS binaries will be using 0.83.dev and not stable
0.82, but we can talk about that later.

Wanted to share all this with you. Removing one item from my TODO list ;-)

Cheers,
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

nwil...@engineyard.com

unread,
Feb 3, 2011, 8:37:30 PM2/3/11
to railsin...@googlegroups.com
That is fantastic! Incredible effort!

Cheers
Nic

http://engineyard.com
http://drnicwilliams.com
+1 (415) 322 9556

Engine Yard: Successful Rails Apps through Orchestration

Ken Collins

unread,
Feb 3, 2011, 8:54:24 PM2/3/11
to railsin...@googlegroups.com

Excellent! I've been watching :)

I still have to test against 0.83.dev and will do that soon. Honestly I expect no issues. I will also help test things on Windows too.

- Ken

Ken Collins

unread,
Feb 4, 2011, 8:27:26 AM2/4/11
to railsin...@googlegroups.com

Luis,

> Will provide the Rake recipe for TinyTDS developers once I look
> carefully at their coding style.

The style is pretty simple and any enhancements are very much welcome. Looking forward to it.

> This means the TinyTDS binaries will be using 0.83.dev and not stable
> 0.82, but we can talk about that later.

I do not think that is an issue at all. I just installed 0.83.dev.20110125 and ran TinyTDS thru all my RVM rubies and all SQL Server databases from 2000-2008 and everything passes. We are just a small wrapper around it and it looks like future releases will be both 0.82 and up happy.

> Wanted to share all this with you. Removing one item from my TODO list ;-)


That completes mine again too. I'll wait to hear from you on the patches to our build and gem release stuff.


- Ken


Luis Lavena

unread,
Feb 4, 2011, 8:33:50 AM2/4/11
to railsin...@googlegroups.com
On Fri, Feb 4, 2011 at 10:27 AM, Ken Collins <k...@metaskills.net> wrote:
>
> I do not think that is an issue at all. I just installed 0.83.dev.20110125 and ran TinyTDS thru all my RVM rubies and all SQL Server databases from 2000-2008 and everything passes. We are just a small wrapper around it and it looks like future releases will be both 0.82 and up happy.
>

Awesome, I got just one warning that worries me:

gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.7-p330-i386-mingw32/lib/ruby/1.8/i386-mingw32
-I../../../../ext/tiny_tds -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H
-IC:/Users/Luis/Projects/_sandbox/installed-freetds/include -g -O2
-DFD_SETSIZE=256 -c ../../../../ext/tiny_tds/client.c
../../../../ext/tiny_tds/client.c: In function 'rb_tinytds_connect':
../../../../ext/tiny_tds/client.c:253:5: warning: passing argument 2
of 'dbsetuserdata' from incompatible pointer type
C:/Users/Luis/Projects/_sandbox/installed-freetds/include/sybdb.h:783:6:
note: expected 'unsigned char *' but argument is of type 'struct
tinytds_client_userdata *'

>
> That completes mine again too. I'll wait to hear from you on the patches to our build and gem release stuff.
>

Forked and will send my patches once I've tested building natively,
Linux and OSX.

Wayne E. Seguin

unread,
Feb 4, 2011, 9:16:36 AM2/4/11
to railsin...@googlegroups.com
Three cheers for Luis & Ken!!!

w00t w00t, w00tray!!!

err... ::cough:: ... Sorry Dr. Nic...

[redacted] [redacted], [redacted]ray!!!

Ken Collins

unread,
Feb 4, 2011, 3:56:31 PM2/4/11
to railsin...@googlegroups.com

Luis,

Klaus pointed a few test erros and I just recently updated the TinyTDS test code to be more bullet proof.
https://github.com/rails-sqlserver/tiny_tds/commit/3a5645028f7fa26815d88c5540952337fc8b503f

I would recommend pulling those into your fork.


- Ken

Luis Lavena

unread,
Feb 4, 2011, 3:58:26 PM2/4/11
to railsin...@googlegroups.com

Thank you, added you a comment to the commit about File reading.

Ken Collins

unread,
Feb 14, 2011, 2:45:04 PM2/14/11
to railsin...@googlegroups.com

Luis,

> Forked and will send my patches once I've tested building natively,
> Linux and OSX.

I have some recent changes in for Jeremy Evans who is just finishing up a Sequel adapter using TinyTDS. This also got rid of a few compiler bugs too. I will most likely release a 0.4.0 version soon with those changes. Just FYI, as you may want to rebase since a lot of low level code changed.

- Ken


Luis Lavena

unread,
Feb 14, 2011, 2:47:35 PM2/14/11
to railsin...@googlegroups.com

Thank you for the heads up, can you hold 1 more day?

The reason is that I'm stuck due the versioned folder stuff and the
lack of consistent download place for FreeTDS download (as I mentioned
in their list) this requires some more tricks that I need to verify
they work properly.

Would like 0.4.0 gets initial love in relation to Windows support so
versioning is not affected by such change later in the process.

Ken Collins

unread,
Feb 14, 2011, 2:49:16 PM2/14/11
to railsin...@googlegroups.com

> Thank you for the heads up, can you hold 1 more day?

Or more :) Just let me know.


- Ken

KlausG

unread,
Feb 19, 2011, 10:19:25 AM2/19/11
to RailsInstaller
On 4 Feb., 02:25, Luis Lavena <luislav...@gmail.com> wrote:

> FreeTDS both cross compiles and natively compiles using mingw-w64 and
> RubyInstaller DevKit respectively.
>
> TinyTDS cross compiles and compiles natively against the static
> library of FreeTDS:
>
Hi Luis and Ken,

what do you propose a Windows developer should do?

- download FreeTDS sources and compile it on their system
( thats not so easy, when you never used the Unix compiler tools )
and even if you got it compiled with sh configure; make; make
install
( which took 15 minutes on my system )
a "gem install TinyTDS" will fail with an error message going over
80+
line that a "extconf.rb failed" Hä? I am new to Ruby and a Windows
developer, so what the hell is a "extconf.rb" ;-))

- OR should TinyTDS include the necessary FreeTDS Header Files and
binary libraries, so that it will smoothly compile/run on Windows.

Best regards

Klaus

Luis Lavena

unread,
Feb 19, 2011, 12:29:04 PM2/19/11
to railsin...@googlegroups.com, KlausG
On Sat, Feb 19, 2011 at 12:19 PM, KlausG <KDi...@web.de> wrote:
> On 4 Feb., 02:25, Luis Lavena <luislav...@gmail.com> wrote:
>
>> FreeTDS both cross compiles and natively compiles using mingw-w64 and
>> RubyInstaller DevKit respectively.
>>
>> TinyTDS cross compiles and compiles natively against the static
>> library of FreeTDS:
>>
> Hi Luis and Ken,
>

Hello Klaus.

> what do you propose a Windows developer should do?
>
> - download FreeTDS sources and compile it on their system
>  ( thats not so easy, when you never used the Unix compiler tools )
>  and even if you got it compiled with sh configure; make; make
> install
>  ( which took 15 minutes on my system )
>  a "gem install TinyTDS" will fail with an error message going over
> 80+
>  line that a "extconf.rb failed"  Hä? I am new to Ruby and a Windows
>  developer, so what the hell is a "extconf.rb"  ;-))
>
> - OR should TinyTDS include the necessary FreeTDS Header Files and
>  binary libraries, so that it will smoothly compile/run on Windows.
>

TinyTDS will be offered as binary gem, so there will be no external
dependency, no missing headers or linking libraries you need to deal
with.

For that to happen, FreeTDS needs to apply the patches I sent that
allow FreeTDS compiles properly in both native or cross-platform
scenarios.

The second problem I have with FreeTDS library release schema is the
lack of consistency in the file downloads. Downloading the nightly
snapshot today generate a folder that is not the same tomorrow.

I cannot use these files or create a recipe that works properly
because things are changing on every file, nor I can use a MD5 to
verify that the file is correct.

But these issues are for TinyTDS developers to deal with, end users
will not need to worry unless they are interested in improve TinyTDS
or FreeTDS itself.

Hope this answer your question, rest assured that we will minimize the
complexity of installation.

Ken Collins

unread,
Feb 19, 2011, 4:39:13 PM2/19/11
to railsin...@googlegroups.com, KlausG

What do you propose a Windows developer should do?

Hope this answer your question, rest assured that we will minimize the
complexity of installation.

I'm just being patient and waiting for Luis to connect the dots :)

My understanding is what he outlined, first we have to wait for FreeTDS to get some patches done. I saw Luis great thread on the freetds mailing list about their release organization and vcs. A lot of "doing it wrong" is going on in their project and it just means for the average windows user with rails installer, they will rely on Luis doing it all for them. 

Klaus, my understanding too is that your patch issue with TinyTDS may be moot since Louis will be prividing me a patch/pull request that makes everything easy for the RailsInstaller. I'd like to wait for that first and understand it before any other changes.


 - Ken


Reply all
Reply to author
Forward
0 new messages