Problem installing tiny_tds with x64-mingw32 and ruby 2.0.0p0 #110

Closed
vinodadhikary opened this Issue Mar 7, 2013 · 49 comments

Projects

None yet
@vinodadhikary

I'm trying to install tiny_tds under Windows 7 x64. Has anybody had any success? Following is the output:

C:\ruby\DevKit\bin>gem install tiny_tds
ruby 2.0.0p0 (2013-02-24) [x64-mingw32]

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing tiny_tds:
        ERROR: Failed to build gem native extension.

    C:/ruby/Ruby200-x64/bin/ruby.exe extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/ruby/Ruby200-x64/bin/ruby
        --enable-lookup
        --disable-lookup
        --with-iconv-dir
        --without-iconv-dir
        --with-iconv-include
        --without-iconv-include=${iconv-dir}/include
        --with-iconv-lib
        --without-iconv-lib=${iconv-dir}/
        --with-freetds-dir
        --without-freetds-dir
        --with-freetds-include
        --without-freetds-include=${freetds-dir}/include
        --with-freetds-lib
        --without-freetds-lib=${freetds-dir}/
        --with-iconvlib
        --without-iconvlib


Gem files will remain installed in C:/ruby/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1 for inspection.
Results logged to C:/ruby/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1/ext/tiny_tds/gem_make.out
@metaskills
Collaborator

The gems for the Windows platform are all pre-build and do not require building from source. So you are not getting the wrong one. Why I am not sure. Also, I have not updated the native gems to account for Ruby 2.0 too, I'll have to talk to @luislavena about that or read up on his warnings to the general public about that and rake-compiler

@luislavena
Collaborator

@metaskills thing is that the user is using x64-mingw32, what is something new, 64bits Ruby 2.0

Since Ruby 2.0 breaks ABI, extensions compiled for 1.9.3 will not work against 2.0.0 because they link to a different libruby shared library (DLL)

Now, to be able to provide pre-compiled binaries for x64-mingw32, will also require a cross-compiler for it, which I still don't have for OSX (only linux)

I haven't worked out lot of details but rake-compiler might not be able to solve the fatter gem issue, bundling 1.8.x, 1.9.x and 2.0.x into the same gem 😢

@sevk
sevk commented Mar 26, 2013

2.0.x how to fix it :

e:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `r
equire': cannot load such file -- tiny_tds/tiny_tds (LoadError)
        from e:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:45:in `require'
        from e:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1-x86-mingw32/lib/
tiny_tds.rb:16:in `rescue in <top (required)>'
        from e:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1-x86-mingw32/lib/
tiny_tds.rb:12:in `<top (required)>'
@luislavena
Collaborator

@sevk you need to force compilation of the gems, as explained in RubyInstaller 2.0.0 announcement:

https://groups.google.com/d/topic/rubyinstaller/mg5ailNICvM/discussion

* Existing pre-compiled gems are not Ruby 2.0 compatible 

Ruby 2.0 introduces ABI breakage which means compiled C extensions with previous 
1.9.3 will work with Ruby 2.0. 

DO NOT install Ruby 2.0 on top of existing Ruby 1.9.3, or try to use compiled 
extensions with it. 

You will be required to force compilation of those gems: 

    gem install <name> --platform=ruby 

This will require you have the extra dependencies required for that gem to 
compile. Look at the gem documentation for the requirements. 

That means you will need to look at TinyTDS documentation and build FreeTDS to be able to use the extension with Ruby 2.0.0

@sevk
sevk commented Mar 27, 2013

when I run :

gem install tiny_tds --platform=ruby

it say:

ERROR:  Error installing tiny_tds:
        ERROR: Failed to build gem native extension.

    E:/Ruby200/bin/ruby.exe extconf.rb
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing.
-----

I think tiny_tds need use Encoding::Converter in ruby2.0 and ruby1.9 instead of iconv :

Encoding::Converter 
@metaskills
Collaborator

No, this is FreeTDS that wants it and what the c compiler wants, it should get. FWIW, I have tested TinyTDS with Ruby 2.0 and it works fine. Then again, I am using a POSIX system with installed dependencies. For Windows users, we are going to have to wait for rake-compiler to be solved.

@bollard
bollard commented May 30, 2013

Having the same issue as OP, having upgraded to Ruby 2.0.0. Do i need to explicitly include FreeTDS, if so - how?

@jpierson

metaskills, is there a link you could share to this issue for the rake-compiler on Windows?

@luislavena
Collaborator

@jpierson is the same issue as nokogiri and others:

sparklemotion/nokogiri#864

@jpierson

@luislavena, Thanks for pointing out the link. It appears that this means that the issue posted on the Redmine website regarding support for Ruby 2.0 on Windows only applies to those running 64bit. Not sure how possible or easy it is to attempt running Ruby/Redmine as 32bit on Windows as we commonly do with .NET applications. I mention this here because they linked directly to this issue as the reason why "SQL Server support is reported broken with ruby 2.0.0 under Windows" and I'm just trying to get to the facts with limited knowledge of Ruby. Can somebody confirm my assumptions?

@sevk
sevk commented Aug 2, 2013
ok , an other err:

C:\>ruby -v
ruby 2.0.0p195 (2013-05-14) [i386-mingw32]

C:\>gem -v
2.0.6

C:\Documents and Settings\Administrator>gem install tiny_tds
Fetching: tiny_tds-0.6.1-x86-mingw32.gem (100%)
Successfully installed tiny_tds-0.6.1-x86-mingw32
Parsing documentation for tiny_tds-0.6.1-x86-mingw32
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/tiny_tds/tiny_tds.so,
skipping
Installing ri documentation for tiny_tds-0.6.1-x86-mingw32
1 gem installed
@bollard
bollard commented Aug 13, 2013

Now rake-compiler has been updated, is it likely we will see an update to tiny_tds some point soon?

@dicom
dicom commented Aug 19, 2013

Im struggling with tiny_tds on Ruby 2.0 on Windows too, and would love to see an update on this issue.

For my part, installation seems to complete successfully, but I get an error when trying to load the gem:

H:\Downloads\Ruby>gem install tiny_tds --platform=ruby -- --with-freetds-dir=c:\programfiler\freetds
Successfully installed tiny_tds-0.6.1-x86-mingw32
Parsing documentation for tiny_tds-0.6.1-x86-mingw32
Installing ri documentation for tiny_tds-0.6.1-x86-mingw32
Done installing documentation for tiny_tds after 0 seconds
Done installing documentation for tiny_tds (0 sec).
1 gem installed

H:\Downloads\Ruby>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require 'tiny_tds'
LoadError: 126: Den angitte modulen ble ikke funnet.   - C:/Ruby/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib
/tiny_tds/tiny_tds.so
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds.rb:16:in `rescue in <top (required)>'
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds.rb:12:in `<top (required)>'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
    from (irb):1
    from C:/Ruby/bin/irb:12:in `<main>'
@luislavena
Collaborator

@dicom are you sure you're specifying --platform=ruby ?

Just by doing it it should have not installed x86-mingw32 gem and instead should have used tiny_tds-0.6.1.gem

Can you please uninstall the gem and perform the installation steps again? Also, can you describe what is inside c:\programfiler\freetds?

It needs to contain a 32bits set of headers and libraries for Ruby and RubyGems properly compile and link against.

Thank you.

@dicom
dicom commented Aug 19, 2013

There may have been something wrong with devkit in my ruby installation, since it seems it didn't run. I tried this on another computer, where it ran like this:

H:\>gem install tiny_tds --platform=ruby -- --with-freetds-dir=c:\programfiler\freetds
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-freetds-dir=c:\programfiler\freetds'
This could take a while...
ERROR:  Error installing tiny_tds:
    ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb --with-freetds-dir=c:\programfiler\freetds
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

FreeTDS is downloaded from here (http://sourceforge.net/projects/freetdswindows/files/FreeTDS-0.91/) and contains:

06/07/2011  21:33            84,199 bsqldb.exe
06/07/2011  21:33            75,778 bsqlodbc.exe
06/07/2011  21:33            71,955 datacopy.exe
06/07/2011  21:33            73,533 defncopy.exe
06/07/2011  20:58            27,024 dltest.exe
19/08/2013  14:26    <DIR>          etc
06/07/2011  21:33            71,776 freebcp.exe
06/07/2011  20:58            52,361 isql.exe
06/07/2011  20:58            45,114 iusql.exe
06/07/2011  21:33           395,830 libct-4.dll
02/07/2011  12:11             9,728 libdl.dll
02/07/2011  12:51           981,686 libiconv-2.dll
02/07/2011  12:15            61,541 libltdl-7.dll
06/07/2011  20:58           512,460 libodbc-2.dll
06/07/2011  20:58            62,756 libodbccr-2.dll
06/07/2011  20:58           129,470 libodbcinst-2.dll
02/07/2011  12:45           253,928 libreadline6.dll
06/07/2011  21:33           453,628 libsybdb-5.dll
06/07/2011  21:33           401,920 libtdsodbc-0.dll
09/07/2011  19:14           339,965 Misc-Web-Database.ico
06/07/2011  20:58            47,763 odbcinst.exe
06/07/2011  20:58            25,649 odbc_config.exe
06/07/2011  21:33             9,026 osql
14/07/2011  07:39            10,906 Readme.pdf
19/08/2013  14:26               247 StartFreeTDS.cmd
06/07/2011  21:33           310,208 tdspool.exe
06/07/2011  21:33           306,227 tsql.exe
19/08/2013  14:26            15,068 unins000.dat
19/08/2013  14:26         1,050,963 unins000.exe

In the end I tried installing the gem file itself, which produced the behaviour as above (installation apparently successful but gem require fails):

H:\Downloads\Ruby>gem install tiny_tds-0.6.1-x86-mingw32.gem -- --with-freetds-dir=c:\programfiler\freetds
Successfully installed tiny_tds-0.6.1-x86-mingw32
Parsing documentation for tiny_tds-0.6.1-x86-mingw32
Installing ri documentation for tiny_tds-0.6.1-x86-mingw32
Done installing documentation for tiny_tds after 0 seconds
Done installing documentation for tiny_tds (0 sec).
1 gem installed

H:\Downloads\Ruby>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require 'tiny_tds'
LoadError: 126: Den angitte modulen ble ikke funnet.   - C:/Ruby/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds/tiny_tds.so
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds.rb:16:in `rescue in <top (required)>'
    from C:/Ruby/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds.rb:12:in `<top (required)>'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    from C:/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
    from (irb):1
    from C:/Ruby/bin/irb:12:in `<main>'

The same behaviour was observed with:

H:\Downloads\Ruby>gem uninstall tiny_tds
Successfully uninstalled tiny_tds-0.6.1-x86-mingw32

H:\Downloads\Ruby>gem install tiny_tds-0.6.1-x86-mingw32.gem

Any help is greatly appreciated.

@luislavena
Collaborator

@dicom

The following message:

libiconv is missing.

Indicates that you need to download libiconv headers and libs.

FreeTDS is downloaded from here ...

That FreeTDS do not include development headers and libs required for compilation. You will need to build FreeTDS on your own to have these artifacts.

tiny_tds gem currently lacks support for Ruby 2.0.0 (as explained before in this thread)

Unless you're really forced to use Ruby 2.0, I strongly recommend you use Ruby 1.9.3, which doesn't require an installation of FreeTDS and will avoid you messing with these things.

@dicom
dicom commented Aug 19, 2013

@luislavena Thank you for this feedback. It is appreciated!

I had hoped to be able to move to Ruby 2.0 now after finally getting the sqlite3 gem successfully installed, but alas, it seems I'll have to stay on 1.9.3 a bit longer. I have to say, Ruby 2.0 on Windows has been a big pain so far.

@luislavena
Collaborator

I had hoped to be able to move to Ruby 2.0 now after finally getting the sqlite3 gem successfully installed

Yesterday I released version 1.3.8 which provided binaries already for Ruby 2.0

I have to say, Ruby 2.0 on Windows has been a big pain so far.

I can't say anything other than I feel your pain and point you to the release notes of RubyInstaller 2.0:

https://groups.google.com/forum/#!topic/rubyinstaller/wxEG_rMxo_g

### Important Notes

#### Ruby 2.0.0 is brand new

While officially 2.0.0 is stable, that doesn't mean all the software will
magically work on it.

Use 2.0.0 for development and verify your application, scripts and tools works
properly before deciding to run this in your production environment.

#### Existing pre-compiled gems are not Ruby 2.0 compatible

Ruby 2.0 introduces ABI breakage which means compiled C extensions with previous
1.9.3 will work with Ruby 2.0.

**DO NOT install Ruby 2.0 on top of existing Ruby 1.9.3, or try to use compiled
extensions with it.**

You will be required to force compilation of those gems:

    gem install <name> --platform=ruby

This **will require you have the extra dependencies installed** for that gem to
compile. Look at the gem documentation for the requirements.

I've tried so hard to explain this to everybody, but people simply don't read and then push a lot of hate to my inbox.

The Ruby 2.0 situation is the same it was when Ruby 1.9.2/1.9.3 appeared in the scene. ABI breakage breaks expectations and hearts.

I explained this to several people already:

sparklemotion/sqlite3-ruby#101 (comment)

I recommend you see the RubyInstaller link posted there.

You can say a lot of yak shaving was and it still involved. Even worse, independently on how much I fix things, the 64bits will still suffer if you use Bundler (see the last comment in the above issue).

Thank you for your understanding and hope this situation hasn't impacted negatively in your love for Ruby.

@dicom
dicom commented Aug 19, 2013

@luislavena I appreciate your great effort to make Ruby on Windows as enjoyable as possible. Although I understand little of the intricacies of compiling (which is why I like Ruby I guess), I do understand that it has been difficult for authors to support Windows properly for binary Ruby gems.

@bollard mentioned above that the rake-compiler gem had been updated. Does this make it (comparatively) easy to produce a tiny_tds gem which supports Ruby 2.0 now on windows?

By the way, it seems Win 64 bit support will come with Bundler 1.4, so perhaps the future will be a little bit brighter for Ruby on Windows?

@metaskills
Collaborator

mentioned above that the rake-compiler gem had been updated.
Does this make it (comparatively) easy to produce a tiny_tds gem
which supports Ruby 2.0 now on windows?

It should once I do the work of installing the mingw versions, which has given me grief before. Assuming that goes well once I find some free time, I plan on doing just that. Just been swamped lately.

@fbehrens

The incompatibility is both on x64-mingw32 and x86-mingw32 platform.
Maybe it will picked up there tjschuck/rake-compiler-dev-box#2
Let me know if I can help with testing ...

@metaskills
Collaborator

The incompatibility is both on x64-mingw32 and x86-mingw32 platform.

@fbehrens I have made a note in this project's readme that we are only 1.9.3 (or higher) with 64-bit support only. So I am only going to focus on the x64 stuff native gem.

@luislavena
Collaborator

@metaskills there is still a issue with Bundler and 64bits gems that is not solved yet. I hope that get sorted out in 1.4.0 (not yet released)

Please take a look to how we dealt with the multiple builds in sqlite3-ruby:

https://github.com/sparklemotion/sqlite3-ruby/blob/master/tasks/vendor_sqlite3.rake

That allowed us build for 1.9.3 (32bits) and 2.0.0 (both 32 and 64bits).

I also recommend using the rake-compiler-dev-box from the branch mentioned before (looking for getting that merged already)

Let me know if you have problems with that.

@metaskills
Collaborator

Good info. I was kind of hoping I could do all this from my Mac 😦 So let me see if I got this right...

  1. The RailsInstaller 1.9.3 for windows has never been 64bits? If this is true, then I need not build v0.6 versions of TinyTDS for 1.9.3 anymore?

  2. When I do build a native gem for windows for Ruby 2.0.0, I will only need to worry about 64bits since this gem is moving forward is 64bit only. So will I need to worry about what was done in SQLite?

@luislavena
Collaborator

I was kind of hoping I could do all this from my Mac

You will need to use the Vagrant VM, all covered in that pull request.

The RailsInstaller 1.9.3 for windows has never been 64bits?

There has only been a 32bits version of Ruby 1.9.3 released by RubyInstaller (and used by RailsInstaller), there is no 64bits officially released or supported.

If you still support Ruby 1.9.3 in your newer version of the gem, then you will need to build a x86-mingw32 version of the gem. Since both 32bits and 64bits versions will will have Ruby 2.0.0 support, you will need:

  • Release x86-mingw32 with 1.9.3 and 2.0.0 fat binaries
  • Release x64-mingw32 with 2.0.0 binaries

I'm not sure that I understand your second question. is TinyTDS moving to 64bits only? Then there will be no need to release x86-mingw32 (32bits gem).

Please explain because I don't understand.

@metaskills
Collaborator

is TinyTDS moving to 64bits only?

Yes, with the release of v0.6.0 we are 64bit only. I tried to explain here https://github.com/rails-sqlserver/tiny_tds#install

@metaskills
Collaborator

@luislavena I just did this successfully, does that mean I can use my Mac?

(kencollins@station) - (~/Repositories/tiny_tds) 2.0.0 master 
 ∴ rake-compiler cross-ruby VERSION=2.0.0-p0
mkdir -p /Users/kencollins/.rake-compiler/builds/ruby-2.0.0-p0
cd /Users/kencollins/.rake-compiler/sources
wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2 || curl -O http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-
... lines omitted ...
mkdir -p /Users/kencollins/.rake-compiler/sources/ruby-2.0.0-p0
cd /Users/kencollins/.rake-compiler/sources
... lines omitted ...
Updating /Users/kencollins/.rake-compiler/config.yml
Found Ruby version 1.9.3 (/Users/kencollins/.rake-compiler/ruby/ruby-1.9.3-p194/lib/ruby/1.9.1/i386-mingw32/rbconfig.rb)
Found Ruby version 2.0.0 (/Users/kencollins/.rake-compiler/ruby/ruby-2.0.0-p0/lib/ruby/2.0.0/i386-mingw32/rbconfig.rb)
@luislavena
Collaborator

@metaskills then you will have to remove i386-mingw32 from the platform and instead use x64-mingw32 (with proper Ruby cross-compiled).

That means there is no 32bits version of the gem neither... hmn, unsure what was the plan or if there is a real limitation that triggered this.

Feel free to email me with details so I better understand.

@metaskills
Collaborator

hmn, unsure what was the plan or if there is a real limitation that triggered this

It was more of a personal limitation and it felt right at the time. Other than the limitation of Windows users which I am fixing now and older versions support, there did not seem much reason to keep all the 32-bit code in since I never tested it anyway. FWIW, it was this commit.

87365c4

@luislavena
Collaborator

@metaskills I don't know what version of cross-compiler you have installed, so I can't tell you if the 1.9.3 compiled extension and static library of freetds will work against the real 1.9.3 version in Windows.

Other than the limitation of Windows users which I am fixing now and older versions support, there did not seem much reason to keep all the 32-bit code in since I never tested it anyway

Still don't understand. Ruby 1.8.7 and 1.9.3 are 32bits versions of Ruby, what you have released until today has been targeting 32bits Ruby.

What you're saying is that you've never tested that. At least, that is how I understand it.

By removing the 32bits support you mention will limit your gem availability exclusively to x64-mingw32 (which is not the version of Ruby you just compiled).

It is worth to mention that Ruby 1.9.3 and 32bits things are two separate things (but shown as 1 single thing in your commit)

One is drop Ruby 1.8 support, which is fine, the other is limit the compilation ability of your project to only 64bits capable compilers.

Please pardon my stubbornness, but while I understand time and personal things be the limitation, do not understand the real logic behind the move.

By limiting to 64bits versions (x64-mingw32) you're leaving out all the other Ruby 2.0 users too. Right now Ruby 2.0 is having a real (really) bad situation with a lot of gems and this will make things more complicated.

@metaskills
Collaborator

Still don't understand.

I did say in that commit was removing both 1.8.7 and 32-bit, but I know that those are individual concerns. It just so happens that I did them at the same time. Based on your feedback, I will put 32-bit support back in.

@fbehrens

@luislavena the bundler issue with x86 / x64 windows platform will be in fixed in 1.4, bundler/bundler#2604
@metaskills 👍 Thank you both

@dicom
dicom commented Aug 21, 2013

@metaskills For what it's worth, I would be extremely happy if you keep 32 bit support for tiny_tds, as otherwise, I will not be able to upgrade to Ruby 2.0 in my work environment (which is going to be a real bummer).

@metaskills
Collaborator

Seems 32bit is just fine. All the code that was pulled was Ruby 1.8 only and only how Ruby 1.8 32bit worked on different platforms.

@metaskills
Collaborator

Please take a look to how we dealt with the multiple builds in sqlite3-ruby:
https://github.com/sparklemotion/sqlite3-ruby/blob/master/tasks/vendor_sqlite3.rake

That allowed us build for 1.9.3 (32bits) and 2.0.0 (both 32 and 64bits). I also recommend
using the rake-compiler-dev-box from the branch mentioned before (looking for getting
that merged already)

@luislavena I see that the rake-compiler-dev-box branch has been merged into master. I am going to start the process off to do exactly what you recommended to build for 1.9.3 (32bits) and 2.0.0 (both 32 and 64bits). Just wanted to throw that out in case I hit a wall soon.

@metaskills
Collaborator

@luislavena or @fbehrens A few questions:

  1. Do I use the ./package_win32_fat_binary.sh script? If so, does it matter that it has 1.8.7? in it? Should I edit it to use 1.9.3 and remove 1.8.7 from the RUBY_CC_VERSION?

  2. Is there anything I need to do to my own ports file? @luislavena said they made changes to the sqlite3 gem, but I could not distinguish any action items from it.

@metaskills
Collaborator

I made these changes to my local repo of rake-compiler-dev-box.
https://gist.github.com/metaskills/6395946

@metaskills
Collaborator

Closing this issue in favor of issue/pr #135 Will report my attempts and request for help there.

@metaskills metaskills closed this Aug 31, 2013
@Eric-Guo

@metaskills I'm still suffer loading error with Ruby 2.0, I guess it cause the ABI break at 2.0, but failed to resolved it by compile the tiny_tds myself, so can you release a 0.6.2 or point out some document how to compile my self under windows?

C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds.rb:16:in `require': 126: The specified module could not be found.   - C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds/tiny_tds.so (LoadError)
@metaskills
Collaborator

so can you release a 0.6.2

We need to resolve #135 and everything will be done.

@sevk
sevk commented Jan 21, 2014

C:\Documents and Settings\Administrator>ruby -v
ruby 2.0.0p353 (2013-11-22) [i386-mingw32]

C:\Documents and Settings\Administrator>gem install tiny_tds
Successfully installed tiny_tds-0.6.1-x86-mingw32
Parsing documentation for tiny_tds-0.6.1-x86-mingw32
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/tiny_tds/tiny_tds.so,
skipping
1 gem installed






C:\Documents and Settings\Administrator>ruby -rtiny_tds -e '1'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `r
equire': 126: The specified module could not be found.   - C:/Ruby200/lib/ruby/g
ems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds/tiny_tds.so (LoadError)
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:51:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/
tiny_tds.rb:16:in `rescue in <top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/
tiny_tds.rb:12:in `<top (required)>'
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:116:in `require'
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:116:in `rescue in require'
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:122:in `require'

C:\Documents and Settings\Administrator>


@CodeInsider

The error occurs in parsing the documentation. If you want to skip the docs, just add --no-ri --no-rdoc to your gem install command.

@sevk
sevk commented Feb 10, 2014

C:\Documents and Settings\Administrator>gem install tiny_tds --no-ri --no-rdoc
Fetching: tiny_tds-0.6.1-x86-mingw32.gem (100%)
Successfully installed tiny_tds-0.6.1-x86-mingw32
1 gem installed 


C:\Documents and Settings\Administrator>ruby -rtiny_tds -e '1'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `r
equire': 126: The specified module could not be found.   - C:/Ruby200/lib/ruby/g
ems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds/tiny_tds.so (LoadError)
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:51:in `require'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/
tiny_tds.rb:16:in `rescue in <top (required)>'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/
tiny_tds.rb:12:in `<top (required)>'
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:116:in `require'
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:116:in `rescue in require'
        from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:122:in `require'

C:\Documents and Settings\Administrator>

@Eric-Guo

@sevk then you meet same problem as me :-)

@jbutton
jbutton commented Mar 18, 2014

@sevk @Eric-Guo any luck with that? I'm struggling with the same /tiny_tds.so (LoadError)

@sevk
sevk commented Mar 19, 2014

at windows , ruby2.0 is broken , and devkit-64-64 is broken too .
so I use linux .

@fatim
fatim commented Mar 21, 2014

I'm struggling with the same /tiny_tds.so (LoadError).

@vaguilera

Still no solution?
I can't install tiny_tds on windows with ruby 2.0 32bits yet :(

@wbond
Collaborator
wbond commented Oct 6, 2014

@vaguilera tiny_tds 0.6.2 with precompiled Windows gems was released back in June I believe. Should work fine. If you are having trouble, perhaps open a new issues with as much info as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment