SQlite3-Ruby Windows Builds
So, I’ve got a new sqlite3-ruby release pending (just a minor bug fix, is all), but I’ve learned my lesson about releasing a new version without a windows version pre-built.
The problem is, I’m not a Windows guy. My build environment for Windows is cobbled together and painful to use, when it works at all. I’ve decided that I won’t put myself through that pain anymore.
If you are a developer on Windows, and you have a sqlite3 build environment, and would be willing to compile the sqlite3-ruby extension for me, please do the following:
- Add a comment to this post, indicating your name, and what platform you would be willing to build for (cygwin, native windows, whatever. I don’t even know the right names.)
- Reload the page, and make sure no one commented before you, claiming those platforms.
- Grab the latest version of sqlite3-ruby here: http://github.com/jamis/sqlite3-ruby/tree/master.
- Build the extension, and email it to me at jamis at 37signals dot com.
Once I have a build of sqlite3-ruby for windows, I’ll release the new gem. (It amazes me how painful Windows makes this process. Mac OS X, Linux, BSD, etc. —you just gem install and build the source. No such luck in the Windows realm, apparently.)
I’m already worked on make your life more easy on this subject:
I didn’t have the time to completely implement a fix for sqlite3-ruby gem, but got it working and build with the project in a couple of hours.
removed the swig generation from the extconf since it forces the generation of the .c file every time, not only on Windows.
Already forked your project, need to find the time to iron those details.
On the painful note, let me remind you is not as easy you mention, you still need to building tools, the development headers and the library and headers of the gem you’re installing, and of course, in case of mysql as example, having mysql_config or mysql_config5 in the path.
With proper build process I never had all these problems you guys keep describing, dunno why.
6 Dec 2008
Janmis: I think it is a good idea, letting more platform oriented/binded people to do the painful job so you can focus on the ruby lib.
Luis: You did an amazing work with that compiler library (rubyinstaller is great too). I think we either need a windows build server (like the Java guys) or we should know exactly the build tool set available for the standard developer machines.
7 Dec 2008
This reminds me of big announcement from Perl only a few days ago: Microsoft is giving every CPAN author access to a hosted virtual server providing all versions of windows.
Add this to their release that bundles windows development files with Perl(aka Strawberry Perl) and you have a great situation for proper windows modules to exist in.
7 Dec 2008
yaanno: rake-compiler can do cross-compilation:
Rake::ExtensionTask.new(‘sqlite3_api’) do |ext| ext.cross_compile = true end
And then you get:
rake cross compile
Add now the gem spec as second parameter, and you get a gem for Windows:
rake cross native gem
The only missing piece is download the headers and libs for Windows, but Jonathan Scott did it for DataObjects:
No need to do it exactly like that, but it’s automated ;-)
So, then you end no needing Windows at all, and people can stop ranting.
Then, we can focus in world peace…
7 Dec 2008
Bravo on dropping Microsoft Windows support. I’m sure it won’t be a popular decision, but it makes the world that little bit better for the rest of us.
7 Dec 2008
@Kragen: troll? I don’t think he said he’s dropping Windows support, just that he’s not making it a priority.
7 Dec 2008
@Bork: I don’t understand why you would stoop to vicious name-calling at your first contact with me, but I wasn’t trolling. I was responding to Jamis’s slightly more recent post about Capistrano at http://groups.google.com/group/capistrano/msg/f5213577eaeadc47 — I would have emailed him directly, but I don’t have his email address. He said:
“Microsoft may be an 800lb gorilla, but it’s not my gorilla…
“Now, if you’re stuck in Windows by corporate policy, you have my sympathy. But I’m still not budging on this issue. I will not break my back or my sanity on Windows troubleshooting any more.
“On the other hand, if you’re stuck in Windows by choice, you don’t even have my sympathy. :) It is to YOU that I’m speaking, directly, when I say that if you want Capistrano on Windows, then it’s your responsibility to do something about it.”
I think that’s a courageous move that is likely to win Jamis some enemies, but will make life better for everyone. Hopefully he’ll apply the same policy to SQLite3-Ruby too.
8 Dec 2008
@Luis, that sounds like a neat long-term solution. I’m not entirely clear though: are you volunteering to build sqlite3-ruby for me, or are you suggesting I use rake-compiler myself to do it?
9 Dec 2008
Jamis, I would be more than happy to do this for you. I’m a hobbyist Ruby/Rails developer running Windows. The thing is that I do not know exactly how to do point four. If you’re not describing the process in details because you don’t know how it’s done on Windows, I (ahem) suggest you find someone else… :)
9 Dec 2008
@David, yeah, when I was building the windows extension for it, it was a painful, tedious process of making sure I had sqlite3 installed with the dev libraries, figuring out how to link against those libraries and the ruby libraries, and figuring out how to build a dll.
All of which was (did I mention?) painful. :/ I don’t know the process well enough to explain it to someone, though, so I’ll just sit tight. Thanks, though.
9 Dec 2008
@Jamis: I’m not saying that I can, but neither that I can’t.
I have my hands full with current and new One-Click Installer for Windows, but maybe a 4 hours hacking at the airport this weekend can help you out.
Just released rake-compiler to ease the burden from me being injecting some sanity in several open source projects.
If I decide move forward, fork it, introduce what I think are needed fixes to make the build, test and release process of the project easy for both sides, you will still need to officially merge those changes.
Even more, for me to be able to release gems for Windows, I’ll need to be part of the project at rubyforge, since gems at github cannot be released simultaneously with binaries.
In any of the above cases, you will need to be more responsive, so this is a step back on your “I’m not taking care anymore” statement.
I know you’re doing this as part of your contribution or whatever, but if I invest any time, I want it to be respected and taken in consideration.
With this I meant to say that patches, like I did for this and other projects cannot sit in a RubyForge ticket for 3 months getting dust.
So, if you feel that what I propose is still be a burden, I don’t know what else can be done.
10 Dec 2008
@Luis, thanks for the clarification. I just wasn’t sure if you were volunteering, or merely sharing a useful tip.
As for “patches…cannot sit in a Rubyforge ticket for 3 months getting dust,” why not? What harm did it do to wait 3 months for them to be applied? They were eventually applied, and a new release was made. No one was harmed. It’s not a big deal.
But if that bothers you, that’s fine. You’re certainly never obligated to submit patches.
All I’m asking, here, is for someone to build a binary for sqlite3-ruby trunk, so that I can bundle a gem and release. Once someone gets it to me, I guarantee I’ll have a new sqlite3-ruby release either that day, or the next.
If no one steps up and volunteers in another couple of days, I’m going to just release the gem without a windows version pre-built. Not a big deal, except for windows users.
10 Dec 2008
@Jamis, the problem with the ‘sitting 3 months in rubyforge’ is because I’ve seen releasing happening while these patches are needed to build the Windows version of these gems.
That becomes a big deal.
Also, your process of building the gem is not bullet proof, which I’ll prefer a more agnostic approach (which I standardized in rake-compiler). So anyone, Windows or Linux or OSX user can build the gem outside your box or mine.
Can you wait a couple of days? I’m taking a flight on the weekend, when I’ll be able to work on this.
From that statement you can see I’m volunteering, but I’ll prefer automate the process and do it once than do a crappy on-the-rush release from my side.
11 Dec 2008
@Luis, if you’re volunteering, I’ll wait as long as necessary. As for the other, if I released a gem while your tickets were languishing, then that is indeed my fault by my my failure to check the ticket list in RubyForge prior to releasing.
I’m not a release manager. Frankly, I suck as a release manager. But I do the best I can. I apologize if you were offended by my poor performance as a release manager. I can only say that I’ll try to do better.
11 Dec 2008
I’m a windows user and a newbie Rails developer. I have alot of problems with sqlite3. Yeah Windows makes this extremely painful, so i am using the mysql gem and adapter instead.
23 Dec 2008
Jamis – This has NOTHING to do with this topic but your blog won’t let someone leave comments on old posts.
Please contact me using the provided e-mail address about possibly getting your old generator files to be used again.
None of the links to any of them work because that host is long gone and I haven’t found any tools as useful as those.
We can talk but I’d like to make them available again on my website.
Sorry for the digression. Please continue with your discussion.
18 Jan 2009