Re: [PATCH 1/2] Fix python client cross compile

Alec Leamas <[email protected]>
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>

On 29/08/17 10:57, Baruch Siach wrote:
> The setup.py setuptools wrapper needs to use a version of python built
> specifically for cross compiling to cross compile successfully. Allow
> setting that in the environment using the SETUPTOOLS_ENV variable.
> 
> Fixes the following build failure:
> 
> /usr/bin/ld: skipping incompatible .../lirc-tools-0.10.0/lib/.libs/liblirc_client.so when searching for -llirc_client
> /usr/bin/ld: cannot find -llirc_client
> collect2: error: ld returned 1 exit status
> error: command '/usr/bin/gcc' failed with exit status 1
> Makefile:1578: recipe for target 'all-local' failed
> ---
>   Makefile.am | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index d8164fcd44cf..a16be4278ae2 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -131,6 +131,7 @@ pep8: $(py_PYTHON)
>   if HAVE_PYTHON35
>   all-local:
>   	cd python-pkg; \
> +	    $(SETUPTOOLS_ENV) \
>   	    CFLAGS="-I$(abs_top_srcdir)/lib -I$(abs_builddir)/lib" \
>   	    LDFLAGS=-L$(abs_builddir)/lib/.libs $(PYTHON) setup.py \
>   	    $(if $(VERBOSE),,-q) build
> @@ -179,6 +180,7 @@ $(abs_builddir)/python-pkg/setup.py:
>   $(PYTHON_TARBALL): $(abs_builddir)/python-pkg/setup.py
>   	cp $(top_builddir)/VERSION $(abs_builddir)/python-pkg
>   	cd $(abs_builddir)/python-pkg; CFLAGS=-I$(abs_top_srcdir)/lib \
> +	    $(SETUPTOOLS_ENV) \
>   	    LDFLAGS=-L$(abs_builddir)/lib/.libs $(PYTHON) setup.py -q sdist
>   
>   $(top_builddir)/python-pkg/VERSION: VERSION

This shouldn't break any eggs and looks basically fine. However, this 
variable will be completely invisible in the user interface. Would it be 
possible to define it using AC_ARG_VAR in configure.ac which makes it 
visible in configure --help like e. g., SH_PATH?

--alec

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.