How to disable python in libnl?
tgraf at infradead.org
Wed Nov 16 05:48:48 EST 2011
On Tue, Nov 15, 2011 at 02:48:46PM -0800, Ben Greear wrote:
> On 11/15/2011 02:30 PM, Yegor Yefremov wrote:
> >On Tue, Nov 15, 2011 at 7:50 PM, Ben Greear<greearb at candelatech.com> wrote:
> >>I'm trying to cross-compile libnl for ARM and I don't
> >>think I have any need of the python stuff.
> >>Is there any way to disable libnl's use of python? I
> >>didn't see any obvious way to do it in ./configure --help
> >AFAIK it should be possible since this commit:
The python modules have never been built by default. They always required to
manually enter the sub directory and run the setup.py script to build and
install the modules.
However, configure was looking for a python installation which has been
removed by b4b853e5e7. At least that was the aim of the commit.
What kind of issue have you run into while corss compling for ARM?
> You need something like this to make it work. Still testing on other
> machines, and will post it proper. Without explicitly disabling python,
> it will find the host python and mess up cross-compiles:
> [greearb at ben-dt libnl]$ git diff HEAD~1
> diff --git a/configure.in b/configure.in
> index e91b51f..3dff5b4 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -67,6 +67,11 @@ AC_ARG_ENABLE([cli],
> [enable_cli="$enableval"], [enable_cli="yes"])
> AM_CONDITIONAL([ENABLE_CLI], [test "$enable_cli" = "yes"])
> + AS_HELP_STRING([--disable-python], [Do not build python related code]),
> + [enable_python="$enableval"], [enable_python="yes"])
> +AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = "yes"])
> AC_CHECK_LIB([m], [pow], , AC_MSG_ERROR([libm is required]))
> AC_CHECK_LIB([pthread], [pthread_mutex_lock], , AC_MSG_ERROR([libpthread is required]))
Yes, something like this is needed when we want to integrate the python
building and installation into the Makefile process.
More information about the libnl