Hi, I am getting a number of segmentation faults using Ferret 0.9.5, Fedora Core 5 and Ruby 1.8.4 I installed it with the recommended gem install ferret and example segmentation fault creation line would be as follows: @records = FerretConfig::INDEX.search("address_line_2:\"Dumbarton\"") I am also using acts_as_ferret and rails 1.15 but think this is an issue with ferret. Any ideas? Cheers, Alastair -- Posted via http://www.ruby-forum.com/.
Hi Alastair! On Tue, Aug 15, 2006 at 01:55:37PM +0200, Alastair Brunton wrote:> Hi, > > I am getting a number of segmentation faults using Ferret 0.9.5, Fedora > Core 5 and Ruby 1.8.4 > > I installed it with the recommended gem install ferret > > and example segmentation fault creation line would be as follows: > > @records = FerretConfig::INDEX.search("address_line_2:\"Dumbarton\"")we''ll need some more info to sort this out. Did you succeed in creating an index, that is, is there at least a file called segments and one or more other files in the index directory ? If yes, do other queries succeed ?> I am also using acts_as_ferret and rails 1.15 but think this is an issue > with ferret.nothing to do with Ferret, but you should really upgrade to Rails 1.1.6. regards, Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
Jens Kraemer wrote:> Hi Alastair! > > On Tue, Aug 15, 2006 at 01:55:37PM +0200, Alastair Brunton wrote: >> Hi, >> >> I am getting a number of segmentation faults using Ferret 0.9.5, Fedora >> Core 5 and Ruby 1.8.4 >> >> I installed it with the recommended gem install ferret >> >> and example segmentation fault creation line would be as follows: >> >> @records = FerretConfig::INDEX.search("address_line_2:\"Dumbarton\"") > > we''ll need some more info to sort this out. Did you succeed in creating > an index, that is, is there at least a file called segments and one or > more other files in the index directory ? > If yes, do other queries succeed ? > >> I am also using acts_as_ferret and rails 1.15 but think this is an issue >> with ferret. > > nothing to do with Ferret, but you should really upgrade to Rails 1.1.6. > > regards, > Jens > > -- > webit! Gesellschaft f?r neue Medien mbH www.webit.de > Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de > Schnorrstra?e 76 Tel +49 351 46766 0 > D-01069 Dresden Fax +49 351 46766 66Sorry for duplicating the post. I have the gem 0.9.5 and demo trunk on Fedorr Core 5. Initially I had Seg Faults on the gem. I fixed it using -0s in the CFLAG. and making sure I have the right libs. Now when I run rake in demo app I get seg fault again. :( $rake --trace (in /home/ajagra/dev/src/demo) ** Invoke default (first_time) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke db:test:clone (first_time) ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Invoke test:functionals (first_time) ** Invoke db:test:prepare ** Execute test:functionals /usr/bin/ruby -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" "test /functional/content_controller_test.rb" Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader Started ....../home/ajagra/dev/src/demo/config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:437: [ BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i386-linux] rake aborted! Test failures /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/testing.rake:35 /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/bin/rake:18 AJ -- Posted via http://www.ruby-forum.com/.
Hi Jens, I am actually running 1.1.6 sorry! I can install the gem fine (there are no errors in install) and can create and add documents to an index. The segmentation faults occur when interacting with the index. Commands such as query_delete, search and search_each cause segmentation faults. Any tips on rebuilding or is it possible to use a prebuilt generic binary? Cheers, Alastair -- Posted via http://www.ruby-forum.com/.
Alastair Brunton wrote:> Hi Jens, > > I am actually running 1.1.6 sorry! > > I can install the gem fine (there are no errors in install) and can > create and add documents to an index. > > The segmentation faults occur when interacting with the index. Commands > such as query_delete, search and search_each cause segmentation faults. > > Any tips on rebuilding or is it possible to use a prebuilt generic > binary? > > Cheers, > AlastairLooking through the mailing list is looks as though a few people are having problems building the gem on Fedora Core 5. I see it is possible to change the CFLAGS to -Os instead of -O0. When changing it is preferable to use the 0.9.5 gem or the svn trunk? I followed the instructions for rebuilding from the gem and from the trunk but havent managed to rebuild it successfully. When following the instructions I cant get it to build from the trunk and get the following error: ic -fasynchronous-unwind-tables -Wall -fPIC -fno-common -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I/home/al/ferret/ext -c r_term.cterm.c:204: warning: implicit declaration of function ?rb_define_method? In file included from r_term.c:1:it? undeclared (first use in this function) ferret.h:4:20: error: global.h: No such file or directorye in this function) ferret.h:5:21: error: hashset.h: No such file or directoryst use in this function) ferret.h:6:22: error: document.h: No such file or directory this function) In file included from r_term.c:1:? undeclared (first use in this function) ferret.h:9: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?id_new? ferret.h:10: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?id_call? ferret.h:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?id_is_directory? ferret.h:14: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mFerret? ferret.h:15: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mAnalysis? ferret.h:16: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mDocument? ferret.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mIndex? ferret.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mSearch? ferret.h:19: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mStore? ferret.h:20: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mStringHelper? ferret.h:21: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mUtils? ferret.h:22: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?mSpans? ferret.h:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?cDirectory? ferret.h:37: error: expected declaration specifiers or ?...? before ?VALUE? ferret.h:40: error: expected declaration specifiers or ?...? before ?VALUE? ferret.h:45: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?object_get? ferret.h:46: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_data_alloc? ferret.h:47: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_get_doc? ferret.h:49: error: expected ?)? before ?rpath? ferret.h:50: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_hs_to_rb_ary? r_term.c:2:19: error: index.h: No such file or directory r_term.c:4: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?cTerm? r_term.c:12: error: expected specifier-qualifier-list before ?VALUE? r_term.c: In function ?frt_term_mark?: r_term.c:20: warning: implicit declaration of function ?rb_gc_mark? r_term.c:20: error: ?RTerm? has no member named ?field? r_term.c:21: error: ?RTerm? has no member named ?text? r_term.c: At top level: r_term.c:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_alloc? r_term.c:35: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_init? r_term.c:44: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_get_rterm? r_term.c:52: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token r_term.c:61: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token r_term.c:80: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_get_text? r_term.c:87: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_set_text? r_term.c:95: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_get_field? r_term.c:102: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_set_field? r_term.c:110: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_to_s? r_term.c: In function ?frt_term_cmp?: r_term.c:128: warning: implicit declaration of function ?rb_str_cmp? r_term.c:128: error: ?RTerm? has no member named ?field? r_term.c:128: error: ?RTerm? has no member named ?field? r_term.c:130: error: ?RTerm? has no member named ?text? r_term.c:130: error: ?RTerm? has no member named ?text? r_term.c: At top level: r_term.c:136: error: expected ?)? before ?self? r_term.c:145: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_lt? r_term.c:151: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_gt? r_term.c:157: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_le? r_term.c:163: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_ge? r_term.c:169: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_eq? r_term.c:178: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_compare_to? r_term.c:184: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?frt_term_hash? r_term.c: In function ?Init_term?: r_term.c:200: error: ?cTerm? undeclared (first use in this function) r_term.c:200: error: (Each undeclared identifier is reported only once r_term.c:200: error: for each function it appears in.) r_term.c:200: warning: implicit declaration of function ?rb_define_class_under? r_term.c:200: error: ?mIndex? undeclared (first use in this function) r_term.c:200: error: ?rb_cObject? undeclared (first use in this function) r_term.c:201: warning: implicit declaration of function ?rb_define_alloc_func? r_term.c:201: error: ?frt_term_alloc? undeclared (first use in this function) r_term.c:202: warning: implicit declaration of function ?rb_include_module? r_term.c:202: error: ?rb_mComparable? undeclared (first use in this function) r_term.c:204: warning: implicit declaration of function ?rb_define_method? r_term.c:204: error: ?frt_term_init? undeclared (first use in this function) r_term.c:206: error: ?frt_term_to_s? undeclared (first use in this function) r_term.c:207: error: ?frt_term_compare_to? undeclared (first use in this function) r_term.c:208: error: ?frt_term_lt? undeclared (first use in this function) r_term.c:209: error: ?frt_term_gt? undeclared (first use in this function) r_term.c:210: error: ?frt_term_le? undeclared (first use in this function) r_term.c:211: error: ?frt_term_ge? undeclared (first use in this function) r_term.c:212: error: ?frt_term_eq? undeclared (first use in this function) r_term.c:214: error: ?frt_term_get_text? undeclared (first use in this function) r_term.c:215: error: ?frt_term_set_text? undeclared (first use in this function) r_term.c:216: error: ?frt_term_get_field? undeclared (first use in this function) r_term.c:217: error: ?frt_term_set_field? undeclared (first use in this function) r_term.c:218: error: ?frt_term_hash? undeclared (first use in this function) make: *** [r_term.o] Error 1 ---------- The commands were ruby setup.rb config cd ext [change CFLAG from -O0 to -Os] in Makefile make Any help would be much appreciated as I am desparate to get it installed successfully. Thanks, Alastair. -- Posted via http://www.ruby-forum.com/.
On 8/17/06, Alastair Brunton <thepyrat at gmail.com> wrote:> Alastair Brunton wrote: > > Hi Jens, > > > > I am actually running 1.1.6 sorry! > > > > I can install the gem fine (there are no errors in install) and can > > create and add documents to an index. > > > > The segmentation faults occur when interacting with the index. Commands > > such as query_delete, search and search_each cause segmentation faults. > > > > Any tips on rebuilding or is it possible to use a prebuilt generic > > binary? > > > > Cheers, > > Alastair > > Looking through the mailing list is looks as though a few people are > having problems building the gem on Fedora Core 5. I see it is possible > to change the CFLAGS to -Os instead of -O0. > > When changing it is preferable to use the 0.9.5 gem or the svn trunk? I > followed the instructions for rebuilding from the gem and from the trunk > but havent managed to rebuild it successfully. > > When following the instructions I cant get it to build from the trunk > and get the following error: > > ic -fasynchronous-unwind-tables -Wall -fPIC -fno-common -I. > -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux > -I/home/al/ferret/ext -c r_term.cterm.c:204: warning: implicit > declaration of function ?rb_define_method? > In file included from r_term.c:1:it? undeclared (first use in this > function) > ferret.h:4:20: error: global.h: No such file or directorye in this > function) > ferret.h:5:21: error: hashset.h: No such file or directoryst use in this > function) > ferret.h:6:22: error: document.h: No such file or directory this > function) > In file included from r_term.c:1:? undeclared (first use in this > function) > ferret.h:9: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?id_new? > ferret.h:10: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?id_call? > ferret.h:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?id_is_directory? > ferret.h:14: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mFerret? > ferret.h:15: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mAnalysis? > ferret.h:16: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mDocument? > ferret.h:17: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mIndex? > ferret.h:18: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mSearch? > ferret.h:19: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mStore? > ferret.h:20: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mStringHelper? > ferret.h:21: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mUtils? > ferret.h:22: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?mSpans? > ferret.h:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?cDirectory? > ferret.h:37: error: expected declaration specifiers or ?...? before > ?VALUE? > ferret.h:40: error: expected declaration specifiers or ?...? before > ?VALUE? > ferret.h:45: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?object_get? > ferret.h:46: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_data_alloc? > ferret.h:47: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_get_doc? > ferret.h:49: error: expected ?)? before ?rpath? > ferret.h:50: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_hs_to_rb_ary? > r_term.c:2:19: error: index.h: No such file or directory > r_term.c:4: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?cTerm? > r_term.c:12: error: expected specifier-qualifier-list before ?VALUE? > r_term.c: In function ?frt_term_mark?: > r_term.c:20: warning: implicit declaration of function ?rb_gc_mark? > r_term.c:20: error: ?RTerm? has no member named ?field? > r_term.c:21: error: ?RTerm? has no member named ?text? > r_term.c: At top level: > r_term.c:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_alloc? > r_term.c:35: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_init? > r_term.c:44: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_get_rterm? > r_term.c:52: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?*? token > r_term.c:61: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?*? token > r_term.c:80: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_get_text? > r_term.c:87: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_set_text? > r_term.c:95: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_get_field? > r_term.c:102: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_set_field? > r_term.c:110: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_to_s? > r_term.c: In function ?frt_term_cmp?: > r_term.c:128: warning: implicit declaration of function ?rb_str_cmp? > r_term.c:128: error: ?RTerm? has no member named ?field? > r_term.c:128: error: ?RTerm? has no member named ?field? > r_term.c:130: error: ?RTerm? has no member named ?text? > r_term.c:130: error: ?RTerm? has no member named ?text? > r_term.c: At top level: > r_term.c:136: error: expected ?)? before ?self? > r_term.c:145: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_lt? > r_term.c:151: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_gt? > r_term.c:157: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_le? > r_term.c:163: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_ge? > r_term.c:169: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_eq? > r_term.c:178: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_compare_to? > r_term.c:184: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? > before ?frt_term_hash? > r_term.c: In function ?Init_term?: > r_term.c:200: error: ?cTerm? undeclared (first use in this function) > r_term.c:200: error: (Each undeclared identifier is reported only once > r_term.c:200: error: for each function it appears in.) > r_term.c:200: warning: implicit declaration of function > ?rb_define_class_under? > r_term.c:200: error: ?mIndex? undeclared (first use in this function) > r_term.c:200: error: ?rb_cObject? undeclared (first use in this > function) > r_term.c:201: warning: implicit declaration of function > ?rb_define_alloc_func? > r_term.c:201: error: ?frt_term_alloc? undeclared (first use in this > function) > r_term.c:202: warning: implicit declaration of function > ?rb_include_module? > r_term.c:202: error: ?rb_mComparable? undeclared (first use in this > function) > r_term.c:204: warning: implicit declaration of function > ?rb_define_method? > r_term.c:204: error: ?frt_term_init? undeclared (first use in this > function) > r_term.c:206: error: ?frt_term_to_s? undeclared (first use in this > function) > r_term.c:207: error: ?frt_term_compare_to? undeclared (first use in this > function) > r_term.c:208: error: ?frt_term_lt? undeclared (first use in this > function) > r_term.c:209: error: ?frt_term_gt? undeclared (first use in this > function) > r_term.c:210: error: ?frt_term_le? undeclared (first use in this > function) > r_term.c:211: error: ?frt_term_ge? undeclared (first use in this > function) > r_term.c:212: error: ?frt_term_eq? undeclared (first use in this > function) > r_term.c:214: error: ?frt_term_get_text? undeclared (first use in this > function) > r_term.c:215: error: ?frt_term_set_text? undeclared (first use in this > function) > r_term.c:216: error: ?frt_term_get_field? undeclared (first use in this > function) > r_term.c:217: error: ?frt_term_set_field? undeclared (first use in this > function) > r_term.c:218: error: ?frt_term_hash? undeclared (first use in this > function) > make: *** [r_term.o] Error 1 > > ---------- > The commands were > > ruby setup.rb config > cd ext > [change CFLAG from -O0 to -Os] in Makefile > make > > Any help would be much appreciated as I am desparate to get it installed > successfully. > > Thanks, > Alastair.Hi Alastair, Could you try installing the latest gem (0.10.0) and let me know how it goes? Cheers, Dave