Subject: bug#26859: closed (Re: bug#26859: swish-e 2.4.7 fails to build)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 28 Sep 2020 19:13:02 +0000

Your bug report

#26859: swish-e 2.4.7 fails to build

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26859: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26859
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26859: swish-e 2.4.7 fails to build
From: zimoun <[email-masked]>
To: [email-masked] (Ethan R. Jones)
Cc: [email-masked]
Date: Mon, 28 Sep 2020 21:11:56 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sun, 14 May 2017 at 13:09, [email-masked] (Ethan R. Jones) wrote:
> I managed to get it to build and pass the checks properly by adding 
> `--without-zlib --without-libxml2` to the configure options (see patch
> 26930 .)
> However I'm unaware how this may impact other uses of swish-e, I
> recommend closing this bug and opening a new bugs "swish-e lacks zlib support"
> and
> "swish-e lacks libxml2 support" 

Closing as asked.  BTW, Data Services reports it builds [1].

[1] <https://data.guix.gnu.org/repository/1/branch/master/package/swish-e/output-history>

Subject: swish-e 2.4.7 fails to build
From: [email-masked] (Ethan R. Jones)
To: [email-masked]
Date: Tue, 09 May 2017 15:43:31 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Tested against commit 83a895310936

---
gcc -DHAVE_CONFIG_H -I. -I. -I. -Dlibexecdir=\"/gnu/store/b59d1j22m0bjq0mjw0dsi9dgg02iv3g7-swish-e-2.4.7/lib/swish-e\" -DPATH_SEPARATOR=\":\" -I/gnu/store/8h3gg0hj7lwimcdn2r912vv2mnh6yx0n-libxml2-2.9.4/include/libxml2 -Ireplace -Wall -g -O2 -MT compress.lo -MD -MP -MF .deps/compress.Tpo -c compress.c  -fPIC -DPIC -o .libs/compress.o
In file included from compress.c:54:0:
/gnu/store/jwkcd7siv6fcyl0qsg607bg9c8ap0gqr-zlib-1.2.11/include/zlib.h:1283:21: error: conflicting types for 'uncompress2'
 ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest,   uLongf *destLen,
                     ^
In file included from compress.c:41:0:
compress.h:39:5: note: previous declaration of 'uncompress2' was here
 int uncompress2(unsigned char **buffer);
     ^
compress.c: In function 'uncompress_location_values':
compress.c:607:28: warning: passing argument 1 of 'uncompress2' from incompatible pointer type [-Wincompatible-pointer-types]
     *filenum = uncompress2(&p);
                            ^
In file included from compress.c:54:0:
/gnu/store/jwkcd7siv6fcyl0qsg607bg9c8ap0gqr-zlib-1.2.11/include/zlib.h:1283:21: note: expected 'Bytef * {aka unsigned char *}' but argument is of type 'unsigned char **'
 ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest,   uLongf *destLen,

...

make[3]: *** [Makefile:550: compress.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
 gcc -DHAVE_CONFIG_H -I. -I. -I. -Dlibexecdir=\"/gnu/store/b59d1j22m0bjq0mjw0dsi9dgg02iv3g7-swish-e-2.4.7/lib/swish-e\" -DPATH_SEPARATOR=\":\" -I/gnu/store/8h3gg0hj7lwimcdn2r912vv2mnh6yx0n-libxml2-2.9.4/include/libxml2 -Ireplace -Wall -g -O2 -MT hash.lo -MD -MP -MF .deps/hash.Tpo -c hash.c -o hash.o >/dev/null 2>&1
make[3]: Leaving directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/src'
make[2]: *** [Makefile:590: all-recursive] Error 1
make[2]: Leaving directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/src'
make[1]: *** [Makefile:330: all] Error 2
make[1]: Leaving directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/src'
make: *** [Makefile:422: all-recursive] Error 1
phase `build' failed after 13.5 seconds
builder for `/gnu/store/zqhx96vdkxvkk23r5h0szj4f54hw5c75-swish-e-2.4.7.drv' failed with exit code 1
@ build-failed /gnu/store/zqhx96vdkxvkk23r5h0szj4f54hw5c75-swish-e-2.4.7.drv - 1 builder for `/gnu/store/zqhx96vdkxvkk23r5h0szj4f54hw5c75-swish-e-2.4.7.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/zqhx96vdkxvkk23r5h0szj4f54hw5c75-swish-e-2.4.7.drv' failed

---
This error is reproducable on Ubuntu 17.04.

once patched by passing the `--without-zlib` flag to ./configure, it
produces the following errors on it's tests:

---

Making check in tests
make[1]: Entering directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/tests'
make  check-TESTS
make[2]: Entering directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/tests'
FAIL: check_index
FAIL: check_search
FAIL: check_metasearch
FAIL: check_fuzzy
===================
4 of 4 tests failed
===================
make[2]: *** [Makefile:245: check-TESTS] Error 1
make[2]: Leaving directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/tests'
make[1]: *** [Makefile:345: check-am] Error 2
make[1]: Leaving directory '/tmp/guix-build-swish-e-2.4.7.drv-0/swish-e-2.4.7/tests'
make: *** [Makefile:422: check-recursive] Error 1
phase `check' failed after 0.6 seconds
builder for `/gnu/store/ghq97sc8796cybh85p0m85ir5430vcrp-swish-e-2.4.7.drv' failed with exit code 1
@ build-failed /gnu/store/ghq97sc8796cybh85p0m85ir5430vcrp-swish-e-2.4.7.drv - 1 builder for `/gnu/store/ghq97sc8796cybh85p0m85ir5430vcrp-swish-e-2.4.7.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/ghq97sc8796cybh85p0m85ir5430vcrp-swish-e-2.4.7.drv' failed

---
However, these tests do not fail on 17.04

if the tests are run directly from the source package; we get some more useful output:

---
$ bash check_fuzzy
...
    Adding:[6:swishdefault(1)]   'metatag'   Pos:11  Stuct:0x7 ( HEAD TITLE FILE )
    Adding:[6:swishdefault(1)]   'search'   Pos:12  Stuct:0x7 ( HEAD TITLE FILE )
    Adding:[6:swishdefault(1)]   '2'   Pos:13  Stuct:0x7 ( HEAD TITLE FILE )
    Adding:[6:swishdefault(1)]   'wa'   Pos:14  Stuct:0x7 ( HEAD TITLE FILE )
    Adding:[6:swishdefault(1)]   'success'   Pos:15  Stuct:0x7 ( HEAD TITLE FILE )
/home/dpg/code/prog/swish-e-2.4.7/tests/test_meta2.html:5: error: htmlParseStartTag: invalid element name
<!META NAME="meta2" START>
 ^
/home/dpg/code/prog/swish-e-2.4.7/tests/test_meta2.html:8: error: htmlParseStartTag: invalid element name
<!META END>
 ^
/home/dpg/code/prog/swish-e-2.4.7/tests/test_meta2.html:9: error: htmlParseStartTag: invalid element name
<!META NAME="MetaDesc" START>
 ^
/home/dpg/code/prog/swish-e-2.4.7/tests/test_meta2.html:11: error: htmlParseStartTag: invalid element name
<!META END>
 ^
    Adding:[6:swishdefault(1)]   'thi'   Pos:21  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'i'   Pos:22  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'metatest2'   Pos:23  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'bla'   Pos:24  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'bla'   Pos:25  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'thi'   Pos:26  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'i'   Pos:27  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'i'   Pos:28  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'the'   Pos:29  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'descript'   Pos:30  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'of'   Pos:31  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'metatest2'   Pos:32  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'bla'   Pos:33  Stuct:0x9 ( BODY FILE )
    Adding:[6:swishdefault(1)]   'bla'   Pos:34  Stuct:0x9 ( BODY FILE )
    Adding:[7:meta3(12)]   'thi'   Pos:3  Stuct:0x1 ( FILE )
    Adding:[7:meta3(12)]   'i'   Pos:4  Stuct:0x1 ( FILE )
    Adding:[7:meta3(12)]   'metatest3'   Pos:5  Stuct:0x1 ( FILE )
    Adding:[7:meta3(12)]   'just'   Pos:6  Stuct:0x1 ( FILE )
    Adding:[7:meta3(12)]   'a'   Pos:7  Stuct:0x1 ( FILE )
    Adding:[7:meta3(12)]   'sampl'   Pos:8  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'thi'   Pos:12  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'i'   Pos:13  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'the'   Pos:15  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'descript'   Pos:17  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'of'   Pos:18  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'test'   Pos:19  Stuct:0x1 ( FILE )
    Adding:[7:swishdefault(1)]   'xml'   Pos:20  Stuct:0x1 ( FILE )
Removing very common words...
check_fuzzy: line 16: 24435 Segmentation fault      $SWISH -c $srcdir/test.fuzzy.config -i $srcdir -T indexed_words
---

It appears to be related to libxml2's htmlParseStartTag()

I'm hopping this assits in fixing it, as the tomb package won't build
without it!