mercurial 3.1: cross compiling fails for arm linux hard float
Matthew Turk
matthewturk at gmail.com
Wed Aug 13 15:41:26 UTC 2014
On Wed, Aug 13, 2014 at 10:31 AM, Simon King <simon at simonking.org.uk> wrote:
> On Wed, Aug 13, 2014 at 3:48 PM, Prasant J <pj0585 at gmail.com> wrote:
>> Hi,
>>
>> This is my first port to this forum. I hope this is the right forum to
>> post this.
>>
>> I'm trying to cross compile mercurial for ARM linux (Freescale iMX6Q
>> Cortex A9 armv7).
>>
>> I have edited the Makefile variable COMPILER to
>> "arm-poky-linux-gnueabi-gcc". The cross compiling environment is also
>> set.
>>
>>
>> When I run make all, I see the following error:
>>
>> python setup.py build -c arm-poky-linux-gnueabi-gcc
>> Couldn't import standard zlib (incomplete Python install).
>> make: *** [build] Error 1
>
> Where did you get Python from? Can you run "python -c 'import zlib;
> print zlib'"?
>
>>
>> Any idea what could be wrong?
>>
>> Any place where I can read about cross compiling mercurial for arm-linux ?
>>
>>
>> I am able successfully cross compile autoconf based libraries but
>> stuck in mercurial. Any inputs will be of help to me.
>>
>>
>
> I haven't tried to do this, but I have briefly investigated
> cross-compiling Python, and it's a bit awkward because parts of the
> Python build process actually use the Python interpreter. When you are
> compiling for the host platform this is fine, but when you are
> cross-compiling, the interpreter that you've built won't run on the
> host platform. See for example:
>
> http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html
>
> http://www.trevorbowen.com/2013/10/07/cross-compiling-python-2-7-5-for-embedded-linux/
>
> I suspect (but don't know) that building mercurial will run into
> similar issues. I think the standard mechanism for building Python
> extensions tries to get the build settings from the host interpreter.
> Perhaps you could investigate building in a VM?
>
> http://landley.net/aboriginal/presentation.html
For what it's worth, I was able to compile mercurial into Native
Client (gonacl.com) but have not yet contributed the port upstream to
the naclports repository. This required cross-compiling, and if
anyone is interested the process is detailed in the "python-static"
port in naclports. PNaCl requires static linking, which is a separate
issue, but for straight-up cross-compiling it worked to build a 32 bit
python "host" interpreter and then use that for the PGEN supplied to
the destination python. This should in principle work for
cross-compiling; if you're looking at building something that relies
more heavily on using the interpreter (i.e., numpy) then that's a bit
more work, though.
-Matt
>
> Simon
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list