Skip to main content.
home | support | download

Back to List Archive

Re: Bug in swish-2.4.3 on spac64

From: Sorithy Seng <pourlassi(at)not-real.gmail.com>
Date: Wed Jul 20 2005 - 08:00:52 GMT
Hi Bill,

I give you the complete output of the test procedure at the bottom of
this message.

> I'm trying to understand why this has worked on other 64 bit platforms
> in the past but fails on yours.  Is it the way your compiler is making
> the cast compared to other compilers we have used?  Can you (or
> any C wizard) explain?
>
> I admit that I'm not 100% clear what the compiler should do when
> casting "unsigned char propValue[1]" to "unsigned long" -- always
> seems like a bit of magic to me. ;)  I like your patch, as it's clear
> what is happening.

I don't know why it doesn't work on sparc64 platform. I tried and
successed on an amd64.
At the beginning, I thought the pb came from the compiler, that's why
I try with another one (in fact an other version of gcc) and with
differents options. But I didn't find a solution, so I took a look in
the source code.
I think isn't clear to cast "unsigned char propValue[1]" to "unsigned
long", I met several pb of this kind in embedded systems.

If you wan't I make some test on my platform don't hesitate to ask me.

Sorithy


----------------------------------------------------------------------------------------------------------------------------------------------
# uname -a
OpenBSD installbsd.localhost 3.7 GENERIC#431 sparc64
#
# gcc -v
Reading specs from /usr/lib/gcc-lib/sparc64-unknown-openbsd3.7/3.3.5/specs
Configured with:
Thread model: single
gcc version 3.3.5 (propolice)
#
# 
# tar zxf swish-e-2.4.3.tar.gz
#
# cd swish-e-2.4.3
# ls
INSTALL         aclocal.m4      doc             perl            swish-e.pc.in
Makefile.am     conf            example         pod             tests
Makefile.in     config          filter-bin      prog-bin
README          configure       filters         rpm
README.cvs      configure.in    html            src
TODO            debian          man             swish-config.in
#
# ./configure > resconfig.txt 2>&1
# 
# make > resmake.txt 2>&1
#
#
# make check
Making check in filters
Making check in SWISH
Making check in prog-bin
Making check in conf
Making check in filter-bin
Making check in example
Making check in html
Making check in man
Making check in src
Making check in expat
Making check in replace
Making check in snowball
Making check in tests
make  check-TESTS
PASS: check_index
FAIL: check_search
FAIL: check_metasearch
===================
2 of 3 tests failed
===================
*** Error code 1

Stop in /root/swish-e-2.4.3/tests (line 275 of Makefile).
*** Error code 1

Stop in /root/swish-e-2.4.3/tests (line 309 of Makefile).
*** Error code 1

Stop in /root/swish-e-2.4.3 (line 439 of Makefile).
#
#
#
# src/swish-e -S fs -i ./html -f ./zz.index
Indexing Data Source: "File-System"
Indexing "./html"
Removing very common words...
no words removed.
Writing main index...
Sorting words ...
Sorting 5,597 words alphabetically
Writing header ...
Writing index entries ...
  Writing word text: Complete
  Writing word hash: Complete
  Writing word data: Complete
5,597 unique words indexed.
4 properties sorted.
30 files indexed.  808,259 total bytes.  85,630 total words.
Elapsed time: 00:00:01 CPU time: 00:00:01
Indexing done!
#
#
#
#
# src/swish-e -w new -f zz.index
# SWISH format: 2.4.3
# Search words: new
# Removed stopwords:
# Number of hits: 15
# Search time: 0.005 seconds
# Run time: 0.075 seconds
Bus error (core dumped)
#
##################################################################################
# It doesn't work !!
#
# I replace the following lines in docprop.c (lines 159, 170, 522 and 534) :
# 		i = *(unsigned long *) prop->propValue;  /* read binary */
# by this line
#		i = (unsigned long) *prop->propValue;  /* read binary */
##################################################################################
#
# make > resmake2.txt 2>&1
#
#
# make check
Making check in filters
Making check in SWISH
Making check in prog-bin
Making check in conf
Making check in filter-bin
Making check in example
Making check in html
Making check in man
Making check in src
Making check in expat
Making check in replace
Making check in snowball
Making check in tests
make  check-TESTS
PASS: check_index
PASS: check_search
PASS: check_metasearch
==================
All 3 tests passed
==================
#
#
#
# src/swish-e -S fs -i ./html -f ./zz.index
Indexing Data Source: "File-System"
Indexing "./html"
Removing very common words...
no words removed.
Writing main index...
Sorting words ...
Sorting 5,597 words alphabetically
Writing header ...
Writing index entries ...
  Writing word text: Complete
  Writing word hash: Complete
  Writing word data: Complete
5,597 unique words indexed.
4 properties sorted.
30 files indexed.  808,259 total bytes.  85,630 total words.
Elapsed time: 00:00:01 CPU time: 00:00:01
Indexing done!
#
#
#
# src/swish-e -w new -f zz.index
# SWISH format: 2.4.3
# Search words: new
# Removed stopwords:
# Number of hits: 15
# Search time: 0.005 seconds
# Run time: 0.075 seconds
0 ./html/CHANGES.html "SWISH-Enhanced:  CHANGES - List of revisions" 0
0 ./html/Filter.html "SWISH-Enhanced:  SWISH::Filter - Perl extension
for filtering documents with Swish-e" 0
0 ./html/SWISH-FAQ.html "SWISH-Enhanced:  The Swish-e FAQ - Answers to
Common Questions" 0
0 ./html/API.html "SWISH-Enhanced:  SWISH::API - Perl interface to the
Swish-e C Library" 0
0 ./html/SWISH-RUN.html "SWISH-Enhanced:  SWISH-RUN - Running Swish-e
and Command Line Switches" 0
0 ./html/SWISH-LIBRARY.html "SWISH-Enhanced:  SWISH-LIBRARY -
Interface to the Swish-e C library" 0
0 ./html/README.html "SWISH-Enhanced:  The Swish-e README File" 0
0 ./html/swish.html "SWISH-Enhanced:  swish.cgi -- Example Perl script
for searching with the SWISH-E search engine." 0
0 ./html/spider.html "SWISH-Enhanced:  spider.pl - Example Perl
program to spider web servers" 0
0 ./html/index_long.html "SWISH-Enhanced" 0
0 ./html/SWISH-3.0.html "SWISH-Enhanced:  Proposed changes for Swish-e 3.0" 0
0 ./html/style.css "style.css" 0
0 ./html/INSTALL.html "SWISH-Enhanced:  INSTALL - Swish-e Installation
Instructions" 0
0 ./html/SWISH-CONFIG.html "SWISH-Enhanced:  SWISH-CONFIG -
Configuration File Directives" 0
0 ./html/index.html "SWISH-Enhanced" 0
.
#
##################################################################################
#  make check : ok
#  create an index : ok
#  search in the index : failed 
#
#  I apply the patch
##################################################################################
#
# cp ../docprop.c.patched src/docprop.c
#
# make > resmake3.txt 2>&1
#
# make check
Making check in filters
Making check in SWISH
Making check in prog-bin
Making check in conf
Making check in filter-bin
Making check in example
Making check in html
Making check in man
Making check in src
Making check in expat
Making check in replace
Making check in snowball
Making check in tests
make  check-TESTS
PASS: check_index
PASS: check_search
PASS: check_metasearch
==================
All 3 tests passed
==================
#
# src/swish-e -w new -f zz.index
# SWISH format: 2.4.3
# Search words: new
# Removed stopwords:
# Number of hits: 15
# Search time: 0.006 seconds
# Run time: 0.075 seconds
1000 ./html/CHANGES.html "SWISH-Enhanced:  CHANGES - List of revisions" 58606
860 ./html/Filter.html "SWISH-Enhanced:  SWISH::Filter - Perl
extension for filtering documents with Swish-e" 32077
665 ./html/SWISH-FAQ.html "SWISH-Enhanced:  The Swish-e FAQ - Answers
to Common Questions" 83537
648 ./html/API.html "SWISH-Enhanced:  SWISH::API - Perl interface to
the Swish-e C Library" 31847
491 ./html/SWISH-RUN.html "SWISH-Enhanced:  SWISH-RUN - Running
Swish-e and Command Line Switches" 55659
453 ./html/SWISH-LIBRARY.html "SWISH-Enhanced:  SWISH-LIBRARY -
Interface to the Swish-e C library" 30300
453 ./html/README.html "SWISH-Enhanced:  The Swish-e README File" 12860
405 ./html/swish.html "SWISH-Enhanced:  swish.cgi -- Example Perl
script for searching with the SWISH-E search engine." 67484
405 ./html/spider.html "SWISH-Enhanced:  spider.pl - Example Perl
program to spider web servers" 68778
349 ./html/index_long.html "SWISH-Enhanced" 28154
349 ./html/SWISH-3.0.html "SWISH-Enhanced:  Proposed changes for
Swish-e 3.0" 9990
275 ./html/style.css "style.css" 1215
275 ./html/INSTALL.html "SWISH-Enhanced:  INSTALL - Swish-e
Installation Instructions" 80051
174 ./html/SWISH-CONFIG.html "SWISH-Enhanced:  SWISH-CONFIG -
Configuration File Directives" 142480
174 ./html/index.html "SWISH-Enhanced" 4124
.
#
Received on Wed Jul 20 01:01:04 2005