{"action":"created","issue":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/207","labels_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/207/comments","events_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/207/events","html_url":"https://github.com/rails-sqlserver/tiny_tds/pull/207","id":95405531,"number":207,"title":"Refactor build of freetds and iconv recipes and add OpenSSL.","user":{"login":"larskanis","id":176234,"avatar_url":"https://avatars.githubusercontent.com/u/176234?v=3","gravatar_id":"","url":"https://api.github.com/users/larskanis","html_url":"https://github.com/larskanis","followers_url":"https://api.github.com/users/larskanis/followers","following_url":"https://api.github.com/users/larskanis/following{/other_user}","gists_url":"https://api.github.com/users/larskanis/gists{/gist_id}","starred_url":"https://api.github.com/users/larskanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larskanis/subscriptions","organizations_url":"https://api.github.com/users/larskanis/orgs","repos_url":"https://api.github.com/users/larskanis/repos","events_url":"https://api.github.com/users/larskanis/events{/privacy}","received_events_url":"https://api.github.com/users/larskanis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-16T10:38:56Z","updated_at":"2015-07-21T17:38:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/pulls/207","html_url":"https://github.com/rails-sqlserver/tiny_tds/pull/207","diff_url":"https://github.com/rails-sqlserver/tiny_tds/pull/207.diff","patch_url":"https://github.com/rails-sqlserver/tiny_tds/pull/207.patch"},"body":"extconf.rb now checks for availability of freetds, with a fallback to the bundled mini_portile recipes.\r\n\r\nThis allows native build on Windows with download and compilation of all dependent libraries. This also adds a appveyor config for ci-testing of the native build. However [not all tests pass, so far](https://ci.appveyor.com/project/larskanis/tiny-tds). Unfortunately I don't have the experience with MSSQL to fix this.\r\n\r\nFor building windows binary gems this makes the switch to the new rake-compiler-dock. As described in the README, Windows binary gems can be built per `rake gem:windows`. I tested the build on Windows and Linux and the resulting gems on Windows 7 with Ruby-2.2.2-x86 and Ruby-2.2.2-x64.\r\n\r\nThe mini_portile recipes are changed, now, to build shared libraries. This decreases the fat binary Windows gem from around 7 MB to 2.5 MB, compared to a static build. To avoid any version mismatches with OpenSSL, I used a more specific naming scheme for OpenSSL dlls. This should avoid any contact with the DLL hell.\r\n\r\nWith shared libraries checking for iconv should not be necessary. That's why I removed it.\r\n\r\nThis fixes issues #200, #75 and hopefully helps for #196.\r\n\r\nAs a further extension, it might be useful to include the stable freetds sources into the gem (like nokogiri). This could help for offline installations."},"comment":{"url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/comments/123411695","html_url":"https://github.com/rails-sqlserver/tiny_tds/pull/207#issuecomment-123411695","issue_url":"https://api.github.com/repos/rails-sqlserver/tiny_tds/issues/207","id":123411695,"user":{"login":"larskanis","id":176234,"avatar_url":"https://avatars.githubusercontent.com/u/176234?v=3","gravatar_id":"","url":"https://api.github.com/users/larskanis","html_url":"https://github.com/larskanis","followers_url":"https://api.github.com/users/larskanis/followers","following_url":"https://api.github.com/users/larskanis/following{/other_user}","gists_url":"https://api.github.com/users/larskanis/gists{/gist_id}","starred_url":"https://api.github.com/users/larskanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larskanis/subscriptions","organizations_url":"https://api.github.com/users/larskanis/orgs","repos_url":"https://api.github.com/users/larskanis/repos","events_url":"https://api.github.com/users/larskanis/events{/privacy}","received_events_url":"https://api.github.com/users/larskanis/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T17:38:08Z","updated_at":"2015-07-21T17:38:08Z","body":"> I'm :-1: on switching to something that's based on boot2docker, because on Windows instead of using vagrant as RCDB does, it's hardcoded to use virtualbox for some reason.\r\n\r\nNot really. It depends only on docker and as the most common solution for docker on Windows and OS-X, it has some direct support for boot2docker in addition. However it works on Vagrant, equally. You're using rake-compiler-dev-box on Hyper-V? If I understand correctly, Windows-8.1 forces to use Hyper-V. Could it be a solution, that rake-compiler-dock supports Vagrant and therefore Hyper-V, equally to boot2docker?\r\n\r\n> I don't exactly understand why your mini_portile recipe changes change the size of the fat gems for you. When I build with RCDB they're only ~2.5MB.\r\n\r\nThis is without OpenSSL. I first linked everything statically and got gems with more than 7 MB. This is because freetds, OpenSSL and iconv are stored 3 or 4 times within the same gem. Therefore I switched to using shared libraries for freetds, OpenSSL and iconv. Gems are then 2.1 and 2.4 MB in size.\r\n"}}