ecryptfs-devel team mailing list archive
-
ecryptfs-devel team
-
Mailing list archive
-
Message #00009
Re: [PATCH] Correctly detect Python version for pywrap
Michael Halcrow wrote:
> On Wed, Nov 05, 2008 at 02:03:22PM -0600, Michael Halcrow wrote:
>> On Wed, Nov 05, 2008 at 01:46:07PM -0600, Tyler Hicks wrote:
>>> The configure script fails if the installed Python version is less
>>> than 2.5. This patch allows the configure script to detect the version
>>> of Python installed and decide if pywrap should be enabled, without
>>> causing the configure script to exit with an error.
>> The build blows up on my Gentoo box with this patch applied:
>>
>> gcc -g -O2 -o .libs/ecryptfs-manager ecryptfs_manager-manager.o ecryptfs_manager-io.o ecryptfs_manager-gen_key.o ../../src/libecryptfs/.libs/libecryptfs.so -lkeyutils /usr/lib/libgcrypt.so /usr/lib/libgpg-error.so
>> ../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `dlsym'
>> ../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `dlerror'
>> ../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `dlopen'
>> ../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `dlclose'
>> collect2: ld returned 1 exit status
>> make[3]: *** [ecryptfs-manager] Error 1
>> make[3]: Leaving directory `/home/mhalcrow/ecryptfs-utils/src/utils'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/mhalcrow/ecryptfs-utils/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/mhalcrow/ecryptfs-utils'
>> make: *** [all] Error 2
>
> This keeps things sane on my Gentoo box. Please test in your
> environment.
It works in my environment.
> ---
>
> diff --git a/configure.ac b/configure.ac
> index 389aeda..e139da6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -19,7 +19,7 @@ AC_CONFIG_HEADERS([config.h])
> AC_CONFIG_MACRO_DIR([m4])
>
> AC_DISABLE_STATIC
> -AM_PATH_PYTHON(2.5)
> +AM_PATH_PYTHON(2.5, [have_python="yes"], [have_python="no"])
> AC_PROG_SWIG(1.3.31)
> SWIG_PYTHON
>
> @@ -233,15 +233,10 @@ CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}"
> AC_CHECK_HEADER([openssl/rsa.h],, [have_openssl="no"])
> CFLAGS="${OLD_CFLAGS}"
>
> -have_python="no"
> -have_swig="no"
> -
> -if test "x${PYTHON_VERSION}" != "x" ; then
> - have_python="yes"
> -fi
> -
> if test "x${SWIG}" != "x" ; then
> have_swig="yes"
> +else
> + have_swig="no"
> fi
>
> if test "${enable_pywrap}" = "detect" ; then
>
> ---
>>> Signed-off-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxxxxxxx>
>>> ---
>>> configure.ac | 16 +++++-----------
>>> 1 files changed, 5 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 389aeda..202f3b2 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -17,11 +17,7 @@ AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
>>> AC_CONFIG_SRCDIR([src/libecryptfs])
>>> AC_CONFIG_HEADERS([config.h])
>>> AC_CONFIG_MACRO_DIR([m4])
>>> -
>>> AC_DISABLE_STATIC
>>> -AM_PATH_PYTHON(2.5)
>>> -AC_PROG_SWIG(1.3.31)
>>> -SWIG_PYTHON
>>>
>>> LIBECRYPTFS_LT_CURRENT="0"
>>> LIBECRYPTFS_LT_REVISION="0"
>>> @@ -233,15 +229,13 @@ CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}"
>>> AC_CHECK_HEADER([openssl/rsa.h],, [have_openssl="no"])
>>> CFLAGS="${OLD_CFLAGS}"
>>>
>>> -have_python="no"
>>> -have_swig="no"
>>> -
>>> -if test "x${PYTHON_VERSION}" != "x" ; then
>>> - have_python="yes"
>>> -fi
>>> -
>>> +AM_PATH_PYTHON([2.5], [have_python="yes"], [have_python="no"])
>>> +AC_PROG_SWIG(1.3.31)
>>> +SWIG_PYTHON
>>> if test "x${SWIG}" != "x" ; then
>>> have_swig="yes"
>>> +else
>>> + have_swig="no"
>>> fi
>>>
>>> if test "${enable_pywrap}" = "detect" ; then
>
>
Attachment:
signature.asc
Description: OpenPGP digital signature
References