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
gf2x: disable hardware-specific code #45299
Conversation
This was causing "Illegal instruction" issues in the ntl testsuite when it was executed on a different cpu than the one gf2x was built on (43679).
Success on x86_64-darwin (full log) Attempted: gf2x Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: gf2x Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: gf2x Partial log (click to expand)
|
The 1.1 version in 18.03 is missing this configure option, so it's probably just fine. |
The issue remained undetected until I enabled the tests for ntl. It also requires a specific builder combination. So it is probably present in 18.03. |
I think the configure option was just added later when people complained. See https://trac.sagemath.org/ticket/15316. |
Well, 1.2 could be backported with this fix, if that's better. Though I've seen noone complaining about a problem on 18.03... |
Yeah I think the problem would only occur when the wrong builder picks up gf2x and then only when the users machine is pretty old. Given the short remaining lifetime of 18.03, I'm not sure if a backport is worth it. In either case I recently dislocated my shoulder and won't be able to do it myself. |
(cherry picked from commit fe0c07a) On nixpkgs master we were running into "Illegal instruction" problems, and apparently the same might happen on 18.03 (without this cherry-pick).
Hmm, cherry-picks themselves were easy enough, getting the same expression as on nixpkgs master, but the one adding this option resulted into a build error, so I dropped the effort for now :-/
|
During the gf2x-1.2 build? That is very weird, since it has basically no dependencies and should behave just as on master. Does it build on master? |
Yes, it's very weird; master works both locally and on Hydra. I now tried on two machines (AMD and Intel), both are sandboxed x86_64 NixOS. |
Maybe 18.03 has a different gcc version? There was some discussion about weather or not "no hardware specific codes" should include sse2. I think they ended up disabling it but someone said that at least debians compiler made use of sse2 anyways IIRC. |
I had checked that, and it's 7.3.0 for both. |
Thats really weird, no idea what other stdenv change might cause this. Apparently there also is a --disable-sse2 flag, you might try adding that one too. |
x86_64 implies SSE2 support in principle. |
Yes, but I thought it may be worth a try anyways since the problem appears to be with sse2 support. |
It didn't make the error go away. BTW, I expect there are a few more flags to disable by default, right?
|
Thats a shame. As far as I understand, It is probably a good idea to involve upstream here. |
@emmanuelthome, you opened the upstream ticket about |
Hi. Sorry I haven't touched gf2x for a (long) while. I understand you followed the path of using released gf2x-1.2 + cherry-picking some patches. Do you have a test procedure to validate a new tarball of gf2x, so as to see if it fixes the problems you encounter ? In the git version, I really don't see how mul2t.c could be compiled in if you passed --disable-hardware-specific-code ; FWIW it's spelled without an s, but I assume that was just a typo in your comment. |
We're using released 1.2 without any patches. We don't test gf2x directly, only indirectly through the tests of reverse-dependencies. However it has been a year and I don't quite remember the details of this problem. |
ok. I'd like to know if there's any misbehaviour identified in this bug report that I must make sure to fix before I release a new version. |
@emmanuelthome: fortunately, git+nix give very good reproducibility, so I did the same as described in my comment. Log: n07pqhjv2jj1vkkrybay8pxzc3h0zynf-gf2x-1.2.log, and I can easily retry the same with a different tarball/version. |
Thanks. Then yes, it's a bug in 1.2 ; fixed by later commits (58beff3 -- unfortunately no further release ever happened), and also in the master branch. I'm going to release the master branch (9c3a76f passes all tests), pending maybe a few last-minute fixes if something pops up (nothing comes to mind, but I've got a few further integration tests to make). If you could give a go to git version 9c3a76f and confirms that things work well, that would be great, |
Possible deadlock detected; I'm sorry, I was confused apparently. It's interesting that in current nixpkgs the error doesn't happen for me anymore, even though gf2x wasn't touched (gcc upgrade or something?). Still on that previous nixpkgs commit I do get that error, and when I use gf2x master (b7a5f021) there, that error goes away. I didn't try to understand the whys. |
FYI I released gf2x-1.3.0 yesterday. |
Thanks for the heads-up! Unfortunately NTL is not yet compatible with the new release, so we'll have to wait a bit. I've contacted the NTL author via email. Keep in mind that updating gf2x for nix (and probably other distros) would be a lot smoother if there were a predictable download link. In that case our automated tooling could suggest an update and we would just need to approve it. |
On Wed, Dec 11, 2019 at 01:56:04AM -0800, Timo Kaufmann wrote:
Keep in mind that updating gf2x for nix (and probably other distros) would be a lot smoother if there were a [predictable download link](https://gforge.inria.fr/tracker/index.php?func=detail&aid=21704&group_id=1874&atid=6982). In that case our automated tooling could suggest an update and we would just need to approve it.
Yeah. I know that. I'm gonna ditch the gforge platform soon anyway,
hopefully I'll get better links as a side-effect of moving to gitlab.
E.
…
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#45299 (comment)
|
GitLab is very nice. |
Switch source to fetchgit since it removes the requirements to manually find the correct link for each version. More information at NixOS#45299
The NTL author Victor Shoup has pushed a fix. Continuation in #76829. I've fixed the URL problem for now by just checking out the sources directly from git. |
Motivation for this change
This was causing "Illegal instruction" issues in the ntl testsuite when
it was executed on a different cpu than the one gf2x was built on
(43679).
Thanks @grahamc @dezgeg and clever from IRC (don't know their github handle) for tracking this issue down!
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)