-
-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support to an ARM processor #10285
Comments
Log from the failed build |
comment:1
Attachment: log.gz I had a wonderful idea this night : compiling with "make -k" instead of make, so the compilation goes through all packages and go on even on error. That means running "make -k 2>&1 > build.log" has given me a log with the failed build of the only problematic packages! So here is the full list of things which don't build on this box (grep build.log -B1 -e Finished) : atlas-3.8.3.p16, boehm_gc-7.1.p6, flint-1.5.0.p5, singular-3-1-1-4.p3, symmetrica-2.0.p5,tachyon-0.98beta.p11. |
comment:2
W. Hart from FLINT saw something very interesting in the logs : the errors about Thumb support happen on assembly files which come from C-files -- so in fact the compiler which is generating wrong assembly. I reported that as : https://bugs.launchpad.net/ubuntu/+bug/677360 Getting that right won't fix all packages, but should definitely help. |
comment:3
Hi there. I found this ticket via: There's a bunch of things going on here and they look like the package has been configured incorrectly. I don't think the compiler is at fault. This code:
is x86 assembler. This line:
fails due to the ARM compiler being passed the x86 specific -m32 flag. This code:
is due to a swp instruction being used in inline assembly instead of the correct ldrex. I know that Boehm GC 7.2 does this correctly and suspect that 7.1 does as well, so you might have another configuration problem. |
comment:4
Let me summarize what has been found so far :
|
comment:5
I found where the problem is introduced in flint-1.5.2's source code -- waiting for feedback from upstream (W.Hart already answered me and thought it may have been a compiler problem -- I just found out it isn't). |
comment:6
I don't know why I came to own that bug :-/ |
comment:7
For symmetrica, I discovered the problem was that the compiler went out of memory : adding more swap, I was able to get it to compile in sage. So as things stand : (1) atlas-3.8.3.p16 doesn't build for several reasons (I haven't investigated yet) ; |
Attachment: build.log Build log from the failed build with all problems listed |
comment:8
I pushed things further -- it's taking shape :
|
comment:9
I opened ticket #10328 for the flint package, giving everything to make it just work. |
comment:10
Why am I again the owner!? Sigh. Singular-3-1-3 will have support for the tegra2 processor (yes, that means I had good feedback :-) ) |
comment:11
Ok, as far as I know, atlas is the last hurdle (and what a hurdle). I have a strange problem with Boehm' GC version 7.2 though : the spkg I made doesn't build as-is. If I use my usual shell, export SAGE_LOCAL, then unpack my spkg and ./spkg-install, all is fine. If I use sage -sh, then the resulting shell isn't able to compile the package! I first get strange warnings in the configure step : checking if gcc supports -c -o file.o... rm: cannot remove `conftest*': No such file or directory then it goes on trying to build (which is already surprising) : /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -g -O2 -MT allchblk.lo -MD -MP -MF .deps/allchblk.Tpo -c -o allchblk.lo allchblk.c Could someone lend me a hand? |
comment:12
Often, errors during ATLAS build are no problem: The tuning process builds different assembly implementations to benchmark on your particular hardware and its OK if these fail. Of course some errors, on the other hand, are genuine bugs ;-) You could try #10226, although I doubt that it would make any difference on ARM. |
comment:13
Replying to @vbraun:
Those errors are not during the build when ATLAS tries to optimize. They happen during the configuration, when ATLAS decides what it will try. This step definitely doesn't work with that processor, and their organisation is so special I haven't understood how it works yet. The only documentation I found was how to use it when it works -- not how to extend and fix it. I reported the issue upstream as : https://sourceforge.net/tracker/index.php?func=detail&aid=3111857&group_id=23725&atid=379483 I'm now fully stuck... :-( |
comment:14
I could push sage build much further those last days :
For the rest, I'm still building... |
comment:15
So, yesterday I wrote that it was still building ; this is what I have to say this morning :
Yes, that means that my latest list of problems was the last : I have sage up on a toshiba AC100 -- a netbook running an ARM processor. |
comment:24
Every Sage release passes all doctests on the supported platforms. Unless you added a patch that causes the pickling/deprecation errors the doctest should pass. It is possible that you end up in a different code path while unpickling... |
comment:25
I tried to track the issue of gamma(float(6)) not being equal enough to 120 (sic). The ptestlong log points to devel/sage-main/sage/functions/other.py ; where I learn gamma is a GinacFunction 'tgamma' ; ginac is implemented in the pynac-0.2.1 package. Notice that if I call gamma(float(6), prec=10) then I get to call the mpmath version which returns the correct result. In the pynac-0.2.1 package, things get hairy, but it seems I end up calling Number_T::tgamma, which is just py_funcs.py_tgamma. Of course, py_funcs is only declared in the pynac package, so hunting where it is wasn't that simple. I managed to find the trail again by checking which packages depend on pynac in spkg/standard/deps : none. So I turned to sage-4.6, where I found : py_funcs.py_tgamma = &py_tgamma, implemented in ./sage/symbolic/pynac.pyx, where as far as I understand, since float(6) is a float, I guess the type checking leads me to sage_tgammal, which is defined in ./sage/symbolic/pynac_cc.h ; since I'm not running cygwin, this function is just calling tgammal... which is in math.h. And I checked that this tgammal returns 120 with a printf ("%Lg\n", tgammal(6.)); ... so I'm a little at loss to where the error can come from. Where did I fail in my search? |
comment:26
Are you using tgammal from C or Cython? A good test would be (run in notebook):
|
comment:27
This cython code gives a good answer. Notice that it leaves open the question : where did I fail in my seach? |
comment:28
Replying to @vbraun:
as far as floating point goes, 119.99999999999997 is definitely equal to 120... Regarding the pickling, is this even a stable failure, i.e. when you re-run this particular test, do you see exactly the same error |
comment:29
Well, I have two questions : (1) if those floating point numbers are supposed to be considered equal, why isn't the test designed to pass up to an epsilon? (2) how do you explain the test fails, but I'm unable to pinpoint exactly how that test-failing result is found? Yes, the errors are stable. The fact that there are "DeprecationWarning" all over is strange. |
comment:30
I'd say the "DeprecationWarning" are expected by the test.
I think the dots means that you can match anything between before the dots and after the dots. Here is the results of that test on a machine where it passes:
S the only worrying thing is the failure to unpickle. |
comment:32
Replying to @SnarkBoojum:
Sorry, I think I was too quick here. The precision achieved is less than 2e-14, which seems to be too coarse to me. (2) how do you explain the test fails, but I'm unable to pinpoint exactly how that test-failing result is found? dig deeper... :-)
can you check whether it's pickling or unpickling that is failing? |
comment:33
Replying to @SnarkBoojum:
can you insert printfs in sage/symbolic/pynac_cc.h to see how sage_tgammal is actually called, with which parameters, what it returns, etc? (don't forget to run "sage -b" after the change...) |
comment:34
I added : and then got : Thanks to fbissey for the help. |
comment:35
Gasp! I thought I already checked my -lm for correctness, but now I tried : jpuydt@hecke:/tmp$ cat test.c int |
comment:36
Replying to @SnarkBoojum:
OK, so this is a libc bug -- well, assuming all the 53 bits of the fractional part of the IEEE double should be correct in this case |
comment:37
Replying to @dimpase:
I feel very annoyed by this : when I tracked the call stack, I found a working implementation, and now it seems I missed something... I must have checked "double" instead of "long double" :-( The version is : eglibc (2.12.1-0ubuntu10.2). My main box' is : eglibc (2.11.2-11). I'll see with upstream. So that means only the pickling problems are left. Thanks! |
comment:38
The libc issue is reported as : https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/713985 |
comment:39
With sage-4.7rc2, there are only two build problems left : atlas and singular. From the respective bug reports, I think one will be fixed in 4.7, but the other will have to wait. |
comment:41
With sage 4.7.2alpha4, there are three problems left (or four with ubuntu) :
and you can add a fourth when the distribution is ubuntu : readline (#11970). |
comment:42
The link I gave for singular is obsolete : I opened bug #12110 instead. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:46
I think we can close this one... |
Reviewer: Jean-Pierre Flori |
The compilation of sage 5.0.beta9 fails on toshiba ac100 netbooks, with an arm processor running an ubuntu distribution.
Relevant tickets:
#10328 (the one needed for successful building of 5.0.beta9, positive review)
Ones which are fixing bugs:
#12371 (fixing C types related bug in vertex_separator, positive review)
#12586 (maxima-related floating point stuff, needs work)
#12449 (log(gamma) for floating point related stuff, needs work)
Component: build
Keywords: ARM
Reviewer: Jean-Pierre Flori
Issue created by migration from https://trac.sagemath.org/ticket/10285
The text was updated successfully, but these errors were encountered: