Gem 0.9.2: undefined symbol: mtde_create


#1

Upon opening an existing index after upgrading to the 0.9.2 ferret gem
I get the following error: undefined symbol: mtde_create. Here’s an
irb transcript which recreates the error:

irb(main):011:0> index = Index::Index.new({:path =>
‘/home/srackham/bin/ff_index’})
=> #Ferret::Index::Index:0xb7be7590
irb(main):012:0> index.search_each(‘rails’)
irb: relocation error:
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.9.2/lib/ferret_ext.so:
undefined symbol: mtde_create

The gem install went smoothly:

gem update

:
:
make install
/usr/bin/install -c -m 0755 ferret_ext.so
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.9.2/lib
Successfully installed ferret-0.9.2
Installing RDoc documentation for ferret-0.9.2…
Gems: [ferret] updated

I double checked ./ext/gem_make.out to verify the ferret_ext.so
compile – there were no errors or warnings.

A bit of poking around in the 0.9.1 gem realease indicates that the
mtde_create() function is in termdocs.c, but there is no termdocs.c
(or any other source file defining mtde_create) in the gem
ferret-0.9.2/ext directory.

Any ideas as to what I’m missing?

Cheers, Stuart


#2

i’m getting a similar error…0.9.2 is the first version i’ve ever
tried, though, so it’s not just a problem with existing indices.

Stuart R. wrote:

Upon opening an existing index after upgrading to the 0.9.2 ferret gem
I get the following error: undefined symbol: mtde_create. Here’s an
irb transcript which recreates the error:

irb(main):011:0> index = Index::Index.new({:path =>
‘/home/srackham/bin/ff_index’})
=> #Ferret::Index::Index:0xb7be7590
irb(main):012:0> index.search_each(‘rails’)
irb: relocation error:
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.9.2/lib/ferret_ext.so:
undefined symbol: mtde_create


#3

Hi Stuart,

Apologies and thanks for pointing this out. I’ve just 0.9.2. In case
you are interested, here is how the file got left out. I have an
exclusion rule on my package FileList that looks like this;

 PKG_FILES.exclude('**/*.o')

Unfortunately Rakes FileList translates this to a regular expression
by using a Dir[pat] like so;

Dir[pat].each do |p| ignores << p end
re_str = ignores.collect { |p| "(" + p.to_s + ")" }.join("|")

Which turns into a regular expression which inludes this;

/ ... |(ext/term.o)| ... /

Which of course unfortunately matches ext/termdocs.c.

Cheers,
Dave