Hello,
I am attempting to get spun up on how to contribute to the project and I am starting to try to build macaulay2 from source following the instructions found here: https://github.com/Macaulay2/M2/wiki/Building-M2-from-source-using-Autotools#quick-start
I have hit an error during the build process that I am stuck at and so am asking for help. I'll describe first what worked successfully, and then where I got stuck and what I have tried to fix it.
Following the OSX specific instructions I installed some dependencies and set environment variables for the configure script as described here: https://github.com/Macaulay2/M2/wiki/Building-M2-from-source-using-Autotools#macos
I ran the configure instructions here: https://github.com/Macaulay2/M2/wiki/Building-M2-from-source-using-Autotools#configuring-the-build although see note below on extra deps needed - I think that both gnu-tar and gcc need to be installed before configure could complete successfully.
The error I am stuck at:
Running gmake from the build folder the first time it ran happily for 10-15 minutes before hitting an error:
../../../src/libmps/monomial/tokenizer.l:51:3: error: call to undeclared function 'yyparse'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
51 | yyparse (data.scanner, &data);
| ^
1 error generated.
Googling surfaced some chatter across different projects that seems somewhat related but nothing that I knew how to make actionable. I see some artifacts in makefiles in the M2 repo that seem related to this and are trying to fix it by removing a couple of offending yacc-parser.{c,h} files so they can be rebuilt.
In particular, there is this commit 530dd6ac1cc5baa335a17bae92baa3c029fb9f58 by Doug Torrance that seems like it is clearly related but nevertheless here I am stuck.
I tried running gmake again and see the same error. I tried brew install macaulay2/tap/mpsolve in case installing this directly out of band of gmake could help fix things but I still see the same issue.
It seems quite possible that my environment or hardware is implicated in what I am seeing so: I am working on a 2020 M1 macbook air running OSX Sequoia 15.6.1. I am happy to provide more details or sniff around my env if you know what you would like to know to help diagnose the issue I am seeing.
I would appreciate any help getting past this issue!
Joel
P.S. Some more notes on friction in the process:
The main github README mentions an M2/INSTALL file that I think no longer exists. It was removed in c4fbdf09148e67229fa99e7cf5ebc534718bcc92 but there are still references to it in the top-level README and I think I saw a few more places where it is still mentioned in the repo. I found the guide that I am following by searching in the google group.
In addition to the OSX dependencies recommended to install in advance I also had to install gnu-tar and gcc to get as far as I did.
Eventually, I’d be happy to help improve these things by updating documentation but I have not yet contributed to this project at all and so don’t know anything about the unknown unknowns that are out there.