Upgrading Typo 1
At the risk of becoming a blog about maintaining a blog, I just wanted to make a quick note on how easy it is to keep this software up-to-date (which is important given the security holes found in Rails this week.)
- sudo gem update -y
- typo install TYPO_INSTALL_LOCATION
Now, perhaps it would be nice if “install” had an alias like “upgrade” so you didn’t have to get that sinking-feeling-in-the-stomach for even a moment, but in the end, no biggee.
Soon, I shall blog about something other than blog software.
Getting typo installed under debian
Installing typo on my OS X box was a breeze (assuming one already had rails installed, etc. etc.).
However, when I went to install it on my linux vhost running Debian 3.1, I ran into a few issues.
First, I had to sudo gem install mkmf.
Then I got this error
checking for sqlite3.h... no
And then a bunch of banging-head-against-the-wall ensued because after googling and discovering I need to do:
sudo apt-get install sqlite3 libsqlite3-dev
I then got this error:
checking for sqlite3_open() in -lsqlite3... no
So I looked in the logs:
less /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ext/sqlite3_api/mkmf.log)
for more detail. It seemed to indicate that the sqlite3 lib didn’t have sqlite3_open in it. An objdump of the lib revealed that to be untrue. The actual errors of note in the file were:
conftest.c: In function `t':
conftest.c:4: warning: implicit declaration of function `sqlite3_open'
/usr/lib/libc_nonshared.a(elf-init.oS)
(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
/tmp/cci4MfWc.o
(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0):
/tmp/sqlite3-ruby-1.1.0/conftest.c:3: first defined here
collect2: ld returned 1 exit status
After typing a bunch of stuff by hand, I realized that my rbconfig.rb was gashmongled. Specifically, -fPIC was declared too many times and that was producing another error (too many thunks), which was the actual error to care about in the log.
sudo vim /usr/lib/ruby/1.8/i486-linux/rbconfig.rb
look for -fPIC on the cflags line and remove it.
Then, and only then, does
sudo gem install typo
actually run to completion. Ahhhhh…
(As an aside, during this process, I ended up installing my own version of sqlite3, but I don’t know if that was necessary).