[Aboriginal] gfortran

Rob Landley rob at landley.net
Mon Oct 29 19:42:01 PDT 2012

On 08/30/2012 09:08:03 PM, Brian Fix wrote:
> Hi Aboriginal Users,

I think I replied to this before my netbook was stolen, but in case I  

> I found aboriginal looking into cross compiling python for my  
> android. I've
> seen multiple threads and projects on how to do it, they usually  
> involve a
> messy patch to apply to a specific version, and multiple stages of
> configuring and building with very long argument lists.
> Not the case with aboriginal, a simple:
> ./configure --without-threads --prefix=/home/python_blah
> make
> make install
> copied the results, and the dynamic libraries, onto my android  
> device, ran
> elfpatch on the python to point the python to the new library  
> locations,
> and i was done.
> Now I'm spoiled,  I want numpy, scipy and matplotlib this easily!
> Unfortunately, numpy/scipy have dependencies which require a Fortran
> compiler, so here's my problem.

If I did reply, I probably pointed you at the control-images stuff?


Specifically the linux from scratch control image. (Which I really need  
to update to the new version...)

> I've downloaded the complete gcc tarball with gfortran and all other
> languages  from their website and tried the same simple approach:
> tar xvzf gcc-4.6.0.tar.gz
> cd gcc-4.6.0/
> ./contrib/download_prerequisits
> mkdir gcc_build
> cd gcc_build
> ../gcc-a.b.c/configure
> make
> but I get a build error in libgomp:
> checking whether make sets $(MAKE)... yes
> checking for armv6l-unknown-linux-gnueabi-gcc...  
> /home/gcc_build/./gcc/xgcc
> -B/home/gcc_build/./gcc/  
> -B/usr/local/armv6l-unknown-linux-gnueabi/bin/
> -B/usr/local/armv6l-unknown-linux-gnueabi/lib/ -isystem
> /usr/local/armv6l-unknown-linux-gnueabi/include -isystem
> /usr/local/armv6l-unknown-linux-gnueabi/sys-include
> checking for C compiler default output file name...
> configure: error: in  
> `/home/gcc_build/armv6l-unknown-linux-gnueabi/libgomp':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> make[2]: *** [configure-stage1-target-libgomp] Error 77
> make[2]: Leaving directory `/home/gcc_build'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/home/gcc_build'
> make: *** [all] Error 2
> (armv6l:1) /home/gcc_build #

What did config.log say?

> My question is multipart:
> should I be using gcc-4.6.0 or some other version more agreeable with
> aboriginal?
> Is there a better way to do this?
> I notices a series of gcc patches in the aboriginal-1.2.0.tar.gz,  
> should I
> download 4.2.1 source apply these patches and compile?

You should be able to build another gcc under the target system. I'm  
reasonably sure I've done it before. (There's a script to do so in the  
lfs build, but it and the glibc one aren't enabled at the moment.)

I'm in the middle of switching out uClibc for musl on all the targets,  
which should make building glibc (and thus a new toolchain) natively on  
target much easier. Alas, it means that for the moment my local copies  
have parts on the floor and dangling wires...;


More information about the Aboriginal mailing list