[Xapian-tickets] [Xapian] #695: Xapian 1.3.2 installs xapian-config-1.3, Xapian bindings defaults to xapian-config (was: Xapian 1.3.2 installs xapian-config-1.3, Xapian bindings requires xapian-config)
Xapian
nobody at xapian.org
Fri Nov 13 01:16:09 GMT 2015
#695: Xapian 1.3.2 installs xapian-config-1.3, Xapian bindings defaults to
xapian-config
-----------------------------+-----------------------------
Reporter: jorgecarleitao | Owner: olly
Type: defect | Status: assigned
Priority: normal | Milestone: 1.3.4
Component: Xapian-bindings | Version: 1.3.2
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: Linux
-----------------------------+-----------------------------
Changes (by olly):
* status: new => assigned
* milestone: => 1.3.4
Old description:
> 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.
New description:
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.
}}}
--
Comment:
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.
--
Ticket URL: <http://trac.xapian.org/ticket/695#comment:2>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list