[Xapian-tickets] [Xapian] #707: Problems on OS X El Capitan

Xapian nobody at xapian.org
Sun Mar 6 16:44:12 GMT 2016


#707: Problems on OS X El Capitan
------------------------------------+-------------------
        Reporter:  james            |      Owner:  james
            Type:  defect           |     Status:  new
        Priority:  normal           |  Milestone:  1.4.x
       Component:  Xapian-bindings  |    Version:
        Severity:  normal           |   Keywords:
      Blocked By:                   |   Blocking:
Operating System:  Mac OS X         |
------------------------------------+-------------------
 This is a tracking ticket for WIP to resolve this as best we can. El
 Capitan introduces System Integrity Protection, which (amongst other
 things) prevents us from setting `DYLD_LIBRARY_PATH` for any 'protected'
 binary (in this case typically things in `/bin` and `/usr/bin`). We use
 this DYLD feature to build and test bindings against uninstalled builds of
 xapian-core.

 There are a number distinct results, with different mitigations:

 1. You cannot test against system version of languages (perl, tcl8, php,
 ruby, python2) with an uninstalled xapian-core, period. This will need
 noting somewhere, probably in the HACKING / developer guide docs.

 Ideally we'd have a buildbot for the stable tarball which builds, tests &
 installs xapian-core, then builds & tests xapian-bindings using system
 languages. Right now we don't have that (and it's difficult to get right,
 because in practice you have to install a couple of extra libraries, which
 you typically do via homebrew).

 2. We need to adjust the build system so that you can run tests with non-
 system languages (eg homebrew), because make will typically invoke
 `/bin/sh` for any line that sets an environment variable before running
 something. Typically this is done in a `run-<language>-test` script. This
 is generally only going to affect people building from a git checkout.

 3. The Python bindings go a little further, because they (a) import their
 own extension while building documentation, and (b) import the built .so
 and then build pyo/pyc files. ie to even build them against an uninstalled
 xapian-core they need changes. Again, this is only going to work with non-
 system python (and so should probably be fixed at some point, although
 only for python2 as OS X 10.11 doesn't ship with python3). (You should
 still be able to install xapian-core, then build and install the python2
 bindings, using the system python2.)

 4. Tests for the Perl bindings use prove, which you have to manually pick
 up as well as the perl binary itself. Homebrew doesn't link perl into
 /usr/local because it's a core piece of the system that could upset all
 sorts of other things, so you have to do something like:

 {{{
 configure PERL=/usr/local/Cellar/perl/5.22.1/bin/perl \
   PROVE=/usr/local/Cellar/perl/5.22.1/bin/prove
 }}}

 As yet untested: Java. There's no system Java as of OS X 10.11, and
 hopefully Oracle's JDK installs in a sensible place that doesn't get hit
 by SIP, but it's possible that the tests will have to be run slightly
 differently to work.

 5. Omega's omegatest has an optional test which uses faketime; if this is
 installed via homebrew, the test fails. Otherwise it is skipped.

--
Ticket URL: <https://trac.xapian.org/ticket/707>
Xapian <//xapian.org/>
Xapian



More information about the Xapian-tickets mailing list