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

macaulay2: 1.18 #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, macos-13, macos-14, macos-15]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
Expand Down
58 changes: 8 additions & 50 deletions Formula/macaulay2.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
class Macaulay2 < Formula

Check failure on line 1 in Formula/macaulay2.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-latest)

stable version should not decrease (from 1.24.05 to 1.18)
@name = "M2"
desc "Software system for algebraic geometry research"
homepage "http://macaulay2.com"
url "https://github.com/Macaulay2/M2/archive/refs/tags/release-1.24.05.tar.gz"
sha256 "63b8c9931a5cbd0b937ad6ddb81530c26f3fbe5971cc935d294772652ebcf101"
url "https://github.com/Macaulay2/M2/archive/refs/tags/release-1.18.tar.gz"
sha256 "139075b8c5c9709c5ffd4183ca7aded088c2622ec3d8873f83ad1dda343aa09f"
license any_of: ["GPL-2.0-only", "GPL-3.0-only"]
revision 1

head "https://github.com/Macaulay2/M2/archive/refs/heads/development.tar.gz"

bottle do
root_url "https://ghcr.io/v2/macaulay2/tap"
sha256 cellar: :any, arm64_sonoma: "9fa62984c1f40bda3720b556fb384bcec36fa7780c76d57234b039b1a6b430fd"
sha256 cellar: :any, ventura: "5b821509c8a71d914fb4fb2d2887601a315293052b01e86803ea85d5e460b645"
sha256 cellar: :any, monterey: "5c987cd5c60e83ad5ffe5fcb772277b2fc39918c6fcd252936630635eb455ae8"
sha256 x86_64_linux: "fdd8b0361c22e532c5b5107998d7dce913adaa23119ce5eca75d137cee48110d"
end

depends_on "bison" => :build
depends_on "cmake" => :build
Expand All @@ -32,11 +21,16 @@
depends_on "gdbm"
depends_on "givaro"
depends_on "gmp"
depends_on "libatomic_ops"
depends_on "libxml2" unless OS.mac?
depends_on "libffi"
depends_on "mathic"
depends_on "mathicgb"
depends_on "memtailor"
depends_on "mpfi"
depends_on "mpfr"
depends_on "mpsolve"
depends_on "msolve"
depends_on "node"
depends_on "ntl"
depends_on "openblas" unless OS.mac?
Expand All @@ -56,21 +50,15 @@

patch :DATA

def install

Check warning on line 53 in Formula/macaulay2.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-latest)

`brew install --verbose --formula --build-bottle macaulay2/tap/macaulay2` failed on Linux!

187 | else if p.left.word == leftbrace then Code(listCode(CodeSequence(),treePosition(e))) | ^~~~~~~~~ [114/347] /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-11 -DBOOST_REGEX_NO_LIB -DNDEBUG -DOM_NDEBUG -DSING_NDEBUG -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/d -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/e -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/c -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/BUILD/build-brew/Macaulay2/d -I/home/linuxbrew/.linuxbrew/opt/readline/include -I/home/linuxbrew/.linuxbrew/opt/libxml2/include/libxml2 -I/home/linuxbrew/.linuxbrew/opt/mpsolve/include -I/home/linuxbrew/.linuxbrew/opt/mathicgb/include -I/home/linuxbrew/.linuxbrew/opt/mathic/include -I/home/linuxbrew/.linuxbrew/opt/memtailor/include -I/home/linuxbrew/.linuxbrew/opt/frobby/include -I/home/linuxbrew/.linuxbrew/opt/flint/include -I/home/linuxbrew/.linuxbrew/opt/ntl/include -I/home/linuxbrew/.linuxbrew/opt/mpfi/include -I/home/linuxbrew/.linuxbrew/opt/mpfr/include -I/home/linuxbrew/.linuxbrew/opt/bdw-gc/include -I/home/linuxbrew/.linuxbrew/opt/tbb/include -I/home/linuxbrew/.linuxbrew/opt/gdbm/include -I/home/linuxbrew/.linuxbrew/opt/libatomic_ops/include -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/system -isystem /home/linuxbrew/.linuxbrew/opt/gmp/include -isystem /home/linuxbrew/.linuxbrew/Cellar/boost/1.86.0_1/include -isystem /home/linuxbrew/.linuxbrew/Cellar/givaro/4.2.0_1/include -isystem /home/linuxbrew/.linuxbrew/Cellar/fflas-ffpack/2.5.0/include -O3 -DNDEBUG -std=gnu11 -Wuninitialized -g3 -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/BUILD/build-brew/usr-host/include -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/include -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/BUILD/build-brew/include -Wall -Wextra -Wfatal-errors -Wcast-qual -Wno-unused-parameter -Wno-attributes -Wno-cast-qual -Wno-sign-compare -Wno-uninitialized -Wno-unused -Wno-frame-address -fopenmp -MD -MT Macaulay2/d/CMakeFiles/M2-interpreter.dir/struct-tmp.c.o -MF Macaulay2/d/CMakeFiles/M2-interpreter.dir/struct-tmp.c.o.d -o Macaulay2/d/CMakeFiles/M2-interpreter.dir/struct-tmp.c.o -c /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/BUILD/build-brew/Macaulay2/d/struct-tmp.c /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/d/struct.d: In function ‘struct_toIntArray_1’: /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/d/struct.d:100:19: warning: array subscript ‘struct M2_arrayint_struct[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Warray-bounds] 100 | fatal("internal error: toIntArray expected an array of ints"); | ^~ In file included from /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/include/M2/gc-include.h:42, from /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/BUILD/build-brew/Macaulay2/d/struct-exports.h:6, from /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/BUILD/build-brew/Macaulay2/d/struct-tmp.c:1: /home/linuxbrew/.linuxbrew/opt/bdw-gc/include/gc/gc.h:1044:31: note: referencing an object of size 4 allocated by ‘GC_malloc_atomic’ 1044 | # define GC_MALLOC_ATOMIC(sz) GC_malloc_atomic(sz) | ^~~~~~~~~~~~~~~~~~~~ /tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/d/struct.d:100:36: note: in expansion of macro ‘GC_MALLOC_ATOMIC’ 100 | fatal("internal error: toIntArray expected an array of ints"); | ^~~~~~~~~~~~~~~~ [115/347] /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/gcc-11 -DBOOST_REGEX_NO_LIB -DNDEBUG -DOM_NDEBUG -DSING_NDEBUG -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/d -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/e -I/tmp/macaulay2-20241021-16360-xg4smu/M2-release-1.18/M2/Macaulay2/c -I/tmp/macaulay2-20
# Don't print the shims prefix path
inreplace "M2/Macaulay2/packages/Macaulay2Doc/functions/findProgram-doc.m2", "Verbose => true", "Verbose => false"

# Don't print the shims prefix path
inreplace "M2/Macaulay2/packages/ForeignFunctions.m2", "get \"!brew --prefix\"", "getenv \"HOMEBREW_PREFIX\""

# c.f. https://github.com/Macaulay2/M2/issues/2682
inreplace "M2/Macaulay2/d/CMakeLists.txt", "M2-supervisor", "M2-supervisor quadmath" unless OS.mac?

# Place the submodules, since the tarfile doesn't include them
system "git", "clone", "https://github.com/Macaulay2/M2-emacs.git", "M2/Macaulay2/editors/emacs"
system "git", "clone", "https://github.com/Macaulay2/memtailor.git", "M2/submodules/memtailor"
system "git", "clone", "https://github.com/Macaulay2/mathic.git", "M2/submodules/mathic"
system "git", "clone", "https://github.com/Macaulay2/mathicgb.git", "M2/submodules/mathicgb"

# Prefix paths for dependencies
lib_prefix = deps.map { |lib| Formula[lib.name].prefix }.join(";")
Expand Down Expand Up @@ -99,26 +87,12 @@
system "#{bin}/M2", "--version"
system "#{bin}/M2", "--check", "1", "-e", "exit 0"
# system "#{bin}/M2", "--check", "2", "-e", "exit 0"
# system "#{bin}/M2", "--check", "3", "-e", "exit 0"
end
end

__END__

diff --git a/M2/Macaulay2/m2/packages.m2 b/M2/Macaulay2/m2/packages.m2
index d5ddc33bc..92f700b5c 100644
--- a/M2/Macaulay2/m2/packages.m2
+++ b/M2/Macaulay2/m2/packages.m2
@@ -188,7 +188,6 @@ needsPackage String := opts -> pkgname -> (
and instance(pkg := value PackageDictionary#pkgname, Package)
and (opts.FileName === null or
realpath opts.FileName == realpath pkg#"source file")
- and pkg.PackageIsLoaded
then use value PackageDictionary#pkgname
else loadPackage(pkgname, opts))

--
2.34.3

diff --git a/M2/cmake/check-libraries.cmake b/M2/cmake/check-libraries.cmake
index ca3effff15..45e6b11c81 100644
--- a/M2/cmake/check-libraries.cmake
Expand All @@ -134,19 +108,3 @@
set(Boost_stacktrace_lib "Boost::stacktrace_backtrace")
--
2.38.1

diff --git a/M2/Macaulay2/packages/Topcom.m2 b/M2/Macaulay2/packages/Topcom.m2
index 15832adfb1..e9af682733 100644
--- a/M2/Macaulay2/packages/Topcom.m2
+++ b/M2/Macaulay2/packages/Topcom.m2
@@ -317,7 +317,7 @@ topcomIsTriangulation(Matrix, List) := Boolean => opts -> (Vin, T) -> (
<< "Index sets do not correspond to full-dimensional simplices" << endl;
return false;
);
- (outfile, errfile) := callTopcom("points2nflips --checktriang -v", {topcomPoints(V, Homogenize=>false), [], T });
+ (outfile, errfile) := callTopcom("points2nflips --checktriang --memopt -v", {topcomPoints(V, Homogenize=>false), [], T });
not match("not valid", get errfile)
)

--
2.38.1
Loading