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
Add auto-rebasing mechanism for Cygwin #15423
Comments
comment:4
I've found it simpler (and I have a patch) to just always rebase after every package build. It doesn't actually add much noticeable overhead. One thing I might want to do before pushing my patch is also make it so the I would say this is almost necessary for Cygwin builds; especially in an automated context like running the patchbot. |
comment:6
New method for rebasing DLLs continuously during Sage build, which should solve this issue. I've updated the ticket description to explain exactly what this does and why, but I left the old description just for comparison. New commits:
|
Commit: |
Author: Erik Bray |
This comment has been minimized.
This comment has been minimized.
Branch: u/embray/cygwin/ticket-15423 |
Dependencies: #20986 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Looks like that last commit has a merge conflict. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Reviewer: Jean-Pierre Flori |
comment:12
LGTM |
comment:13
In
If not, it would be cleaner to write the rebase script on a new line instead of continuing with Minor comment which you might as well fix: you don't need the parentheses |
comment:14
Nah the rebase script does only care about SAGE_LOCAL. |
Changed branch from u/embray/cygwin/ticket-15423 to u/jdemeyer/cygwin/ticket-15423 |
New commits:
|
Changed reviewer from Jean-Pierre Flori to Jean-Pierre Flori, Jeroen Demeyer |
comment:17
Ok, let's go with jeroen solution. |
comment:18
You're right, this is fine. |
Changed branch from u/jdemeyer/cygwin/ticket-15423 to |
As explained in the old description, it is often necessary when building Sage on Cygwin to rebase its DLLs. This is the process of updating the default base addresses in memory at which a list of DLLs are loaded, such that none of those DLLs overlap each other in memory (in the normal case that they do overlap, Windows relocates them, but this frequently leads to fork errors in Cygwin).
This ticket solves the problem by running the
sage-rebase.sh
script as part of thesage-spkg
script at the end of every package installation. It also runssage-rebase.sh
aftermake sagelib
for the same reason. Although running it after installing each package is generally unnecessary, sometimes it is necessary. For example, after installing Python, it's necessary to rebase to ensure that Python works, as it will be used later in the build process. Since rebasing doesn't actually add much overhead in terms of time, it's fine to just do it always (on Cygwin).Note that this also uses
sage-rebase.sh
versussage-rebaseall.sh
. The difference is that the former only updates DLLs in Sage itself (i.e. under$SAGE_LOCAL
) whereas the latter also rebases all DLLs in the Cygwin installation. Because of this, the latter cannot be run from inside Cygwin--all Cygwin processes must be stopped first. Obviously this would be too disruptive to the normal Sage build process, so we don't do that. It's also unnecessary. As long asrebaseall
is run once after installing Cygwin and all build dependencies, it will build a database of known DLLs and their base addresses and sizes, which can be referenced when rebasing new DLLs. Since building Sage doesn't affect any of the Cygwin system DLLs there's no need to rerunrebaseall
during a build of Sage.Fixing this is necessary for unattended Sage builds to succeed--otherwise the build will fail several times and require manual rebasing before proceeding.
Old Description
With Sage 5.12 (plus a few updated spkg, all of them available on trac), building Sage on Cygwin(32) is no harder than on Linux except for the need of rebasing a few times during the build process.
This could be automated in the following way
Having this would open the way to a buildbot or a patchbot for Cygwin.
Depends on #20986
CC: @kcrisman @dimpase @jdemeyer @jpflori @tscrim
Component: porting: Cygwin
Author: Erik Bray
Branch/Commit:
5e494ad
Reviewer: Jean-Pierre Flori, Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/15423
The text was updated successfully, but these errors were encountered: