ARM port (again)

97 views
Skip to first unread message

mmarco

unread,
Mar 23, 2012, 4:16:34 PM3/23/12
to sage-devel
I tried to answer to the post of the arm port, but i am not sure why i
can't.

I am considering buying an asus eeepad transformer prime. So i would
like to compile sage on it. What are the changes that need to be done
to the source code to do it?. Is there somewhere a tarball with the
code already adapted?

Julien Puydt

unread,
Mar 23, 2012, 4:37:14 PM3/23/12
to sage-...@googlegroups.com
Le vendredi 23 mars, mmarco a écrit:

> I am considering buying an asus eeepad transformer prime. So i would
> like to compile sage on it. What are the changes that need to be done
> to the source code to do it?. Is there somewhere a tarball with the
> code already adapted?

Does that run android or a complete distribution?

There is a working port if you have a complete distribution ; from the
top of my head, you'll mostly need a newer flint (1.5.2) and that's
all. There will only be a few failing tests.

Snark on #sagemath

Dima Pasechnik

unread,
Mar 23, 2012, 4:35:22 PM3/23/12
to sage-...@googlegroups.com
the patches needed are on trac, some of them already reviewed etc.
http://trac.sagemath.org/sage_trac/search?q=arm
We should create a metaticket or a wiki paged on this...

Dima

Julien Puydt

unread,
Mar 23, 2012, 4:50:25 PM3/23/12
to sage-...@googlegroups.com
Le vendredi 23 mars, Dima Pasechnik a écrit:

There is that one:
http://trac.sagemath.org/sage_trac/ticket/10285

But I haven't updated it since long!

Snark on #sagemath

Julien Puydt

unread,
Mar 23, 2012, 4:52:15 PM3/23/12
to sage-...@googlegroups.com
Le vendredi 23 mars, Julien Puydt a écrit:

> from the top of my head, you'll mostly need a newer flint (1.5.2)

Here is the trac ticket about the flint package:
http://trac.sagemath.org/sage_trac/ticket/10328

Snark on #sagemath

mmarco

unread,
Mar 23, 2012, 5:28:15 PM3/23/12
to sage-devel

>
> Does that run android or a complete distribution?
>
It does run android, but i have read that it is possible to install
ubuntu in a chroot environment.

Dima Pasechnik

unread,
Mar 24, 2012, 1:17:18 AM3/24/12
to sage-...@googlegroups.com

Please review it! It needs to be reviewed for changes I made, so
I can't do it myself...

Dima

mmarco

unread,
Apr 7, 2012, 5:36:16 PM4/7/12
to sage-devel
Ok, i finally got the tablet, installed ubuntu in a chroot, and tried
to compile sage. The build process went on pretty far,but eclib keeps
failing. I get the following error message:

Assembler messages:
Fatal error: can't create egr_n.o: Input/output error

Any clue about how to solve this?

And in a related question: is there any compiled tarball of sage for
arm available somewhere?

John Cremona

unread,
Apr 7, 2012, 5:55:08 PM4/7/12
to sage-...@googlegroups.com
On 7 April 2012 22:36, mmarco <mma...@unizar.es> wrote:
> Ok, i finally got the tablet, installed ubuntu in a chroot, and tried
> to compile sage. The build process went on pretty far,but eclib keeps
> failing. I get the following error message:
>
> Assembler messages:
> Fatal error: can't create egr_n.o: Input/output error
>
> Any clue about how to solve this?

No, sorry. Perhaps this is where you happen to run out of memory?

I have a new autotools-based release of eclib, which will be turned
into a new spkg after the weekend, and with luck that will settle some
build issues.

John
(eclib author)

>
> And in a related question: is there any compiled tarball of sage for
> arm available somewhere?
>

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

mmarco

unread,
Apr 7, 2012, 6:29:41 PM4/7/12
to sage-devel

> No, sorry.  Perhaps this is where you happen to run out of memory?

It's possible. I think i hit into a memory problem with symmetrica,
but solved it enabling a 512mb swap file. Maybe it wasn't enough for
eclib.

> I have a new autotools-based release of eclib, which will be turned
> into a new spkg after the weekend, and with luck that will settle some
> build issues.
>
OK, i will take a look.thanks.

Dima Pasechnik

unread,
Apr 8, 2012, 2:27:55 AM4/8/12
to sage-...@googlegroups.com
On 2012-04-07, mmarco <mma...@unizar.es> wrote:
> Ok, i finally got the tablet, installed ubuntu in a chroot, and tried
Could you tell is the specifications of your tablet?

> to compile sage. The build process went on pretty far,but eclib keeps
> failing. I get the following error message:
>
> Assembler messages:
> Fatal error: can't create egr_n.o: Input/output error
>
> Any clue about how to solve this?

indeed, it looks like a memory issue. Set up a 1Gb swap or so...
On AC100 ARM subnotebooks similar problems arise.

>
> And in a related question: is there any compiled tarball of sage for
> arm available somewhere?

No, although I guess I can try to make one.
>

mmarco

unread,
Apr 8, 2012, 4:49:17 AM4/8/12
to sage-devel

> Could you tell is the specifications of your tablet?
>

It's an asus transformer prime. The processor is an nvidia tegra 3.

bash-4.0# more /proc/cpuinfo
Processor : ARMv7 Processor rev 9 (v7l)
processor : 0
BogoMIPS : 1993.93

processor : 1
BogoMIPS : 1993.93

processor : 2
BogoMIPS : 1993.93

processor : 3
BogoMIPS : 1993.93

Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 9

Hardware : cardhu
Revision : 0000
Serial : 0245000080844000

It has 1gb of ram, although it seems that the android processes use
quite a bit of it. I will try now to set 1gb of swap and see if it
works.



> No, although I guess I can try to make one.
>>

That would be really helpful, thanks.

Julien Puydt

unread,
Apr 8, 2012, 4:01:06 AM4/8/12
to sage-...@googlegroups.com
Le Sat, 7 Apr 2012 14:36:16 -0700 (PDT),
mmarco <mma...@unizar.es> a écrit :


> And in a related question: is there any compiled tarball of sage for
> arm available somewhere?

I had made one available, but it was ages ago, so the file is probably
not available anymore : my provider's big files service keeps them
around six months after the last download.

Additionally, I can't remember if it was armel or armhf...

Snark on #sagemath

mmarco

unread,
Apr 8, 2012, 8:33:24 AM4/8/12
to sage-devel
Ok, i have tried to enable 2 gigs of swap space, and it keeps
failing with the same error message, although it takes much more time
to crash (from 8 minutes without swap to more than two hours with the
2 gigs). It really sounds like a memory problem, but i am not sure
that more swap would solve it.

Dima Pasechnik

unread,
Apr 8, 2012, 9:56:44 AM4/8/12
to sage-...@googlegroups.com

I didn't try building the latest beta.
Could it be a recent update issue?

>

Dima Pasechnik

unread,
Apr 8, 2012, 9:59:23 AM4/8/12
to sage-...@googlegroups.com
On 2012-04-08, mmarco <mma...@unizar.es> wrote:
and you surely should tell us what version of Sage you are trying to
build.


mmarco

unread,
Apr 8, 2012, 10:20:08 AM4/8/12
to sage-devel
its version 4.8, with flint 1.5.2

mmarco

unread,
Apr 8, 2012, 10:21:41 AM4/8/12
to sage-devel
and my chroot environment is ubuntu 9.11 armel.

Dima Pasechnik

unread,
Apr 8, 2012, 1:26:47 PM4/8/12
to sage-...@googlegroups.com
On 2012-04-08, mmarco <mma...@unizar.es> wrote:
> and my chroot environment is ubuntu 9.11 armel.

Snark and me are using a newer ubuntu, 11.10.
And no chroot, but a native Linux, with Android wiped out for good.
So it's a fairly different setup. I guess if I compile Sage it would
not run on your setup.

Dmitrii

Volker Braun

unread,
Apr 8, 2012, 2:21:51 PM4/8/12
to sage-...@googlegroups.com
On Saturday, April 7, 2012 10:36:16 PM UTC+1, mmarco wrote:
Assembler messages:
Fatal error: can't create egr_n.o: Input/output error

Something is wrong with your storage. Do you have enough free disk space in the debian image? A good file system? Any storage-related errors in the system log?

Julien Puydt

unread,
Apr 8, 2012, 2:51:08 PM4/8/12
to sage-...@googlegroups.com
Le Sun, 8 Apr 2012 17:26:47 +0000 (UTC),
Dima Pasechnik <dim...@gmail.com> a écrit :

> On 2012-04-08, mmarco <mma...@unizar.es> wrote:
> > and my chroot environment is ubuntu 9.11 armel.
>
> Snark and me are using a newer ubuntu, 11.10.

and armhf

> And no chroot, but a native Linux, with Android wiped out for good.
> So it's a fairly different setup. I guess if I compile Sage it would
> not run on your setup.

Indeed, I had seen the hardware device, but had not realized android
was still there.

Snark on #sagemath

Dima Pasechnik

unread,
Apr 8, 2012, 11:11:01 PM4/8/12
to sage-...@googlegroups.com
On 2012-04-08, Julien Puydt <julien...@laposte.net> wrote:
> Le Sun, 8 Apr 2012 17:26:47 +0000 (UTC),
> Dima Pasechnik <dim...@gmail.com> a écrit :
>
>> On 2012-04-08, mmarco <mma...@unizar.es> wrote:
>> > and my chroot environment is ubuntu 9.11 armel.
>>
>> Snark and me are using a newer ubuntu, 11.10.
>
> and armhf

I am not sure I have armhf, and not armel.
How can I tell for sure?

Dima

mmarco

unread,
Apr 9, 2012, 7:19:43 AM4/9/12
to sage-devel

I can install a newer ubuntu system in a chroot. I think that the fact
of running under a chroot environment shouldn't prevent the sage build
from running. All the libraries are in the chroot jail.

So if you have an armel build, i can give it a try.

Julien Puydt

unread,
Apr 7, 2012, 3:40:54 AM4/7/12
to sage-...@googlegroups.com
Le lundi 09 avril, mmarco a écrit:

> So if you have an armel build, i can give it a try.

I'll dig the documentation to find out how to make one of what I have
(I think it's a 5.0.beta4 or 5.0.beta5), and post a link.

Snark on #sagemath

leif

unread,
Apr 10, 2012, 12:20:24 AM4/10/12
to sage-devel
On 7 Apr., 23:55, John Cremona <john.crem...@gmail.com> wrote:
> I have a new autotools-based release of eclib, which will be turned
> into a new spkg after the weekend, and with luck that will settle some
> build issues.


Nice. No more `make` warnings due to Makefiles including each other,
no more superfluous libraries added... ;-)

Incidentally I was again thinking of cleaning up its build files just
a few days ago. (I partially did that about 1 1/2 years ago, but
unfortunately lost the changes.)


-leif

John Cremona

unread,
Apr 10, 2012, 6:48:00 AM4/10/12
to sage-...@googlegroups.com

If you are interested in taking a look, it is at
http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/ (NB not
yet an spkg)

John

>
> -leif

Julien Puydt

unread,
Apr 7, 2012, 10:00:00 AM4/7/12
to sage-...@googlegroups.com
Le mardi 10 avril, John Cremona a écrit:

> If you are interested in taking a look, it is at
> http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/ (NB not
> yet an spkg)

I configure-d, make-d and make check-ed it on x86_64 and on ARM : no
problem (and out of tree).

I had a look at the configure.ac ; it looks good, but I still
have two remarks :
(1) "-Wall -Werror" : nifty!
(2) is it even possible that a libm doesn't contain "cos"!?

I also read libsrc/Makefile.am : can't the file listed in
EXTRA_DIST be put in the various *_DOTHS?

In tests/Makefile.am :
(1) same remark about curvesort.cc in EXTRA_DIST ;
(3) the echo commands should perhaps be @echo, so we see the command
result and not the command.

I hope that helps,

Snark on #sagemath

Julien Puydt

unread,
Apr 7, 2012, 10:43:05 AM4/7/12
to sage-...@googlegroups.com
Le samedi 07 avril, Julien Puydt a écrit:
> I'll dig the documentation to find out how to make one of what I have
> (I think it's a 5.0.beta4 or 5.0.beta5), and post a link.

Well, it's only a 4.8 after all : I only had one 5.0beta?? tree left,
and it was in a dubious state. 4.8 is the last which should work (even
though I didn't use it since long :-/)

I ran "./sage -bdist 4.8", then removed the obtained .tar.gz, then
re-made a .tar.bz2 (and it's still big...).

Here it is: http://dl.free.fr/gqloNmzVD

Jeroen Demeyer

unread,
Apr 10, 2012, 11:56:35 AM4/10/12
to sage-...@googlegroups.com
On 2012-04-07 16:00, Julien Puydt wrote:
> -Werror

I haven't looked at the new eclib, but please don't use -Werror. Some
devel version of MPC broke because of that, I managed to convince the
MPC developers to remove -Werror. You just don't know which warnings
different versions of gcc will produce on different systems.

I'm all for using -Werror for your own personal development, but don't
use it on everybody's systems.

John Cremona

unread,
Apr 10, 2012, 12:20:55 PM4/10/12
to sage-...@googlegroups.com
Julien,

Sorry that I had not responded to this -- probably eclib issues should
be in another thread.

Although I interpreted your "nifty" as positive, I take Jeroen's point
about not using -Werror, but I'll leave in -Wall.

On 7 April 2012 15:00, Julien Puydt <julien...@laposte.net> wrote:
> Le mardi 10 avril, John Cremona a écrit:
>> If you are interested in taking a look, it is at
>> http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/  (NB not
>> yet an spkg)
>
> I configure-d, make-d and make check-ed it on x86_64 and on ARM : no
> problem (and out of tree).

Hooray!

>
> I had a look at the configure.ac ; it looks good, but I still
> have two remarks :
> (1) "-Wall -Werror" : nifty!
> (2) is it even possible that a libm doesn't contain "cos"!?

Perhaps I should take out that test for libm, and also the one for
gmp, since it definitely will not build without a working NTL and pari
(which will be the case with Sage), and eclib does not call gmp
directly.

>
> I also read libsrc/Makefile.am : can't the file listed in
> EXTRA_DIST be put in the various *_DOTHS?

I could rename that variable as (say) extra_includes and add it to the
DOTHS list. They are not header files though.

>
> In tests/Makefile.am :
> (1) same remark about curvesort.cc in EXTRA_DIST ;

OK

> (3) the echo commands should perhaps be @echo, so we see the command
> result and not the command.

I have wondered how to do that for about 25 years, thanks! It never
seemed so serious that I bothered to find out.

>
> I hope that helps,

It certainly does. I'll make a new version and post it. Thanks a lot
for the constructive comments.

John

>
> Snark on #sagemath

John Cremona

unread,
Apr 10, 2012, 12:27:20 PM4/10/12
to sage-...@googlegroups.com
PS

>> I also read libsrc/Makefile.am : can't the file listed in
>> EXTRA_DIST be put in the various *_DOTHS?
>
> I could rename that variable as (say) extra_includes and add it to the
> DOTHS list.  They are not header files though.
>

The files listed in EXTRA_DIST are needed when building the library,
but not in useing the library. So they need to be in the distributed
files, but need not be noticed by "make install". I'll leave them as
they are.

John

John Cremona

unread,
Apr 10, 2012, 12:38:13 PM4/10/12
to sage-...@googlegroups.com
On 10 April 2012 17:20, John Cremona <john.c...@gmail.com> wrote:
> Julien,
>
> Sorry that I had not responded to this -- probably eclib issues should
> be in another thread.
>
> Although I interpreted your "nifty" as positive, I take Jeroen's point
> about not using -Werror, but I'll leave in -Wall.
>
> On 7 April 2012 15:00, Julien Puydt <julien...@laposte.net> wrote:
>> Le mardi 10 avril, John Cremona a écrit:
>>> If you are interested in taking a look, it is at
>>> http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/  (NB not
>>> yet an spkg)
>>
>> I configure-d, make-d and make check-ed it on x86_64 and on ARM : no
>> problem (and out of tree).
>
 I'll make a new version and post it.

Done: http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/eclib-2012-04-10.tar.gz

John

mmarco

unread,
Apr 10, 2012, 6:17:10 PM4/10/12
to sage-devel

>
> Well, it's only a 4.8 after all : I only had one 5.0beta?? tree left,
> and it was in a dubious state. 4.8 is the last which should work (even
> though I didn't use it since long :-/)
>
> I ran "./sage -bdist 4.8", then removed the obtained .tar.gz, then
> re-made a .tar.bz2 (and it's still big...).
>
> Here it is:http://dl.free.fr/gqloNmzVD
>
> I hope that helps,
>
> Snark on #sagemath

Thanks. I have tried to download it, but it goes so slow that the
connection is closed before i can download it. Can you please upload
it to some faster server? or divide it in smaller pieces?

mmarco

unread,
Apr 11, 2012, 1:51:12 PM4/11/12
to sage-devel
I have finally downloaded the file, and it doesn't run on my tablet.
It seems that it was compiled in a different setup. I have changed to
a newer version of ubuntu, and will try to compile from source. John,
is your new version of eclib available as an spkg?

John Cremona

unread,
Apr 11, 2012, 3:22:19 PM4/11/12
to sage-...@googlegroups.com

Not yet, sorry. I have had other things to do but hope to get to it in
the next couple of days.

John

mmarco

unread,
Apr 23, 2012, 3:54:54 PM4/23/12
to sage-devel
Ok, switching to a newer version of ubuntu solved the eclib problem.
Now i have another one. Building the sage package i get this error
message:

Building modified file sage/ext/interpreters/wrapper_el.pyx.
Executing 296 commands (using 4 threads)
Traceback (most recent call last):
File "setup.py", line 830, in <module>
execute_list_of_commands(queue)
File "setup.py", line 287, in execute_list_of_commands
execute_list_of_commands_in_parallel(command_list, nthreads)
File "setup.py", line 238, in execute_list_of_commands_in_parallel
p = Pool(nthreads)
File "/sage/sage-4.8/local/lib/python/multiprocessing/__init__.py",
line 227, in Pool
return Pool(processes, initializer, initargs)
File "/sage/sage-4.8/local/lib/python/multiprocessing/pool.py", line
84, in __init__
self._setup_queues()
File "/sage/sage-4.8/local/lib/python/multiprocessing/pool.py", line
131, in _setup_queues
self._inqueue = SimpleQueue()
File "/sage/sage-4.8/local/lib/python/multiprocessing/queues.py",
line 328, in __init__
self._rlock = Lock()
File "/sage/sage-4.8/local/lib/python/multiprocessing/
synchronize.py", line 117, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
File "/sage/sage-4.8/local/lib/python/multiprocessing/
synchronize.py", line 49, in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value,
maxvalue)
OSError: [Errno 38] Function not implemented
sage: There was an error installing modified sage library code.


It seems that some os function that sage uses is not provided by the
android kernel. Maybe this means that there is no hope for sage runing
over android in a chroot?

Paulo César Pereira de Andrade

unread,
Apr 23, 2012, 4:55:57 PM4/23/12
to sage-...@googlegroups.com

I did not look very closely at a related issue in chroot'ed builds in x86,
but it should be possible to make python multiprocessing use some
other approach like pipes in these conditions. What I did to get sage
to build in the Mandriva build system was to "backport" the previous
logic for a single process build:

http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/sagemath/current/SOURCES/sage-4.8-build.patch?r1=767969&r2=767968&pathrev=767969

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

Paulo

John Cremona

unread,
Apr 23, 2012, 5:43:34 PM4/23/12
to sage-...@googlegroups.com
On 23 April 2012 20:54, mmarco <mma...@unizar.es> wrote:
> Ok, switching to a newer version of ubuntu solved the eclib problem.

I did not report back to you but there is now a new eclib spkg at
http://trac.sagemath.org/sage_trac/ticket/10993

John

mmarco

unread,
Apr 23, 2012, 6:23:44 PM4/23/12
to sage-devel

>
> I did not look very closely at a related issue in chroot'ed builds in x86,
> but it should be possible to make python multiprocessing use some
> other approach like pipes in these conditions. What I did to get sage
> to build in the Mandriva build system was to "backport" the previous
> logic for a single process build:
>
> http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/sagemath/c...
>

Thanks, how can i do to apply that patch?

leif

unread,
Apr 23, 2012, 8:36:33 PM4/23/12
to sage-devel
Before attempting that, perhaps first take a look at

http://trac.sagemath.org/sage_trac/ticket/5965

(and search sage-devel for this quite frequent issue, perhaps "/dev/
shm", for further details).


-leif

leif

unread,
Apr 23, 2012, 8:59:12 PM4/23/12
to sage-devel

mmarco

unread,
Apr 24, 2012, 12:07:44 PM4/24/12
to sage-devel
There is no /dev/shm in my android system. Could it be that this is
the problem? If so, is there any hope of solving it?

mmarco

unread,
Apr 24, 2012, 12:46:30 PM4/24/12
to sage-devel

Nevermind, it worked by mounting an empty tmpfs as shm device

Paulo César Pereira de Andrade

unread,
Apr 24, 2012, 4:48:10 PM4/24/12
to sage-...@googlegroups.com
Em 24 de abril de 2012 13:46, mmarco <mma...@unizar.es> escreveu:
>
> Nevermind, it worked by mounting an empty tmpfs as shm device

Good to know the real issue :-) My workaround only works for
missing /dev/shm. Missing /dev/pts on build chroots I managed
to bug at Mandriva sometime ago, to get it properly mounted in
build nodes, otherwise it cannot generate documentation because
gap would fail to start.

> On 24 abr, 18:07, mmarco <mma...@unizar.es> wrote:
>> There is no /dev/shm in my android system. Could it be that this is
>> the problem? If so, is there any hope of solving it?

Paulo

Reply all
Reply to author
Forward
0 new messages