-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
SageMath fails to build on on Fedora 28 with gcc 8.1 #25391
Comments
Linbox patch |
Attachment: multiple_templates.patch.gz Python2 patch |
Attachment: packing.patch.gz Attachment: crypt.patch.gz Python3 patch - 1 of 2 |
Python3 patch - 2 of 2 |
comment:1
Attachment: zzz_conf.patch.gz |
New commits:
|
Commit: |
comment:6
I'll be checking that this does not break on other systems. |
comment:7
Have you run tests on your branch?: This is something the ticket's author should do in such cases. |
comment:8
I haven't, but will do |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
What is happening with this on the current 8.3.beta6? |
comment:11
For Python3, it's apparently python/cpython#4691 which is still under review. |
comment:12
I am missing some context and documentation. The current branch only fixes Python 3. That is not consistent with the ticket description which mentions several packages and doesn't even mention the actual failure that the Python 3 patch is trying to fix. |
comment:13
The patch files should also contain some description, at a minimum a link to the upstream issue. And if you add a patch to a package, you should bump the package version. |
comment:14
Ok, I'm sorry if the description or the execution aren't up to par, this is my first ticket, so I'm getting used to it. The ticket was originally opened to describe the bug. After that, I succeeded in manually fixing all the bugs listed in the description, but it was brought to my attention that two of my bugs were solved in separate tickets at the same time (see the dependencies field), so I merged those tickets and added my own fix for python3, thus fixing all the issues and solving the problem stated in the ticket title, that is SageMath not compiling on Fedora 28 with gcc 8.1. Since the commits include the fixes for the other 2 bugs, even if by merging, I thought this counted as having a fix for all 3 of them in the branch, is this wrong? There is a description for the python 3 bug, since the bug is literally "Python tries to call crypt instead of crypt_r on Fedora, and this for some reason breaks things, so let's allow it to call crypt_r", and the reason why it breaks things is, as pointed out by dimpase, apparently that fedora has a completely different crypt implementation, as can be seen here https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt. I'll expand on the description a bit, anyway, to make this clearer, and also to reflect the fact that this ticket only directly fixes the python3 bug, since it's only reported in the comments. |
This comment has been minimized.
This comment has been minimized.
comment:36
Replying to @sagetrac-Vaush:
My understanding is that Perhaps this unusual design of |
comment:37
In fact, the call to
(where we see a warning in the logs). Here
Note that Python 2 does not do How about you try modifying the patch as I suggest in comment 31 (removing |
comment:38
I can do that later if you want, but it's not the string that gets chopped, it's the string's address. |
comment:39
What I don't know is what is supposed to happen on the import attempt. Does Did you see crypt actually being called? And with what values of |
comment:40
I remember them being set up correctly, and the call worked. Still, I am recompiling the whole of sage with debug symbols, I'll step through it again and report when I have news |
comment:41
Replying to @sagetrac-Vaush:
Posting the actual output from gdb would have been useful here... |
comment:42
Replying to @dimpase:
That's what my debugging patch attachment: crypt_debug.patch does. |
comment:43
Replying to @jdemeyer:
Yes, the point is that I don't have it anymore, since I did that 2 or 3 weeks ago. As I said, I am now recompiling sage with debug symbols to redo it and post the output. |
Attachment: gdb_screenshot.png Screenshot of gdb's output |
comment:44
Ok, for some reason I can't seem to step into crypt anymore, while earlier I could see the fact that crypt on my system was a wrap around crypt_r. Anyway, I used jdemeyer's patch, and I'm attaching gdb's output. What happens is that Python now segfaults on the printing attempt. |
comment:45
Could you post the output of ldd called on the corresponding *.so file? Did you use a custom-built crypt library at your 1st attempt? And, finally, could you add a print to show the value of the pointer |
comment:46
I don't remember using any custom-built library, so the answer would be no. This is the output of ldd on the built python executable and on libcrypt:
Finally, no, I can't print anything about it, unless you mean before the return value of crypt is assigned to it, since we introduced it with jdemeyer's patch. |
comment:47
Replying to @sagetrac-Vaush:
no, I mean the crypt..so or _crypt..so or whatever it is called; on one system I have it's here:
I meant, certainly, that you modify Jeroen's patch so that you print the value of the |
comment:48
Ok, sorry for the misunderstandings. Here is the output of ldd:
While now python outputs this during compilation:
As you can see, the address is compatible with the theory I presented, that in some way the value of the pointer gets chopped when coming out of crypt. Still no success in stepping into crypt, but I don't see why, it was so easy the first time around... |
comment:49
Replying to @sagetrac-Vaush:
I don't see how you'd step in a system library in a meaningful way - they usually are stripped, you won't see any symbols. Have a look at https://fedoraproject.org/wiki/StackTraces#Installing_debuginfo_RPMs_using_DNF |
comment:50
I installed the debug infos already, to no avail. |
comment:51
I have a theory. The If this theory is correct, then simply adding
should fix the problem. Could you try just adding that line to |
comment:52
Replying to @jdemeyer:
Or, as I have been saying already, just change the patch you are adding so that it drops
Now trying this out, with the right include:
and without include
Morale: pay attention to compiler warnings :-) |
comment:53
Replying to @dimpase:
Absolutely. I was totally confused earlier because the upstream PR incorrectly states "Because crypt() only depends on primitive C types, we currently get |
comment:54
This should be fixed in 3.7.0, so we should just upgrade when that version comes out. |
Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, in a later stable release. |
This comment has been minimized.
This comment has been minimized.
comment:55
I made #25771 to update to Python 3.6.6 which contains the backported crypt fix |
SageMath 8.3.beta1 building produced 3 different errors when run on Fedora 28 64bit with gcc 8.1, specifically when building the packages:
The 1st error manifests itself as a failure to import the crypt module during the build of Python 3.
It is due to an unspecified issue with Fedora 28 implementation of
crypt()
, which as reported in https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt is not the standard glibc implementation.This was fixed in https://bugs.python.org/issue32635
Upstream: Fixed upstream, in a later stable release.
CC: @dimpase
Component: build
Keywords: gcc8.1 python3 fedora28 compilation build
Author: Dario Asprone
Branch/Commit: u/Vaush/sagemath_fails_to_build_on_on_fedora_28_with_gcc_8_1 @
35c3c33
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/25391
The text was updated successfully, but these errors were encountered: