Ferret Segmentation Faults

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

Hi Alastair!

On Tue, Aug 15, 2006 at 01:55:37PM +0200, Alastair B. 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 [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Jens K. wrote:

Hi Alastair!

On Tue, Aug 15, 2006 at 01:55:37PM +0200, Alastair B. 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 [email protected]
Schnorrstra�e 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Sorry 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. :frowning:
$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:inexecute’
/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:insynchronize’
/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:ininvoke_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:ininvoke_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:insynchronize’
/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:inrun’
/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

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

On 8/17/06, Alastair B. [email protected] wrote:

When changing it is preferable to use the 0.9.5 gem or the svn trunk? I
function)
â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
function)
function)
r_term.c:212: error: âfrt_term_eqâ undeclared (first use in this
function)
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

Alastair B. 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs