Skip to content
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

Remove Cygwin distro support #36778

Merged
merged 17 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 0 additions & 151 deletions .github/workflows/cygwin.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/extract-sage-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ fi
# Show all tar files
ls -l $*

# Cygwin note: We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
for a in $*; do
echo Extracting $a
(cd / && tar xf -) < $a
Expand All @@ -33,10 +32,3 @@ fi

# Show how we are doing on free space.
df -h

# Rebase!
case "$(uname)" in
CYGWIN*)
exec src/bin/sage-rebase.sh --all "$SAGE_LOCAL"
;;
esac
4 changes: 2 additions & 2 deletions build/bin/sage-apply-patches
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# the root of the package source.
#
# An optional patch subdirectory may be specified with the -d flag.
# For example `sage-apply-patches -d cygwin` applies only those
# patches under <patch-dir>/cygwin.
# For example `sage-apply-patches -d macos` applies only those
# patches under <patch-dir>/macos.
#
# The -p<num> arg is the argument accepted by the `patch` command,
# and overrides the default -p1
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-bootstrap-python
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SAGE_ORIG_PATH=${NEW_PATH%%':'}

# Trac #30177: Also check for hashlib.sha1 to guard against broken python2
# from old homebrew installations. Also check whether the current directory
# is accessible by this python; this is to guard on Cygwin against Pythons
# is accessible by this python; this is to guard on WSL against Pythons
# installed somewhere else in Windows.

# Trac #29285: Do not accept pythons that manipulate PATH, such as
Expand Down
11 changes: 2 additions & 9 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,9 @@ sdh_configure() {
if [ -z "$CONFIG_SHELL" ]; then
export CONFIG_SHELL=`command -v bash`
fi
if [ "$UNAME" = "CYGWIN" ]; then
# TODO: To use --disable-static for all packages on Cygwin, need
# #30814: Cygwin: Fix remaining packages to build shared libraries, using AM_LDFLAGS=-no-undefined
DISABLE_STATIC=
else
DISABLE_STATIC=--disable-static
fi
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" $DISABLE_STATIC --disable-maintainer-mode --disable-dependency-tracking "$@"
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-static --disable-maintainer-mode --disable-dependency-tracking "$@"
if [ $? -ne 0 ]; then # perhaps it is a non-autoconf'd project
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" $DISABLE_STATIC "$@"
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-static "$@"
if [ $? -ne 0 ]; then
if [ -f "$(pwd)/config.log" ]; then
sdh_die <<_EOF_
Expand Down
33 changes: 0 additions & 33 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -584,26 +584,6 @@ export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy

##################################################################
# We need to run sage-rebase.sh for each package installed, but it
# can be dangerous to do this while other packages are installing
# so we need to use a lock to manage when rebase is allowed to
# run. Because of this, if multiple sage-spkg runs are waiting on
# the rebase lock, we can end up with multiple consecutive rebase
# calls that are redundant, but I don't see an obvious way around
# that. This also unfortunately slows down parallel builds since
# all packages will eventually need to wait for this lock, but
# again there's no simple way around that.
##################################################################

if [ "$UNAME" = "CYGWIN" ]; then
# This is a global lock - so we use SAGE_LOCAL, not SAGE_INST_LOCAL.
if [ ! -d "$SAGE_LOCAL/var/lock" ]; then
mkdir -p "$SAGE_LOCAL/var/lock"
fi
exec 200>"$SAGE_LOCAL/var/lock/rebase.lock"
sage-flock -s $lock_type 200
fi

##################################################################
# Actually install
Expand Down Expand Up @@ -738,19 +718,6 @@ if [ -f spkg-postinst ]; then
fi
fi

if [ "$UNAME" = "CYGWIN" ]; then
# Drop our sage-spkg's shared lock, and try to call sage-rebase.sh
# under an exclusive lock
sage-flock -u 200

# Rebase after installing each package--in case any packages load this
# package at build time we need to ensure during the build that no binaries
# have conflicting address spaces
echo "Waiting for rebase lock"
sage-flock -x "$SAGE_LOCAL/var/lock/rebase.lock" \
sage-rebase.sh "$SAGE_LOCAL" 2>/dev/null
fi


# Note: spkg-check tests are run after the package has been copied into
# SAGE_INST_LOCAL. It might make more sense to run the tests before, but the
Expand Down
14 changes: 4 additions & 10 deletions build/bin/sage-venv
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,13 @@ options = parser.parse_args()
if options.upgrade and options.clear:
raise ValueError('you cannot supply --upgrade and --clear together.')

if sys.platform == 'cygwin':
# default for Cygwin; see https://github.com/sagemath/sage/issues/30149
use_symlinks = False
else:
# default for posix
# On macOS, definitely need symlinks=True (which matches what we test in build/pkgs/spkg-configure.m4)
# or it may fail with 'dyld: Library not loaded: @executable_path/../Python3' on macOS.
use_symlinks = True


# On macOS, definitely need symlinks=True (which matches what we test in build/pkgs/spkg-configure.m4)
# or it may fail with 'dyld: Library not loaded: @executable_path/../Python3' on macOS.
b = venv.EnvBuilder(system_site_packages=options.system_site,
clear=options.clear,
upgrade=options.upgrade,
symlinks=use_symlinks)
symlinks=True)
c = b.ensure_directories(options.env_dir)
b.setup_python(c)
b.create_configuration(c)
Expand Down
7 changes: 0 additions & 7 deletions build/pkgs/ecl/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
cd src

if [ "$UNAME" = "CYGWIN" ]; then
# Some of ECL's sources rely on GNU-isms that are allowed by default on
# most glibcs, but not in newlib; https://github.com/sagemath/sage/issues/25057
CFLAGS="$CFLAGS -D_GNU_SOURCE"
CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
fi

export CFLAGS
export CXXFLAGS
export LDFLAGS
Expand Down
3 changes: 0 additions & 3 deletions build/pkgs/eclib/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ echo "would interfere with new builds..."
rm -f "$SAGE_LOCAL"/lib/lib{curvesntl,g0nntl,jcntl,rankntl,mwrank}.*
# Delete autotools libraries:
rm -f "$SAGE_LOCAL"/lib/lib{e,j}c.*
if [ "$UNAME" = "CYGWIN" ]; then
rm -f "$SAGE_LOCAL"/lib/cyg{e,j}c-*.dll
fi
echo "Deleting old include directory..."
rm -rf "$SAGE_LOCAL"/include/eclib/

Expand Down
6 changes: 0 additions & 6 deletions build/pkgs/ecm/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ else
echo "to, or '--with-pic' was given in ECM_CONFIGURE."
fi

if [ "$UNAME" == "CYGWIN" ]; then
# Force shared library build only on Cygwin; it will not build otherwise
ECM_CONFIGURE="$ECM_CONFIGURE --enable-shared --disable-static"
fi


if [ "$SAGE_DEBUG" = yes ]; then
# Add debug symbols and disable optimization:
echo >&2 "Warning: Setting SAGE_DEBUG=yes completely disables optimization."
Expand Down
6 changes: 0 additions & 6 deletions build/pkgs/fplll/spkg-check.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
cd src

if [ "$UNAME" = "CYGWIN" ]; then
echo "Disable parallel testing on Cygwin"
MAKE="$MAKE -j1"
fi

$MAKE check
10 changes: 0 additions & 10 deletions build/pkgs/fplll/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@ cd src || exit

INCLUDES="-I$SAGE_LOCAL/include/"

if [ "$UNAME" = "CYGWIN" ]; then
CXXFLAGS="$CXXFLAGS -std=gnu++11"
fi
CXXFLAGS="$CXXFLAGS -fPIC $INCLUDES -L$SAGE_LOCAL/lib"
CPPFLAGS="$INCLUDES"
CONFIGUREFLAGS="--prefix=$SAGE_LOCAL --libdir=$SAGE_LOCAL/lib"

if [ "$UNAME" = "CYGWIN" ]; then
echo "Disable parallel building on Cygwin"
MAKE="$MAKE -j1"
export MAKE
CONFIGUREFLAGS="$CONFIGUREFLAGS --disable-recursive-enum"
fi

if [ "x$SAGE_DEBUG" = "xyes" ]; then
CONFIGUREFLAGS="$CONFIGUREFLAGS --enable-debug"
fi
Expand Down
5 changes: 0 additions & 5 deletions build/pkgs/gc/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ cd src

GC_CONFIGURE="--enable-large-config"

if [ "$UNAME" = "CYGWIN" ]; then
# See https://github.com/sagemath/sage/issues/22694
GC_CONFIGURE="$GC_CONFIGURE --enable-threads=posix --enable-handle-fork"
fi

sdh_configure $GC_CONFIGURE
sdh_make
sdh_make_install
31 changes: 0 additions & 31 deletions build/pkgs/gf2x/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,3 @@ Upstream Contact
- Pierrick Gaudry
- Emmanuel Thomé
- Paul Zimmermann

Special Update/Build Instructions
---------------------------------

- As some patches touch config/acinclude.m4, we have to touch
aclocal.m4,
configure, Makefile.in and gf2x/gf2x-config.h.in to prevent autotools
to try to regenerate these files.

Patches
~~~~~~~

- 0001-Trac-15014-Let-gf2x-build-a-shared-library-on-Cygwin.patch: pass
-no-undefined flag to libtool.
- 0002-tr-portability.patch: backport upstream fix for non-portable tr
use
- 0003-Improve-detection-of-sse2-support.patch: backport upstream
improved check for sse2

- 0004-Add-disable-hardware-specific-code.patch: add option
-disable-hardware-specific-code to build system. This is partly
backported from upstream.

- 0005-Update-autotooled-files.patch: the above patches make changes to
code used by autotools for generation of the build system. This
patches
those files, so that autotools need not be installed.

- 0006-Fix_make_check_not_failing_on_errors.patch: (upstream patch)
Fix bug in shell script such that 'make check' always fails upon
errors.
Loading
Loading