[Xapian-tickets] [Xapian] #832: Compiling xapian with meson. Strange error in tests.

Xapian nobody at xapian.org
Fri Jul 26 10:36:35 BST 2024


#832: Compiling xapian with meson. Strange error in tests.
--------------------------+-------------------------------
 Reporter:  mgautier      |             Owner:  Olly Betts
     Type:  task          |            Status:  new
 Priority:  normal        |         Milestone:
Component:  Build system  |           Version:
 Severity:  normal        |        Resolution:
 Keywords:                |        Blocked By:
 Blocking:                |  Operating System:  All
--------------------------+-------------------------------

Old description:

> Hi,
>
> I am currently trying to compile xapian with meson build system.
> Once done, I plan to either provide a patch here (if you are interested)
> or publish the build system on https://mesonbuild.com/Wrapdb-
> projects.html
>
> You can find the current status of xapian with meson here :
> https://github.com/openzim/xapian-meson
>
> Here few status information (for context):
> - We are interested on glass backend only so I concentrate on this only
> for now.
> - Works only creating static library. Got undefined reference else (both
> linux and windows)
> - Some changes are independents of meson and you probably want them
> anyway (you may find them on the github repository)
>
> But for my issue, even if it seems to work pretty nicely on Linux (static
> lib) but on Windows, tests are broken.
>
> Running test_api, I have some strange behavior. Some tests (qpmemoryleak1
> and newfreelistblock1) fails sometime (with ` FAIL: DatabaseError: Commit
> failed (Permission denied)`) and sometime not. (with multi_glass or glass
> backend).
>
> On top of that, the number of skip tests are not constant.
>
> On libzim side (https://github.com/openzim/libzim) (which use xapian
> build on windows). Our test (xapian creation) always crashes (segfault)
> when compacting the backend database with flag
> `Xapian::Compactor::FULLER`. It never fails without this flag, whatever
> xapian unittest are failing or not.
>
> I am a bit stuck here. I hope that some of you would be able to help me.
>
> ---
>
> For more context, we are already building xapian using autotools on
> windows on appveyor CI (https://github.com/kiwix/kiwix-
> build/blob/main/appveyor/build_xapian.sh). But we are in the process of
> homogenize our build system and I never succeed to build correctly again
> xapian using autotools locally. (spaces in path are a nightmare)
>
> Thanks

New description:

 ass backend only so I concentrate on this only for now.
 - Works only creating static library. Got undefined reference else (both
 linux and windows)
 - Some changes are independents of meson and you probably want them anyway
 (you may find them on the github repository)

 But for my issue, even if it seems to work pretty nicely on Linux (static
 lib) but on Windows, tests are broken.

 Running test_api, I have some strange behavior. Some tests (qpmemoryleak1
 and newfreelistblock1) fails sometime (with ` FAIL: DatabaseError: Commit
 failed (Permission denied)`) and sometime not. (with multi_glass or glass
 backend).

 On top of that, the number of skip tests are not constant.

 On libzim side (https://github.com/openzim/libzim) (which use xapian build
 on windows). Our test (xapian creation) always crashes (segfault) when
 compacting the backend database with flag `Xapian::Compactor::FULLER`. It
 never fails without this flag, whatever xapian unittest are failing or
 not.

 I am a bit stuck here. I hope that some of you would be able to help me.

 ---

 For more context, we are already building xapian using autotools on
 windows on appveyor CI (https://github.com/kiwix/kiwix-
 build/blob/main/appveyor/build_xapian.sh). But we are in the process of
 homogenize our build system and I never succeed to build correctly again
 xapian using autotools locally. (spaces in path are a nightmare)

 Thanks

--
Comment (by mgautier):

 > I'd been wondering about looking at switching to meson at some point so
 I'm open to the idea, but at this point in the release cycle I think it
 would need to be targetted at the release series after next

 Sure, I was more looking for help as I'm a bit stuck here. My work is not
 yet ready for integration now.

 > It struck me that this is rather suspicious - there shouldn't be any
 undefined references (and there aren't with the current build system) so
 this suggests to me that you aren't putting the correct set of files into
 the library (or you're misbuilding them in some way that means symbols are
 missing, perhaps due to symbol visibility).

 Thanks, I will search on this direction.

 Aside of meson, I think the two commits https://github.com/openzim/xapian-
 meson/commit/4b302ec704f7b80860a0cf62b5c446341ace8e8b and
 https://github.com/openzim/xapian-
 meson/commit/88a068e42ec655853e1fb072295a8d9722c3b64b are commits you want
 to integrate. Can you directly apply them or you prefer I do separated
 PR(s) ?
-- 
Ticket URL: <https://trac.xapian.org/ticket/832#comment:3>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list