Skip to content

Enhancements to sage-rebase scripts #20986

@embray

Description

@embray

The scripts sage-rebase(all).{sh,bat} are used when developing/building Sage on Windows.

In the long term I'd like to find a way to reduce the need for them, but even then they're still good to have. It is useful to run these every now and then to ensure that all DLLs in the Sage distribution are configured to load into non-overlapping address ranges by default. First and foremost this is a performance issue, but also not rebasing can cause failures with Cygwin's fork.

To summarize what this ticket changes:

  • In the wrapper batch scripts, it's no longer necessary to manually adjust CYGWIN_ROOT and SAGE_ROOT. In fact, SAGE_ROOT is not needed by these scripts so much as SAGE_LOCAL, the path to which is automatically detected from the location of the script. CYGWIN_ROOT is determined from the registry. This may be incorrect if there are multiple Cygwin installations on the system, but this is unlikely in most cases. Furthermore, with the changes I'm making for Add auto-rebasing mechanism for Cygwin #15423 there will be less need to use the batch script in the first place (I have rarely had to use them in a long time now).
  • In the sage-rebase.sh and sage-rebaseall.sh scripts:
    • Now the implementation is all just in sage-rebase.sh, which has grown an --all flag for performing rebaseall. So sage-rebaseall.sh is just a wrapper around sage-rebase.sh --all. This reduces a lot of code duplication.
    • The script excludes anything under /var/tmp so that build artifacts don't take up space in the address space layout.
    • The script does now include .fas modules for ECL, which were previously not included in the rebase.
    • It is possible to pass the path to $SAGE_LOCAL to the scripts as an argument, so it's not necessary for $SAGE_LOCAL to be set before running them (useful sometimes during development).
    • It is possible to pass arbitrary additional flags to the underlying rebase/rebaseall commands.

This is just a small collection of enhancements to these scripts. Most importantly, this adds support for rebase .fas binaries that are part of ECL. Not doing this potentially caused problems for Maxima (so I'm marking this as a defect).

CC: @jpflori

Component: porting: Cygwin

Keywords: cygwin windows

Author: Erik Bray

Branch/Commit: df53e2f

Reviewer: Jean-Pierre Flori

Issue created by migration from https://trac.sagemath.org/ticket/20986

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions