Opened 8 years ago

Closed 8 years ago

#695 closed defect (fixed)

Xapian 1.3.2 installs xapian-config-1.3, Xapian bindings defaults to xapian-config

Reported by: Jorge Owned by: Olly Betts
Priority: normal Milestone: 1.3.4
Component: Xapian-bindings Version: 1.3.2
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description (last modified by Olly Betts)

I'm using the following script to install Xapian:

VERSION=$1

# prepare
mkdir $VIRTUAL_ENV/packages && cd $VIRTUAL_ENV/packages

CORE=xapian-core-$VERSION
BINDINGS=xapian-bindings-$VERSION

# download
echo "Downloading source..."
curl -O http://oligarchy.co.uk/xapian/$VERSION/${CORE}.tar.xz
curl -O http://oligarchy.co.uk/xapian/$VERSION/${BINDINGS}.tar.xz

# extract
echo "Extracting source..."
tar xf ${CORE}.tar.xz
tar xf ${BINDINGS}.tar.xz

# install
echo "Installing Xapian-core..."
cd $VIRTUAL_ENV/packages/${CORE}
./configure --prefix=$VIRTUAL_ENV && make && make install

PYV=`python -c "import sys;t='{v[0]}'.format(v=list(sys.version_info[:1]));sys.stdout.write(t)";`

if [ $PYV = "2" ]; then
    PYTHON_FLAG=--with-python
else
    PYTHON_FLAG=--with-python3
fi

echo "Installing Xapian-bindings..."
cd $VIRTUAL_ENV/packages/${BINDINGS}
./configure --prefix=$VIRTUAL_ENV $PYTHON_FLAG && make && make install

The following happens:

  • With 1.2.19, Xapian installs $VIRTUAL_ENV/bin/xapian-config and the bindings find it;
  • With 1.3.2, Xapian installs $VIRTUAL_ENV/bin/xapian-config-1.3 but bindings fail to find it.

1.2.19 installs correctly; 1.3.2 fails to install.

The error is:

checking for xapian-config... no
configure: error: Can't find xapian-config, although the xapian-core runtime library seems to be installed.  If you've installed xapian-core from a package, you probably need to install an extra package called something like libxapian-dev in order to be able to build code using the Xapian library.

Change History (3)

comment:1 by Jorge, 8 years ago

Summary: Xapian 1.3.3 installs xapian-config-1.3, Xapian bindings requires xapian-configXapian 1.3.2 installs xapian-config-1.3, Xapian bindings requires xapian-config

comment:2 by Olly Betts, 8 years ago

Description: modified (diff)
Milestone: 1.3.4
Status: newassigned
Summary: Xapian 1.3.2 installs xapian-config-1.3, Xapian bindings requires xapian-configXapian 1.3.2 installs xapian-config-1.3, Xapian bindings defaults to xapian-config

Actually, it's not "requires" - you can specify which xapian-config to use for the bindings like so:

./configure XAPIAN_CONFIG=/usr/local/bin/xapian-config-1.3

Or to just change the leaf-name to look for on PATH:

./configure XAPIAN_CONFIG=xapian-config-1.3

This is documented in the xapian-bindings' INSTALL file, and also in ./configure --help.

This suffix mismatch is only an issue for development snapshots. For stable releases, we don't add a suffix to the installed xapian-config by default, so we don't want to for here (and when building from git, bootstrap generates a top-level configure script which passes a suitable XAPIAN_CONFIG=X to the sub-configures such that the in-tree version is used).

It would make more sense to default to xapian-config with the appropriate suffix for development versions though, and looking at the git history, we actually did this for 1.1.3 and later: [97e77de910175d60cd8b374033e27b36d7962036] (before 1.1.3, XO_LIB_XAPIAN had a hard-coded default of xapian-config).

That change was correctly reverted in 1.2.0, but we failed to reinstate the equivalent for 1.3.0. I think we need a mechanism which automatically adds the suffix -X.Y for version X.Y.Z if (and only if) Y is odd, so that we didn't have to manually add and remove this at the start and end of each development release series - it's clearly all to easy to fail to do so.

Same issue applies to xapian-omega.

comment:3 by Olly Betts, 8 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [9a35efe43d9e45659915d6ea1ec5d21c2227f5be] with automatic enabling/disabling.

There's no point backporting this, since 1.2.x has the correct default for a stable release series.

Note: See TracTickets for help on using tickets.