Macaulay2 / homebrew-tap

The Macaulay2 tap for Homebrew
6 stars 7 forks source link

Failed loading M2-release-1.22 on macOS-14.2 #202

Closed Dipendranath closed 7 months ago

Dipendranath commented 8 months ago

Hi I am trying to load M2, but getting this error. I even tried brew install M2 --HEAD as suggested in some other issues, but still not working. This is the one I am getting while trying with brew install Macaulay2/tap/M2

currentString:1:1:(3):[2]: error: installPackage: 14 error(s) occurred running examples for package Macaulay2Doc
dmat lu qq PLU
FAILED: Macaulay2/packages/CMakeFiles/install-Macaulay2Doc usr-dist/arm64-Darwin-macOS-14.2/lib/Macaulay2/Macaulay2Doc/.installed /tmp/macaulay2-20231219-89612-1usueq/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages/CMakeFiles/install-Macaulay2Doc /tmp/macaulay2-20231219-89612-1usueq/M2-release-1.22/M2/BUILD/build-brew/usr-dist/arm64-Darwin-macOS-14.2/lib/Macaulay2/Macaulay2Doc/.installed 
cd /tmp/macaulay2-20231219-89612-1usueq/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages && /tmp/macaulay2-20231219-89612-1usueq/M2-release-1.22/M2/BUILD/build-brew/usr-dist/arm64-Darwin-macOS-14.2/bin/M2 -q --stop --silent --no-preload --no-threads -e errorDepth=3 -e debugLevel=0 -e "installPackage(\"Macaulay2Doc\", Verbose => false, RerunExamples => false, CheckDocumentation => true, IgnoreExampleErrors => false, RemakeAllDocumentation => false, InstallPrefix => \"/tmp/macaulay2-20231219-89612-1usueq/M2-release-1.22/M2/BUILD/build-brew/usr-dist/\", UserMode => false, SeparateExec => true, DebuggingMode => true)" -e "\"info-\"|\"Macaulay2Doc\" << Macaulay2Doc#\"test number\" << close" -e "exit 0" && gzip -nf9 /tmp/macaulay2-20231219-89612-1usueq/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/info/Macaulay2Doc.info
ninja: build stopped: subcommand failed.
mahrud commented 8 months ago

Try removing gfan and normaliz and reinstalling with

brew install --build-bottle gfan normaliz

Then try installing M2 again.

Dipendranath commented 8 months ago

This is where it is getting stuck every time after removing gfan, normaliz and the reinstalling with brew install --build-bottle gfan normaliz. The last attempt is running for last approx. 7 hours and stucked at the same spot given below:

==> Installing macaulay2 from macaulay2/tap
==> Patching
==> Applying 84c7b9f67bfdb6b821e24546ab2dd4e2455dfdbf.patch
patching file 'M2/Macaulay2/e/aring-gf-flint-big.hpp'
patching file 'M2/Macaulay2/e/aring-gf-flint.hpp'
patching file 'M2/Macaulay2/e/aring-qq-flint.hpp'
patching file 'M2/Macaulay2/e/aring-zz-flint.hpp'
patching file 'M2/Macaulay2/e/aring-zzp-flint.hpp'
patching file 'M2/Macaulay2/e/dmat-gf-flint-big.hpp'
patching file 'M2/Macaulay2/e/dmat-gf-flint.hpp'
patching file 'M2/Macaulay2/e/dmat-lu-inplace.hpp'
patching file 'M2/Macaulay2/e/dmat-lu-zzp-flint.hpp'
patching file 'M2/Macaulay2/e/dmat-qq-flint.hpp'
patching file 'M2/Macaulay2/e/dmat-zz-flint.hpp'
patching file 'M2/Macaulay2/e/dmat-zzp-flint.hpp'
patching file 'M2/Macaulay2/e/interface/flint.cpp'
patching file 'M2/Macaulay2/e/interface/ring.cpp'
patching file 'M2/Macaulay2/e/mat-linalg.hpp'
==> git clone https://github.com/Macaulay2/M2-emacs.git M2/Macaulay2/editors/ema
==> git clone https://github.com/Macaulay2/memtailor.git M2/submodules/memtailor
==> git clone https://github.com/Macaulay2/mathic.git M2/submodules/mathic
==> git clone https://github.com/Macaulay2/mathicgb.git M2/submodules/mathicgb
==> cmake -GNinja -SM2 -BM2/BUILD/build-brew -DBUILD_NATIVE=OFF -DCMAKE_PREFIX_P
==> cmake --build M2/BUILD/build-brew --target M2-core M2-emacs M2-highlightjs
==> cmake --build M2/BUILD/build-brew --target install-Macaulay2Doc
mahrud commented 8 months ago

Could you try

brew install --build-bottle --debug --keep-tmp M2

then once the build fails it'll keep the error files so we can see what's causing it.

Dipendranath commented 8 months ago

Hi, Before using the last suggestion I wanted to keep the installation code running for the whole day, and fortunately it took around 18hours and it's installed now.

mahrud commented 8 months ago

If you installed it with --build-bottle, now you can run:

brew bottle --no-rebuild M2

which should produce a package which can be extracted to install M2 easily.

If this is the case, it would be really helpful to know which examples took so long, so I would appreciate it if you could (after bottling M2) uninstall and install with the above command one more time and see if everything is slow in general or one example or package in particular is taking ages. Once this is clear, you can interrupt the build and simple install from the bottle with:

brew install [name of the bottle]
Dipendranath commented 8 months ago

I did as you said, and it still takes around 10hrs to complete the process.

mahrud commented 8 months ago

Could you attach the log which shows how much time generating each example took?

Dipendranath commented 8 months ago

Can you guide me through it, so that I can pull it up for you! I am new to this MacBook Environment.

mahrud commented 8 months ago

I was just hoping for the terminal output of the build process, but I presume you've closed the terminal.

asuciu2014 commented 7 months ago

M2 version 12.2 still does not install on macOS 14.2.1 Sonoma. I tried all the workarounds listed here, but none works.

mahrud commented 7 months ago

Could you elaborate on what error you get after trying the workarounds above?

asuciu2014 commented 7 months ago

Hi,

Thanks for getting back to me. I am trying to install the latest version of M2 (1.22) on my MacBook Pro, running under Sonoma 14.2.1, with all necessary software installed, using homebrew, and it’s impossible.

First of all, if I try a simple “brew install macaulay2” I get a totally obsolete version (1.19) — and this has been going on for almost a year now. I tried all the other workarounds listed on the M2 GitHub page, but the install always fails, with all sorts of error messages. The only way I’ve managed to use M2 for a while now is by downloading from the M2 site the dmg of version 1.21 (there is no v.1.22 there, on account of the installing now being basically only being done via brew).

I’ve had similar experiences with M2 installs on two other iMacs I have (home and office). A few weeks ago i got an iMac M3, hoping this would be better for running M2 and other softwares I need (gap, sage, etc) Everything works fine, except again for M2, which I have not been able install at all, either through brew or directly from a dmg, be it v.1.19, 1.21, or 1.22.

BTW, I’ve been using M2 intensively since the early 1990s, and i’ve never, ever had an install problem (let alone a total impossibility of installing it) before this.

Any advice you could offer on how to get back on track with M2 would be greatly appreciated.

Thanks, Alex Suciu

On Jan 14, 2024, at 10:55 PM, Mahrud Sayrafi @.***> wrote:

Could you elaborate on what error you get after trying the workarounds above?

— Reply to this email directly, view it on GitHub https://github.com/Macaulay2/homebrew-tap/issues/202#issuecomment-1891262715, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFK6MTZHJWO2QHSPJJEHT73YOSSDXAVCNFSM6AAAAABA4ENNXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGI3DENZRGU. You are receiving this because you commented.

mahrud commented 7 months ago

First of all, if I try a simple “brew install macaulay2” I get a totally obsolete version (1.19)

I'm confused. Does brew install macaulay2 terminate with an error, or does it succeed but when you run M2 you get version 1.19? Specifically, what is the terminal output when you enter brew install macaulay2?

Syzygies commented 7 months ago

First of all, if I try a simple “brew install macaulay2” I get a totally obsolete version (1.19)

The instructions at MacOSX are instead

brew install Macaulay2/tap/M2

It doesn't surprise me than an obsolete alternative exists on Homebrew, and it's probably not possible to remove it. Are you seeing variant directions elsewhere? If so, that's a documentation bug that should be reported.

I have five MacOS Sonoma 14.2.1 machines I was updating at once, of varying Apple silicon models. All five gave an identical error, not too surprising as I keep them in sync using a Brewfile:

FAILED: Macaulay2/editors/highlightjs/highlight.js /tmp/macaulay2-20240115-20686-qm4jv2/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/editors/highlightjs/highlight.js cd /tmp/macaulay2-20240115-20686-qm4jv2/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/editors/highlightjs && /opt/homebrew/opt/node/bin/npm install && /opt/homebrew/opt/node/bin/npm run build npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! request to https://registry.npmjs.org/css-loader failed, reason: unable to get local issuer certificate

I found a silver lining of humor in this: As an author of the original Macaulay, I tried to write a recipe for Homebrew to install M2, back in the early days of Homebrew. The first Macaulay was written in K&R C with no "dependencies", what did I know? M2's dependency graph was a nightmare, it was like trying to get 100 species of butterflies to pose together for a photograph. Any twelve might not be available at any given time, as a developer one waited patiently for the separate windows when one could download each dependency, then build from a private stash. But write a script that could find everything available online at the same moment? Can I have what you're smoking? I gave up.

I also remember when CD burners didn't reliably work. They do now. So I shrugged "I'm an idiot" seeing that brew installs were now routine. Then it failed!

Patience. This was hard. It's still hard.

mahrud commented 7 months ago

It doesn't surprise me than an obsolete alternative exists on Homebrew, and it's probably not possible to remove it. Are you seeing variant directions elsewhere?

I don't believe there is an alternative version of Macaulay2 anywhere on Homebrew (at least nowhere I can find).

Thanks for the error message, Dave!

@d-torrance do you have any idea why the npm might be failing with UNABLE_TO_GET_ISSUER_CERT_LOCALLY? Couldn't we just generate the syntax highlighting script once for each version of M2 so npm doesn't need to be installed?

Once @DanGrayson and @mikestillman release version 1.23 I can ask someone to build binary bottles for M2 on macOS 14 so that hopefully all these issues are resolved.

asuciu2014 commented 7 months ago

Thanks for the memories, Dave. I still remember fondly the pioneer days of M1, and being prodded by Dan to switch to M2, back in the day.

Of course, I also tried "brew install Macaulay2/tap/M2”, plus a dozen variations on the theme (remove, reinstall, etc); no dice.

d-torrance commented 7 months ago

@d-torrance do you have any idea why the npm might be failing with UNABLE_TO_GET_ISSUER_CERT_LOCALLY? Couldn't we just generate the syntax highlighting script once for each version of M2 so npm doesn't need to be installed?

No clue. We switched to exactly that behavior (generate syntax highlighting at release and commit it to git so users don't need to worry about it) in 1.22 -- see https://github.com/Macaulay2/M2/pull/2790.

That's also when we switched from highlight.js -> prism.js for consistency with Macaulay2Web, so I'm really confused as to why the error message above mentions highlight.js. It looks it might be building 1.21 or earlier, when we were still using highlight.js and running npm during every build.

mahrud commented 7 months ago

Ah, I suspect somehow the homebrew installation is out of date and failing to update because of some problem.

@Syzygies or @asuciu2014 Could you show me the outputs of brew config and brew doctor?

asuciu2014 commented 7 months ago

Sure, here are those outputs. (Incidentally, the troubles with ghostscript, aspell, and tbb@2020 cannot be fixed, either; I hope that's not what creates the problems with the M2 install.)

%brew config HOMEBREW_VERSION: 4.2.4-4-g594ed2a ORIGIN: https://github.com/Homebrew/brew HEAD: 594ed2a91a3f351a99f8c69104bb308dcadd85eb Last commit: 70 minutes ago Core tap HEAD: 3da452e587aa6863865b1692e9ccb01d3f0befcf Core tap last commit: 14 minutes ago Core tap JSON: 15 Jan 15:24 UTC Core cask tap HEAD: 5e3042c5268a5f796d2b7692f179bdab54fc5fd2 Core cask tap last commit: 17 minutes ago Core cask tap JSON: 15 Jan 15:24 UTC HOMEBREW_PREFIX: /usr/local HOMEBREW_CASK_OPTS: [] HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.lhrUVOrrcS/org.xquartz:0 HOMEBREW_MAKE_JOBS: 8 HOMEBREW_SORBET_RUNTIME: set Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby CPU: octa-core 64-bit kabylake Clang: 15.0.0 build 1500 Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 8.4.0 => /usr/bin/curl macOS: 14.2.1-x86_64 CLT: 15.1.0.0.1.1700200546 Xcode: 15.2

%brew doctor Warning: Some installed formulae are deprecated or disabled. You should find replacements for the following formulae: arb openssl@1.1

Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on those kegs to fail to run properly once built. Run brew link on these: ghostscript aspell

Warning: Some installed formulae are missing dependencies. You should brew install the missing dependencies: brew install tbb@2020

mahrud commented 7 months ago

Thanks! Could you also do:

cd $(brew --repo macaulay2/tap)
git show --summary

If the date shown is older than December, try in the same directory:

git fetch origin
git reset --hard origin/main

Then try brew install M2 again and if it fails again, what is the exact output in the terminal?

asuciu2014 commented 7 months ago

Wow! Thanks a lot, this worked! Not sure what exactly did it, but here's how it went:

%cd $(brew --repo macaulay2/tap)
git show --summary
commit a75bf977bb5c81b874674302844e6f120c0da2e3 (HEAD -> main, tag: givaro-4.2.0, tag: fflas-ffpack-2.5.0)
Author: Mahrud Sayrafi <mahrud@umn.edu>
Date:   Fri Dec 17 09:19:48 2021 +0000

    mathicgb: update 1.0_8 bottle.

% git fetch main
git reset --hard origin/main

fatal: 'main' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
HEAD is now at 1359431 removed npm from Macaulay2 dependencies

% brew install M2
==> Downloading https://formulae.brew.sh/api/formula.jws.json
###### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######100.0%
==> Fetching dependencies for macaulay2/tap/macaulay2: macaulay2/tap/factory, macaulay2/tap/givaro, macaulay2/tap/fflas-ffpack, macaulay2/tap/frobby, macaulay2/tap/gfan, macaulay2/tap/normaliz and macaulay2/tap/topcom
==> Fetching macaulay2/tap/factory
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/factory-4.3.0_2/factory-4.3.0_2.ventura.bott
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/f0bc5a3e-1db
####100.0%
==> Fetching macaulay2/tap/givaro
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/givaro-4.2.0/givaro-4.2.0.big_sur.bottle.tar
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/a9fd87e6-21f
#######100.0%
==> Fetching macaulay2/tap/fflas-ffpack
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/fflas-ffpack-2.5.0/fflas-ffpack-2.5.0.big_su
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/1b49fadc-e4e
#####100.0%
==> Fetching macaulay2/tap/frobby
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/frobby-0.9.5_4/frobby-0.9.5_4.big_sur.bottle
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/80b47b25-1c8
###### 100.0%
==> Fetching macaulay2/tap/gfan
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/gfan-0.6.2_10/gfan-0.6.2_10.big_sur.bottle.t
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/6f16dc6d-b21
##### 100.0%
==> Fetching macaulay2/tap/normaliz
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/normaliz-3.10.1/normaliz-3.10.1.ventura.bott
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/52b2daba-833
######100.0%
==> Fetching macaulay2/tap/topcom
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/topcom-1.1.2_6/topcom-1.1.2_6.ventura.bottle
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/3030257b-d4f
######100.0%
==> Fetching macaulay2/tap/macaulay2
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/macaulay2-1.22_2/macaulay2-1.22_2.ventura.bo
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/be1d83d7-79c
######100.0%
==> Installing macaulay2 from macaulay2/tap
==> Installing dependencies for macaulay2/tap/macaulay2: macaulay2/tap/factory, macaulay2/tap/givaro, macaulay2/tap/fflas-ffpack, macaulay2/tap/frobby, macaulay2/tap/gfan, macaulay2/tap/normaliz and macaulay2/tap/topcom
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/factory
==> Pouring factory-4.3.0_2.ventura.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/libfactory-4.3.2.dylib
Target /usr/local/lib/libfactory-4.3.2.dylib
is a symlink belonging to singular. You can unlink it:
  brew unlink singular

To force the link and overwrite all conflicting files:
  brew link --overwrite factory

To list all files that would be deleted:
  brew link --overwrite --dry-run factory

Possible conflicting files are:
/usr/local/lib/libfactory-4.3.2.dylib -> /usr/local/Cellar/singular/4.3.2p10/lib/libfactory-4.3.2.dylib
==> Summary
🍺  /usr/local/Cellar/factory/4.3.0_2: 110 files, 7.3MB
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/givaro
==> Pouring givaro-4.2.0.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/givaro/4.2.0: 236 files, 2.3MB
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/fflas-ffpack
==> Pouring fflas-ffpack-2.5.0.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/fflas-ffpack/2.5.0: 194 files, 2.6MB
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/frobby
==> Pouring frobby-0.9.5_4.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/frobby/0.9.5_4: 9 files, 2.6MB
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/gfan
==> Pouring gfan-0.6.2_10.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/gfan/0.6.2_10: 60 files, 3.5MB
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/normaliz
==> Pouring normaliz-3.10.1.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/normaliz/3.10.1: 32 files, 13.6MB
==> Installing macaulay2/tap/macaulay2 dependency: macaulay2/tap/topcom
==> Pouring topcom-1.1.2_6.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/topcom/1.1.2_6: 151 files, 34.2MB
==> Installing macaulay2/tap/macaulay2
==> Pouring macaulay2-1.22_2.ventura.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/macaulay2
==> Summary
🍺  /usr/local/Cellar/macaulay2/1.22_2: 19,973 files, 228.6MB
mahrud commented 7 months ago

Fantastic! I'm not sure what had made the tap repository out of sync, but I'll mention this in an FAQ somewhere in case it helps others.

@Syzygies I suspect on your arm machines brew will actually build M2 (on x86 systems there are existing bottles on GitHub). If you don't mind, it would be great if you could instead install M2 with:

brew install --build-bottle M2

and once it's done, create a bottle with:

brew bottle --no-rebuild M2

and somehow get that bottle to me so I can upload it to GitHub for others.

n-m-g commented 7 months ago

Hi,

I have encountered similar issues with trying to install using home brew on macOS 14.2.1.

Just to summarize the above discussion, is the command:

brew install --build-bottle M2

supposed to fix the issue (it caused an error message for me) or is something else required as well?

Many thanks.

mahrud commented 7 months ago

From https://github.com/Macaulay2/homebrew-tap/issues/202#issuecomment-1866896645:

Try removing gfan and normaliz and reinstalling with

brew install --build-bottle gfan normaliz

Then try installing M2 again.

Syzygies commented 7 months ago

I got "December 6", tried the hard reset anyways, and got the same error.

/opt/homebrew/Library/Taps/macaulay2/homebrew-tap mars % brew doctor Your system is ready to brew.

/opt/homebrew/Library/Taps/macaulay2/homebrew-tap mars % brew config HOMEBREW_VERSION: 4.2.3 ORIGIN: https://github.com/Homebrew/brew HEAD: b3751bca8c4a3c76107d5aa3b75b81db93cf4bb6 Last commit: 8 days ago Core tap JSON: 15 Jan 19:38 UTC Core cask tap JSON: 15 Jan 19:38 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_EDITOR: /usr/local/bin/bbedit -w HOMEBREW_MAKE_JOBS: 8 Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby CPU: octa-core 64-bit arm_firestorm_icestorm Clang: 15.0.0 build 1500 Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git Curl: 8.4.0 => /usr/bin/curl macOS: 14.2.1-arm64 CLT: 15.1.0.0.1.1700200546 Xcode: 15.2 => /Applications/Xcode-beta.app/Contents/Developer Rosetta 2: false

n-m-g commented 7 months ago

Hi,

I did try the commands

Try removing gfan and normaliz and reinstalling with

brew install --build-bottle gfan normaliz Then try installing M2 again.

Brew asked me to run:

brew reinstall gfan

brew reinstall normaliz

Once I did that, I ran

brew install Macaulay2/tap/M2

the end result was an error message. Please find the terminal session below:

-- ==> Fetching macaulay2/tap/macaulay2 ==> Downloading https://github.com/Macaulay2/M2/commit/84c7b9f67bfdb6b821e24546a ######################################################################### 100.0% ==> Downloading https://github.com/Macaulay2/M2/archive/refs/tags/release-1.22.t Already downloaded: /Users/nathangrieve/Library/Caches/Homebrew/downloads/62af3a24e20792277dc5d0a8fcfedd4099bd87dc9c76dae1f8e6825433192632--M2-release-1.22.tar.gz ==> Installing macaulay2 from macaulay2/tap ==> Patching ==> Applying 84c7b9f67bfdb6b821e24546ab2dd4e2455dfdbf.patch patching file 'M2/Macaulay2/e/aring-gf-flint-big.hpp' patching file 'M2/Macaulay2/e/aring-gf-flint.hpp' patching file 'M2/Macaulay2/e/aring-qq-flint.hpp' patching file 'M2/Macaulay2/e/aring-zz-flint.hpp' patching file 'M2/Macaulay2/e/aring-zzp-flint.hpp' patching file 'M2/Macaulay2/e/dmat-gf-flint-big.hpp' patching file 'M2/Macaulay2/e/dmat-gf-flint.hpp' patching file 'M2/Macaulay2/e/dmat-lu-inplace.hpp' patching file 'M2/Macaulay2/e/dmat-lu-zzp-flint.hpp' patching file 'M2/Macaulay2/e/dmat-qq-flint.hpp' patching file 'M2/Macaulay2/e/dmat-zz-flint.hpp' patching file 'M2/Macaulay2/e/dmat-zzp-flint.hpp' patching file 'M2/Macaulay2/e/interface/flint.cpp' patching file 'M2/Macaulay2/e/interface/ring.cpp' patching file 'M2/Macaulay2/e/mat-linalg.hpp' ==> git clone https://github.com/Macaulay2/M2-emacs.git M2/Macaulay2/editors/ema ==> git clone https://github.com/Macaulay2/memtailor.git M2/submodules/memtailor ==> git clone https://github.com/Macaulay2/mathic.git M2/submodules/mathic ==> git clone https://github.com/Macaulay2/mathicgb.git M2/submodules/mathicgb ==> cmake -GNinja -SM2 -BM2/BUILD/build-brew -DBUILD_NATIVE=OFF -DCMAKE_PREFIXP ==> cmake --build M2/BUILD/build-brew --target M2-core M2-emacs M2-highlightjs ==> cmake --build M2/BUILD/build-brew --target install-Macaulay2Doc Last 15 lines from /Users/nathangrieve/Library/Logs/Homebrew/macaulay2/07.cmake: -- capturing example results for "Module List" -- 0.0700542 seconds elapsed -- capturing example results for "sheaf(Variety)" -- 0.0670504 seconds elapsed -- capturing example results for "format" -- 0.0666633 seconds elapsed -- capturing example results for "polynomial rings" -- 0.0720392 seconds elapsed -- making example results for "Grassmannian(ZZ,ZZ)" -- 0.481255 seconds elapsed -- capturing example results for "matrices to and from modules" -- 0.0681332 seconds elapsed -- capturing example results for "HH^ZZ SheafOfRings" -- 0.0666259 seconds elapsed -- capturing example results for "quotientRemainder" -- 0.0665049 seconds elapsed -- capturing example results for "ProjectiveHilbertPolynomial ZZ" -- 0.0650095 seconds elapsed currentString:1:1:(3):[2]: error: installPackage: 14 error(s) occurred running examples for package Macaulay2Doc dmat lu qq PLU FAILED: Macaulay2/packages/CMakeFiles/install-Macaulay2Doc usr-dist/arm64-Darwin-macOS-14.2.1/lib/Macaulay2/Macaulay2Doc/.installed /tmp/macaulay2-20240115-72027-a9798a/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages/CMakeFiles/install-Macaulay2Doc /tmp/macaulay2-20240115-72027-a9798a/M2-release-1.22/M2/BUILD/build-brew/usr-dist/arm64-Darwin-macOS-14.2.1/lib/Macaulay2/Macaulay2Doc/.installed cd /tmp/macaulay2-20240115-72027-a9798a/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages && /tmp/macaulay2-20240115-72027-a9798a/M2-release-1.22/M2/BUILD/build-brew/usr-dist/arm64-Darwin-macOS-14.2.1/bin/M2 -q --stop --silent --no-preload --no-threads -e errorDepth=3 -e debugLevel=0 -e "installPackage(\"Macaulay2Doc\", Verbose => false, RerunExamples => false, CheckDocumentation => true, IgnoreExampleErrors => false, RemakeAllDocumentation => false, InstallPrefix => \"/tmp/macaulay2-20240115-72027-a9798a/M2-release-1.22/M2/BUILD/build-brew/usr-dist/\", UserMode => false, SeparateExec => true, DebuggingMode => true)" -e "\"info-\"|\"Macaulay2Doc\" << Macaulay2Doc#\"test number\" << close" -e "exit 0" && gzip -nf9 /tmp/macaulay2-20240115-72027-a9798a/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/info/Macaulay2Doc.info ninja: build stopped: subcommand failed.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core): https://github.com/macaulay2/homebrew-tap/issues

Thanks.

mahrud commented 7 months ago

Okay, I should have been more clear:

brew uninstall gfan normaliz
brew install --build-bottle gfan normaliz

The --build-bottle option is important.

mahrud commented 7 months ago

Ah, when we switched from highlight.js to prism.js, I forgot to remove M2-highlightjs from the build options!

@Syzygies could you try to update the repository with something like:

brew tap --force-auto-update

Then try one more time?

(although, I don't see why npm would fail anyway ... this might point to another issue on your system)

n-m-g commented 7 months ago

Hi,

After I did:

brew uninstall gfan normaliz brew install --build-bottle gfan normaliz

The installation seems to get stuck part way through:

--

% brew install Macaulay2/tap/M2 ==> Downloading https://formulae.brew.sh/api/cask.jws.json

=#=

==> Downloading https://formulae.brew.sh/api/formula.jws.json

=#=

==> Fetching macaulay2/tap/macaulay2 ==> Downloading https://github.com/Macaulay2/M2/commit/84c7b9f67bfdb6b821e24546a Already downloaded: /Users/nathangrieve/Library/Caches/Homebrew/downloads/6893bd1d6ca32c6c3740205872a49830a1fce9a801dfcc79152276fdb75a6dd4--84c7b9f67bfdb6b821e24546ab2dd4e2455dfdbf.patch ==> Downloading https://github.com/Macaulay2/M2/archive/refs/tags/release-1.22.t Already downloaded: /Users/nathangrieve/Library/Caches/Homebrew/downloads/62af3a24e20792277dc5d0a8fcfedd4099bd87dc9c76dae1f8e6825433192632--M2-release-1.22.tar.gz ==> Installing macaulay2 from macaulay2/tap ==> Patching ==> Applying 84c7b9f67bfdb6b821e24546ab2dd4e2455dfdbf.patch patching file 'M2/Macaulay2/e/aring-gf-flint-big.hpp' patching file 'M2/Macaulay2/e/aring-gf-flint.hpp' patching file 'M2/Macaulay2/e/aring-qq-flint.hpp' patching file 'M2/Macaulay2/e/aring-zz-flint.hpp' patching file 'M2/Macaulay2/e/aring-zzp-flint.hpp' patching file 'M2/Macaulay2/e/dmat-gf-flint-big.hpp' patching file 'M2/Macaulay2/e/dmat-gf-flint.hpp' patching file 'M2/Macaulay2/e/dmat-lu-inplace.hpp' patching file 'M2/Macaulay2/e/dmat-lu-zzp-flint.hpp' patching file 'M2/Macaulay2/e/dmat-qq-flint.hpp' patching file 'M2/Macaulay2/e/dmat-zz-flint.hpp' patching file 'M2/Macaulay2/e/dmat-zzp-flint.hpp' patching file 'M2/Macaulay2/e/interface/flint.cpp' patching file 'M2/Macaulay2/e/interface/ring.cpp' patching file 'M2/Macaulay2/e/mat-linalg.hpp' ==> git clone https://github.com/Macaulay2/M2-emacs.git M2/Macaulay2/editors/ema ==> git clone https://github.com/Macaulay2/memtailor.git M2/submodules/memtailor ==> git clone https://github.com/Macaulay2/mathic.git M2/submodules/mathic ==> git clone https://github.com/Macaulay2/mathicgb.git M2/submodules/mathicgb ==> cmake -GNinja -SM2 -BM2/BUILD/build-brew -DBUILD_NATIVE=OFF -DCMAKE_PREFIX_P ==> cmake --build M2/BUILD/build-brew --target M2-core M2-emacs M2-highlightjs ==> cmake --build M2/BUILD/build-brew --target install-Macaulay2Doc

--

Does this suggest an issue for my particular machine or for macOS 14.2.1 in general?

Many thanks.

mahrud commented 7 months ago

It's not stuck. It takes about an hour or two to build Macaulay2.

n-m-g commented 7 months ago

OK. Many thanks. Fingers crosses that this will work this time. Let me plug in my machine and try this again.

On Jan 15, 2024, at 6:41 PM, Mahrud Sayrafi @.***> wrote:

It's not stuck. It takes about an hour or two to build Macaulay2.

— Reply to this email directly, view it on GitHub https://github.com/Macaulay2/homebrew-tap/issues/202#issuecomment-1892838865, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC62JAGN72JCYG7IUAPVFLYOWWBBAVCNFSM6AAAAABA4ENNXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSHAZTQOBWGU. You are receiving this because you commented.

mahrud commented 7 months ago

Actually, if you could interrupt it and instead run:

brew install --build-bottle M2
brew bottle --no-rebuild M2

That would be very helpful!

n-m-g commented 7 months ago

OK. I’ll be in touch again with an update once it has finished.

On Jan 15, 2024, at 7:03 PM, Mahrud Sayrafi @.***> wrote:

Actually, if you could interrupt it and instead run:

brew install --build-bottle M2 brew bottle --no-rebuild M2 That would be very helpful!

— Reply to this email directly, view it on GitHub https://github.com/Macaulay2/homebrew-tap/issues/202#issuecomment-1892854872, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC62JDZVLS77LHKTTOQE73YOWYUDAVCNFSM6AAAAABA4ENNXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSHA2TIOBXGI. You are receiving this because you commented.

n-m-g commented 7 months ago

Hi,

Those two commands

brew install --build-bottle M2 brew bottle --no-rebuild M2

installed without issue.

Afterwards, following the suggestion in line brew prompt, I also ran

brew postinstall macaulay2/tap/macaulay2

(I'm not sure if this did anything important.)

Finally running M2 in the command prompt loaded everything OK.

Many thanks for your assistance with this.

n-m-g commented 7 months ago

Hi,

As a final follow-up when the next release of M2 takes place, do you anticipate a similar issue, or should we expect

brew install Macaulay2/tap/M2

to work without issue on macOS 14.2.1?

Many thanks again for your assistance with all of this.

mahrud commented 7 months ago

Great! Once someone volunteers to build and upload a bottle (e.g. you?) then installs will be streamlined for everyone else (until the next release, or if there's a new release for a dependency like flint, then we need a new bottle).

I sent you an email with an upload link. Once this bottle is uploaded, Dave (and others) should be able to install M2 via brew without the need to build it, hopefully.

n-m-g commented 7 months ago

Hi,

I've uploaded the file. Do let me know if there are issues with it.

Many thanks.

mahrud commented 7 months ago

Thank you! @Syzygies can you try brew update and brew install M2? I believe it should use the bottle and I can close this issue.

Syzygies commented 7 months ago

Yes! Under two minutes for all five machines, four of which uninvolved in earlier thrashing experiments.

Thank you.

XKCD bug thread

mahrud commented 7 months ago

I have many questions about the five apple silicon machines, but that's good to hear!