Macaulay2 / homebrew-tap

The Macaulay2 tap for Homebrew
6 stars 7 forks source link

M2 fails to install #206

Closed asuciu2014 closed 6 months ago

asuciu2014 commented 6 months ago

Today, during a routine update/upgrade of homebrew, Macaulay2 failed to upgrade (I am working on an Intel MacBook Pro with Sonoma 14.2.1) I tried uninstalling and installing it again, using all the tricks and patches I learned about a month ago when the install also failed but ultimately succeeded; this time I could not get it to install, despite repeated attempts. To recap the main two tracks I used:

(1) If I try a standard "brew install M2" or " brew install Macaulay2/tap/M2", I get

==> Downloading https://formulae.brew.sh/api/formula.jws.json
################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
################################################################################################################## 100.0%
==> Fetching macaulay2/tap/macaulay2
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/macaulay2-1.22_2/macaulay2-1.22_2.ventura.bot
Already downloaded: .../Library/Caches/Homebrew/downloads/4f0cce1868b068f4953cd9f88b701a3ab685cfb8cda1a9509fb1e00158174aa3--macaulay2-1.22_2.ventura.bottle.tar.gz
==> Installing macaulay2 from macaulay2/tap
==> Pouring macaulay2-1.22_2.ventura.bottle.tar.gz

>M2
dyld[33649]: Library not loaded: /usr/local/opt/icu4c/lib/libicudata.73.dylib
  Referenced from: <0DB95822-6D58-3D58-AABF-BAEBE9BB176D> /usr/local/Cellar/macaulay2/1.22_2/bin/M2-binary
  Reason: tried: '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache), '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache)
zsh: abort      M2

(2) On the other hand, if I try "brew install --build-bottle M2", this is what I get, after waiting for a few hours:

==> Fetching macaulay2/tap/macaulay2
==> Downloading https://github.com/Macaulay2/M2/commit/84c7b9f67bfdb6b821e24546ab2dd4e2455dfdbf.patch?full_index=1
################################################################################################################## 100.0%
==> Downloading https://github.com/Macaulay2/M2/archive/refs/tags/release-1.22.tar.gz
Already downloaded: ../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/emacs
==> 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_PATH=/usr/local/opt/bison;/usr/local/opt/c
==> cmake --build M2/BUILD/build-brew --target M2-core M2-emacs
==> cmake --build M2/BUILD/build-brew --target install-Macaulay2Doc
==> cmake --build M2/BUILD/build-brew --target install-packages
Last 15 lines from .../Library/Logs/Homebrew/macaulay2/08.cmake:
 -- making example results for "GG"                                          -- 2.10619 seconds elapsed
 -- making example results for "MultiprojectiveVariety \\\\ MultiprojectiveVariety" -- 2.38556 seconds elapsed
 -- making example results for "EmbeddedProjectiveVariety !"                 -- 4.76034 seconds elapsed
 -- making example results for "permute(MultiprojectiveVariety,List)"        -- 4.31923 seconds elapsed
 -- making example results for "shortcuts"                                   -- 3.73553 seconds elapsed
 -- making example results for "segreEmbedding"                              -- 2.36615 seconds elapsed
 -- making example results for "degrees(MultiprojectiveVariety)"             -- 2.35185 seconds elapsed
 -- making example results for "RAT List"                                    -- 1.99749 seconds elapsed
 -- making example results for "degree(MultirationalMap,Option)"             -- 8.70781 seconds elapsed
 -- making example results for "conormalVariety(EmbeddedProjectiveVariety)"  -- 2.41562 seconds elapsed
 -- making example results for "sectionalGenus"                              -- 1.73697 seconds elapsed
 -- making example results for "rationalMap(MultiprojectiveVariety,Tally)"   -- 2.1617 seconds elapsed
 -- warning: found 116 documentation node(s) not listed as a subnode
ninja: build stopped: subcommand failed.

I also tried re-installing fan -- the install worked there, but that did not help at all. Is there anything else I could try?

mahrud commented 6 months ago

It's not clear to me what prevented the second attempt to work. You could try following the steps here to find the failing tests.

However, I think the reason M2 isn't installing from the existing bottle after you upgraded is that a dependency, icu4c, was upgraded. I'm going to wait until the next M2 release to create new bottles, but if you need M2 urgently you could try undoing the brew upgrade:

brew rm icu4c libxml2 boost node --ignore-dependencies
cd $(brew --repo homebrew/core)
git checkout fd1bbcd9~1
brew install M2

I'm not 100% sure if this would work, but I'm curious if you tried.

Later, when this issue is resolved, you can reset the brew repository with:

brew update-reset
asuciu2014 commented 6 months ago

Thanks for the feedback, and the instructions. I tried the commands you mentioned,

brew rm icu4c libxml2 boost node --ignore-dependencies
cd $(brew --repo homebrew/core)
git checkout fd1bbcd9~1
brew install M2

The install ran pretty fast, but when I tried running M2, it aborted (it looks like M2 is missing a bunch of .dylib files):

==> Fetching macaulay2/tap/macaulay2
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/macaulay2-1.22_2/macaulay2-1.22_2.ventura.bot
Already downloaded: ../Library/Caches/Homebrew/downloads/4f0cce1868b068f4953cd9f88b701a3ab685cfb8cda1a9509fb1e00158174aa3--macaulay2-1.22_2.ventura.bottle.tar.gz
==> Installing macaulay2 from macaulay2/tap
==> 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
==> Running `brew cleanup macaulay2`...

>M2
dyld[29553]: Library not loaded: /usr/local/opt/icu4c/lib/libicudata.73.dylib
  Referenced from: <0DB95822-6D58-3D58-AABF-BAEBE9BB176D> /usr/local/Cellar/macaulay2/1.22_2/bin/M2-binary
  Reason: tried: '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache), '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache)
zsh: abort      M2

I will keep trying, but this is looking rather hopeless right now.

mahrud commented 6 months ago

Ahh, I forgot that brew install auto updates the repository. Try this instead:

brew rm icu4c libxml2 boost node --ignore-dependencies
cd $(brew --repo homebrew/core)
git checkout fd1bbcd9~1
HOMEBREW_NO_AUTO_UPDATE=1 brew install M2

Why hopeless? It's just a matter of getting the right versions of dependencies installed.

Also it would be helpful if you could put ``` on separate lines before and after pasted blocks of code.

asuciu2014 commented 6 months ago

Thanks. I tried again, still no luck. Looks like libxml2 and libicudata.73.dylib are missing?

homebrew-core % brew uninstall --force macaulay2              
Uninstalling macaulay2... (19,973 files, 228.6MB)

homebrew-core % brew rm icu4c libxml2 boost node --ignore-dependencies cd $(brew --repo homebrew/core) git checkout fd1bbcd9~1 HOMEBREW_NO_AUTO_UPDATE=1 brew install M2

Error: No such keg: /usr/local/Cellar/libxml2
HEAD is now at a2bd868686e hfstospell: update 0.5.4_1 bottle.
==> Fetching macaulay2/tap/macaulay2
==> Downloading https://github.com/Macaulay2/homebrew-tap/releases/download/macaulay2-1.22_2/macaulay2-1.22_2.ventura.bot
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/326525187/be1d83d7-79c7
####### 100.0%
==> Installing macaulay2 from macaulay2/tap
==> 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
==> Running `brew cleanup macaulay2`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

homebrew-core % M2 dyld[12206]: Library not loaded: /usr/local/opt/icu4c/lib/libicudata.73.dylib Referenced from: <0DB95822-6D58-3D58-AABF-BAEBE9BB176D> /usr/local/Cellar/macaulay2/1.22_2/bin/M2-binary Reason: tried: '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache), '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache) zsh: abort M2

mahrud commented 6 months ago

I see what is happening (brew is still downloading the most recent versions of boost, etc.) but at the moment I don't know what to do about it.

I guess that means this is the only other option for now:

It's not clear to me what prevented the second attempt to work. You could try following the steps here to find the failing tests.

Let me know if the instructions on that link aren't clear or you run into other issues.

etdavila10 commented 6 months ago

I was also running into this same issue after updating/upgrading homebrew. I seem to have found a very crude workaround for the time being.

It seems that Macaulay2 is still looking for icu4c version 73. I assume there was a potential update to version 74.2 recently? Therefore, Macaulay2 seems to search for files of the form libicuxxx.73.dylib instead of the libicuxxx.74.dylib files which do exist in the directory mentioned in the error ("/usr/local/Cellar/icu4c/74.2/lib/"). If you go to this directory you will notice that libicuxxx.74.dylib are symbolic links. As a workaround, I created symbolic links (e.g. ln -s libicudata.74.2.dylib libcudata.73.dylib) for each one of these files replacing "74" with "73" and that seemed to work.

This is now what the directory looks like for me (notice the libicuxxx.73.dylib symbolic links):

drwxr-xr-x    - lalo 22 Dec  2023 icu
lrwxr-xr-x   21 lalo 27 Feb 19:37 libicudata.73.dylib -> libicudata.74.2.dylib
.rw-r--r--  31M lalo 27 Feb 19:06 libicudata.74.2.dylib
lrwxr-xr-x   21 lalo 22 Dec  2023 libicudata.74.dylib -> libicudata.74.2.dylib
.r--r--r--  31M lalo 22 Dec  2023 libicudata.a
lrwxr-xr-x   21 lalo 22 Dec  2023 libicudata.dylib -> libicudata.74.2.dylib
lrwxr-xr-x   21 lalo 27 Feb 19:37 libicui18n.73.dylib -> libicui18n.74.2.dylib
.r--r--r-- 2.8M lalo 27 Feb 19:06 libicui18n.74.2.dylib
lrwxr-xr-x   21 lalo 22 Dec  2023 libicui18n.74.dylib -> libicui18n.74.2.dylib
.r--r--r-- 5.1M lalo 22 Dec  2023 libicui18n.a
lrwxr-xr-x   21 lalo 22 Dec  2023 libicui18n.dylib -> libicui18n.74.2.dylib
lrwxr-xr-x   19 lalo 27 Feb 19:38 libicuio.73.dylib -> libicuio.74.2.dylib
.rw-r--r--  82k lalo 27 Feb 19:06 libicuio.74.2.dylib
lrwxr-xr-x   19 lalo 22 Dec  2023 libicuio.74.dylib -> libicuio.74.2.dylib
.r--r--r--  71k lalo 22 Dec  2023 libicuio.a
lrwxr-xr-x   19 lalo 22 Dec  2023 libicuio.dylib -> libicuio.74.2.dylib
lrwxr-xr-x   21 lalo 27 Feb 19:38 libicutest.73.dylib -> libicutest.74.2.dylib
.rw-r--r-- 104k lalo 27 Feb 19:06 libicutest.74.2.dylib
lrwxr-xr-x   21 lalo 22 Dec  2023 libicutest.74.dylib -> libicutest.74.2.dylib
.r--r--r--  79k lalo 22 Dec  2023 libicutest.a
lrwxr-xr-x   21 lalo 22 Dec  2023 libicutest.dylib -> libicutest.74.2.dylib
lrwxr-xr-x   19 lalo 27 Feb 19:39 libicutu.73.dylib -> libicutu.74.2.dylib
.r--r--r-- 219k lalo 27 Feb 19:06 libicutu.74.2.dylib
lrwxr-xr-x   19 lalo 22 Dec  2023 libicutu.74.dylib -> libicutu.74.2.dylib
.r--r--r-- 256k lalo 22 Dec  2023 libicutu.a
lrwxr-xr-x   19 lalo 22 Dec  2023 libicutu.dylib -> libicutu.74.2.dylib
lrwxr-xr-x   19 lalo 27 Feb 19:39 libicuuc.73.dylib -> libicuuc.74.2.dylib
.rw-r--r-- 1.7M lalo 27 Feb 19:06 libicuuc.74.2.dylib
lrwxr-xr-x   19 lalo 22 Dec  2023 libicuuc.74.dylib -> libicuuc.74.2.dylib
.r--r--r-- 2.8M lalo 22 Dec  2023 libicuuc.a
lrwxr-xr-x   19 lalo 22 Dec  2023 libicuuc.dylib -> libicuuc.74.2.dylib

This is most definitely not a long-term solution as I believe updating/upgrading homebrew will probably wipe these symbolic links, but it works for the time being. I hope this helps!

asuciu2014 commented 6 months ago

Thanks, this looks like an ingenious patch, but alas, it's too complicated for me. I just went back to v.1.21 and installed it directly from [Macaulay2-1.21-x86_64-macOS-13.0.dmg], as in the old days: very fast,. very smooth, no hitch. I guess I will have to wait till the icu4c incompatibility gets sorted out to get back to brewing v.1.22.

mahrud commented 6 months ago

Okay, I'll close this issue then.

Since I'm not a macOS user, this brew build depends on the work of volunteers who are macOS users to debug issues on macOS.

etdavila10 commented 6 months ago

In trying to debug the issue with building Macaulay2 through homebrew, the following seems to be the source of the issue:

[247/258] cd /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages && /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/bin/M2 -q --stop --silent --no-preload --no-threads -e errorDepth=3 -e debugLevel=0 -e "installPackage(\"ForeignFunctions\", Verbose => false, RerunExamples => false, CheckDocumentation => true, IgnoreExampleErrors => false, RemakeAllDocumentation => false, InstallPrefix => \"/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/\", UserMode => false, SeparateExec => true, DebuggingMode => true)" -e "\"info-\"|\"ForeignFunctions\" << ForeignFunctions#\"test number\" << close" -e "exit 0" && gzip -nf9 /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/info/ForeignFunctions.info
FAILED: Macaulay2/packages/CMakeFiles/install-ForeignFunctions usr-dist/x86_64-Darwin-macOS-14.2.1/lib/Macaulay2/ForeignFunctions/.installed /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages/CMakeFiles/install-ForeignFunctions /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/lib/Macaulay2/ForeignFunctions/.installed 
cd /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/Macaulay2/packages && /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/bin/M2 -q --stop --silent --no-preload --no-threads -e errorDepth=3 -e debugLevel=0 -e "installPackage(\"ForeignFunctions\", Verbose => false, RerunExamples => false, CheckDocumentation => true, IgnoreExampleErrors => false, RemakeAllDocumentation => false, InstallPrefix => \"/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/\", UserMode => false, SeparateExec => true, DebuggingMode => true)" -e "\"info-\"|\"ForeignFunctions\" << ForeignFunctions#\"test number\" << close" -e "exit 0" && gzip -nf9 /tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/info/ForeignFunctions.info
 -- making example results for "ForeignPointerType Pointer"                  -- 1.61209 seconds elapsed
 -- making example results for "ForeignType ForeignObject"                   -- 1.35341 seconds elapsed
 -- making example results for "ForeignVoidType"                             -- 1.33468 seconds elapsed
 -- making example results for "ForeignUnionType Thing"                      -- 1.5259 seconds elapsed
 -- making example results for "ForeignPointerType"                          -- 1.4927 seconds elapsed
 -- making example results for "ForeignIntegerType"                          -- 1.58823 seconds elapsed
 -- making example results for "ForeignIntegerType Number"                   -- 1.43846 seconds elapsed
 -- making example results for "ForeignFunctions"                            -- 1.56296 seconds elapsed
 -- making example results for "ForeignPointerArrayType"                     -- 1.57525 seconds elapsed
 -- making example results for "ForeignType Pointer"                         -- 1.43851 seconds elapsed
 -- making example results for "foreignSymbol"                              
 ulimit -c unlimited; ulimit -t 700; ulimit -s 8192; ulimit -n 512;  cd /private/tmp/M2-47966-0/11-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/bin/M2-binary" -q --no-randomize --no-readline --silent --stop --print-width 77 -e 'needsPackage("ForeignFunctions",Reload=>true,FileName=>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/Macaulay2/packages/ForeignFunctions.m2")' <"/private/tmp/M2-47966-0/0_foreign__Symbol.m2" >>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_foreign__Symbol.errors" 2>&1
/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_foreign__Symbol.errors:0:1:(3):[12]: (output file) error: Macaulay2 exited with status code 1
/private/tmp/M2-47966-0/0_foreign__Symbol.m2:0:1: (input file)
M2: *** Error 1
 -- 1.26812 seconds elapsed
 -- making example results for "foreignFunction"                            
 ulimit -c unlimited; ulimit -t 700; ulimit -s 8192; ulimit -n 512;  cd /private/tmp/M2-47966-0/12-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/bin/M2-binary" -q --no-randomize --no-readline --silent --stop --print-width 77 -e 'needsPackage("ForeignFunctions",Reload=>true,FileName=>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/Macaulay2/packages/ForeignFunctions.m2")' <"/private/tmp/M2-47966-0/0_foreign__Function.m2" >>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_foreign__Function.errors" 2>&1
/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_foreign__Function.errors:0:1:(3):[12]: (output file) error: Macaulay2 exited with status code 1
/private/tmp/M2-47966-0/0_foreign__Function.m2:0:1: (input file)
M2: *** Error 1
 -- 1.52009 seconds elapsed
 -- making example results for "ForeignRealType"                             -- 1.45 seconds elapsed
 -- making example results for "value(ForeignObject)"                        -- 1.68802 seconds elapsed
 -- making example results for "ForeignArrayType VisibleList"                -- 1.30025 seconds elapsed
 -- making example results for "ForeignObject"                               -- 1.41049 seconds elapsed
 -- making example results for "Pointer"                                     -- 1.27063 seconds elapsed
 -- making example results for "ForeignArrayType"                            -- 1.39379 seconds elapsed
 -- making example results for "registerFinalizer(ForeignObject,Function)"   -- 1.67174 seconds elapsed
 -- making example results for "size(ForeignType)"                           -- 1.43356 seconds elapsed
 -- making example results for "foreignStructType"                           -- 1.41679 seconds elapsed
 -- making example results for "* voidstar = Thing"                          -- 1.201 seconds elapsed
 -- making example results for "foreignPointerArrayType"                     -- 1.30667 seconds elapsed
 -- making example results for "openSharedLibrary"                          
 ulimit -c unlimited; ulimit -t 700; ulimit -s 8192; ulimit -n 512;  cd /private/tmp/M2-47966-0/24-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/bin/M2-binary" -q --no-randomize --no-readline --silent --stop --print-width 77 -e 'needsPackage("ForeignFunctions",Reload=>true,FileName=>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/Macaulay2/packages/ForeignFunctions.m2")' <"/private/tmp/M2-47966-0/0_open__Shared__Library.m2" >>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_open__Shared__Library.errors" 2>&1
/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_open__Shared__Library.errors:0:1:(3):[12]: (output file) error: Macaulay2 exited with status code 1
/private/tmp/M2-47966-0/0_open__Shared__Library.m2:0:1: (input file)
M2: *** Error 1
 -- 1.36304 seconds elapsed
 -- making example results for "ForeignType * voidstar"                      -- 1.44957 seconds elapsed
 -- making example results for "ForeignStringType String"                    -- 1.4028 seconds elapsed
 -- making example results for "foreignObject"                               -- 1.36301 seconds elapsed
 -- making example results for "ForeignStructType VisibleList"               -- 1.23909 seconds elapsed
 -- making example results for "address"                                     -- 1.51069 seconds elapsed
 -- making example results for "foreignUnionType"                            -- 1.59552 seconds elapsed
 -- making example results for "SharedLibrary"                              
 ulimit -c unlimited; ulimit -t 700; ulimit -s 8192; ulimit -n 512;  cd /private/tmp/M2-47966-0/31-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/x86_64-Darwin-macOS-14.2.1/bin/M2-binary" -q --no-randomize --no-readline --silent --stop --print-width 77 -e 'needsPackage("ForeignFunctions",Reload=>true,FileName=>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/Macaulay2/packages/ForeignFunctions.m2")' <"/private/tmp/M2-47966-0/0___Shared__Library.m2" >>"/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/___Shared__Library.errors" 2>&1
/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/___Shared__Library.errors:0:1:(3):[12]: (output file) error: Macaulay2 exited with status code 1
/private/tmp/M2-47966-0/0___Shared__Library.m2:0:1: (input file)
M2: *** Error 1
 -- 1.3592 seconds elapsed
 -- making example results for "nullPointer"                                 -- 1.34287 seconds elapsed
 -- making example results for "getMemory"                                   -- 1.47647 seconds elapsed
 -- making example results for "ForeignPointerArrayType VisibleList"         -- 1.3833 seconds elapsed
 -- making example results for "ForeignRealType Number"                      -- 1.25138 seconds elapsed
 -- making example results for "ForeignStringType"                           -- 1.32235 seconds elapsed
 -- making example results for "foreignArrayType"                            -- 1.45178 seconds elapsed
currentString:1:1:(3):[2]: error: installPackage: 4 error(s) occurred running examples for package ForeignFunctions

@d-torrance I see you are the author for this (edit: ForeignFunctions) package. Do you know what could be going wrong here?

d-torrance commented 6 months ago

Several of the documentation nodes in ForeignFunctions package use examples that try to load some shared library on the system. I think the 4 errors you got likely came from trying to find libmps.dylib and libmpfr.dylib.

Do those files exist on your system? If so, where are they located? If I remember, on most systems this works out of the box, but there's some goofiness with ARM Macs because brew doesn't install shared libraries in one of the usual places. There's some hacky code that tries to figure out where to look, but maybe some things have changed and I need to fix it again. :)

etdavila10 commented 6 months ago

If I remember, on most systems this works out of the box, but there's some goofiness with ARM Macs because brew doesn't install shared libraries in one of the usual places.

I suppose it is important that I provide this information:

❯ brew config
HOMEBREW_VERSION: 4.2.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: c6d959218f143cd17b1fc3e0f10f143cbd273528
Last commit: 4 days ago
Core tap JSON: 28 Feb 04:54 UTC
Core cask tap JSON: 28 Feb 04:54 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.ELbIsc1Smz/org.xquartz:0
HOMEBREW_EDITOR: nvim
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit icelake
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-x86_64
CLT: 15.1.0.0.1.1700200546
Xcode: N/A

In particular, I am still running an intel processor. This issue occurs on ARM processors as well.

Do those files exist on your system? If so, where are they located?

I do seem to have these libraries: libmps.dylib: exists in directory /usr/local/Cellar/mpsolve/3.2.1_4/lib libmpfr.dylib: exists in directory /usr/local/Cellar/mpfr/4.2.1/lib

Is it possible that it might have to do with the libraries mentioned above in this issue? From icu4c? This is the error that one gets after running brew install macaulay2

>M2
dyld[33649]: Library not loaded: /usr/local/opt/icu4c/lib/libicudata.73.dylib
  Referenced from: <0DB95822-6D58-3D58-AABF-BAEBE9BB176D> /usr/local/Cellar/macaulay2/1.22_2/bin/M2-binary
  Reason: tried: '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache), '/usr/local/bin/../lib/Macaulay2/lib/libicudata.73.dylib' (no such file), '/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicudata.73.dylib' (no such file), '/usr/local/lib/libicudata.73.dylib' (no such file), '/usr/lib/libicudata.73.dylib' (no such file, not in dyld cache)
zsh: abort      M2

This is the error one receives when running M2 after installing with brew install macaulay2.

Let me know if you need any further information!

mahrud commented 6 months ago

Could you attach or paste the content of the .errors files in

/private/tmp/macaulay2-20240227-76240-4hnyr9/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/
etdavila10 commented 6 months ago

Thank you for pointing me here!

_open__Shared__Library.errors:

-- -*- M2-comint -*- hash: -945631043

i1 : openSharedLibrary "mpfr"
stdio:1:1:(3): error: dlopen(libmpfr.dylib, 0x0001): tried: 'libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmpfr.dylib' (no such file), '/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/usr/lib/libmpfr.dylib' (no such file, not in dyld cache), 'libmpfr.dylib' (no such file)

___Shared__Library.errors:

-- -*- M2-comint -*- hash: 715115677

i1 : mpfr = openSharedLibrary "mpfr"
stdio:1:8:(3): error: dlopen(libmpfr.dylib, 0x0001): tried: 'libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmpfr.dylib' (no such file), '/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/usr/lib/libmpfr.dylib' (no such file, not in dyld cache), 'libmpfr.dylib' (no such file)

_foreign__Function.errors:

-- -*- M2-comint -*- hash: 2002912010

i1 : mpfr = openSharedLibrary "mpfr"
stdio:1:8:(3): error: dlopen(libmpfr.dylib, 0x0001): tried: 'libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmpfr.dylib' (no such file), '/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmpfr.dylib' (no such file), '/usr/lib/libmpfr.dylib' (no such file, not in dyld cache), 'libmpfr.dylib' (no such file)

_foreign__Symbol.errors:

-- -*- M2-comint -*- hash: 180350256

i1 : mps = openSharedLibrary "mps"
stdio:1:7:(3): error: dlopen(libmps.dylib, 0x0001): tried: 'libmps.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibmps.dylib' (no such file), '/usr/local/opt/tbb/lib/libmps.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmps.dylib' (no such file), '/usr/local/opt/tbb/lib/libmps.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/libmps.dylib' (no such file), '/usr/lib/libmps.dylib' (no such file, not in dyld cache), 'libmps.dylib' (no such file)
mahrud commented 6 months ago

Do mpfr and mpsolve libraries also exist in /usr/local/lib? I would think ForeignFunctions should also search there, but it looks like it's only searching in:

/System/Volumes/Preboot/Cryptexes/
/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/tbb/lib/
/usr/lib/
/usr/local/opt/tbb/lib/

(and some of them twice, for whatever reason).

etdavila10 commented 6 months ago

Yes! I see the two libraries libmps.dylib and libmpfr.dylib in the directory /usr/local/lib/.

mahrud commented 6 months ago

What does echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH say?

etdavila10 commented 6 months ago

Neither of those environment variables seem to be defined on my machine.

d-torrance commented 6 months ago

What about DYLD_FALLBACK_LIBRARY_PATH? From the macOS manpage for dlopen:

dlopen() searches for a compatible Mach-O file in the directories specified by a set of environment variables and the process's current working directory. When set, the environment variables must contain a colon-separated list of directory paths, which can be absolute or relative to the current working directory. The environment variables are LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, and DYLD_FALLBACK_LIBRARY_PATH. The first two variables have no default value. The default value of DYLD_FALLBACK_LIBRARY_PATH is $HOME/lib;/usr/local/lib;/usr/lib. dlopen() searches the directories specified in the environment variables in the order they are listed.

It seems like /usr/local/lib should be in the list, but maybe DYLD_FALLBACK_LIBRARY_PATH is set to something else?

etdavila10 commented 6 months ago

What about DYLD_FALLBACK_LIBRARY_PATH?

This also doesn't seem to be set. Should I be setting these variables manually?

mahrud commented 6 months ago

I just created new bottles for 1.23-rc1, including one for arm64_sonoma. Try removing M2 and installing using brew install M2 again.

etdavila10 commented 6 months ago

Yes, everything seems to be working well now 👍

asuciu2014 commented 6 months ago

Thank you very much, the M2 install works now, on both Intel and M3 processors.

On Mar 1, 2024, at 1:59 PM, Mahrud Sayrafi @.***> wrote:

I just created new bottles for 1.23-rc1, including one for arm64_sonoma. Try removing M2 and installing using brew install M2 again.

Corrado-possieri commented 6 months ago

I still have an issue with an updated package. Running the command M2 in the Terminal I get

dyld[84828]: Library not loaded: /opt/homebrew/opt/flint/lib/libflint.18.0.dylib
  Referenced from: <19F29FCD-9CE2-3465-8C15-742AC684642B> /opt/homebrew/Cellar/macaulay2/1.23-rc1/bin/M2-binary
  Reason: tried: '/opt/homebrew/bin/../lib/Macaulay2/lib/libflint.18.0.dylib' (no such file), '/libflint.18.0.dylib' (no such file), '/opt/homebrew/opt/flint/lib/libflint.18.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/flint/lib/libflint.18.0.dylib' (no such file), '/opt/homebrew/opt/flint/lib/libflint.18.0.dylib' (no such file), '/opt/homebrew/bin/../lib/Macaulay2/lib/libflint.18.0.dylib' (no such file), '/libflint.18.0.dylib' (no such file), '/opt/homebrew/Cellar/flint/3.1.0/lib/libflint.18.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/flint/3.1.0/lib/libflint.18.0.dylib' (no such file), '/opt/homebrew/Cellar/flint/3.1.0/lib/libflint.18.0.dylib' (no such file)
zsh: abort      M2

I cheched /opt/homebrew/Cellar/flint/3.1.0/lib/ and it seems that the latest version of lib flint is ibflint.19.0.dylib

etdavila10 commented 6 months ago

Yes, it looks like there was a recent update to flint (3.0.1 -> 3.1.0). In trying to run brew update and brew upgrade it seems that brew attempts to recompile Macaulay2 and its dependencies, but there seems to be an error in upgrading macaulay2/tap/factory. Here is the error message that I see:

cfModGcd.cc:1809:12: error: no matching function for call to 'fq_nmod_mat_rref'
  long rk= fq_nmod_mat_rref (FLINTN,ctx);
           ^~~~~~~~~~~~~~~~
/usr/local/opt/flint/include/flint/fq_mat_templates.h:247:7: note: candidate function not viable: requires 3 arguments, but 2 were provided
slong TEMPLATE(T, mat_rref)(TEMPLATE(T, mat_t) B, const TEMPLATE(T, mat_t) A, const TEMPLATE(T, ctx_t) ctx);
      ^
/usr/local/opt/flint/include/flint/templates.h:27:23: note: expanded from macro 'TEMPLATE'
#define TEMPLATE(X,Y) CAT(X,Y)
                      ^
/usr/local/opt/flint/include/flint/templates.h:15:18: note: expanded from macro 'CAT'
#define CAT(X,Y) X##_##Y
                 ^
<scratch space>:130:1: note: expanded from here
fq_nmod_mat_rref
^
cfModGcd.cc:1916:12: error: no matching function for call to 'fq_nmod_mat_rref'
  long rk= fq_nmod_mat_rref (FLINTN,ctx);
           ^~~~~~~~~~~~~~~~
/usr/local/opt/flint/include/flint/fq_mat_templates.h:247:7: note: candidate function not viable: requires 3 arguments, but 2 were provided
slong TEMPLATE(T, mat_rref)(TEMPLATE(T, mat_t) B, const TEMPLATE(T, mat_t) A, const TEMPLATE(T, ctx_t) ctx);
      ^
/usr/local/opt/flint/include/flint/templates.h:27:23: note: expanded from macro 'TEMPLATE'
#define TEMPLATE(X,Y) CAT(X,Y)
                      ^
/usr/local/opt/flint/include/flint/templates.h:15:18: note: expanded from macro 'CAT'
#define CAT(X,Y) X##_##Y
                 ^
<scratch space>:130:1: note: expanded from here
fq_nmod_mat_rref
^
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_reval.cc  -fno-common -DPIC -o .libs/cf_reval.o
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_random.cc -o cf_random.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfSubResGcd.cc  -fno-common -DPIC -o .libs/cfSubResGcd.o
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_map_ext.cc -o cf_map_ext.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_resultant.cc -o cf_resultant.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cf_reval.cc -o cf_reval.o >/dev/null 2>&1
2 errors generated.
make[2]: *** [cfModGcd.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfNTLzzpEXGCD.cc -o cfNTLzzpEXGCD.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfModResultant.cc -o cfModResultant.o >/dev/null 2>&1
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -DFACTORY_BUILDING_DLL -I/usr/local/opt/flint/include/ -I/usr/local/opt/ntl/include -I/usr/local/opt/gmp/include -DSING_NDEBUG -DOM_NDEBUG -std=c++11 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -funroll-loops -fno-rtti -Qunused-arguments -c cfSubResGcd.cc -o cfSubResGcd.o >/dev/null 2>&1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
d-torrance commented 6 months ago

Here's the fix for the factory issue: https://github.com/Singular/Singular/pull/1209