vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.15k stars 136 forks source link

Problem with Mac port #539

Open vermaseren opened 3 months ago

vermaseren commented 3 months ago

I am trying to install flint, to change the library for multivariate polynomials. This does not work because on my Mac the GMP is apparently not new enough (apart from some remarks about m4). Hence I get GMP.6.3.0 and try to install that. That gives the error message "No usable m4 in $PATH....." Searching the internet gives in macports: Under the environment at Sonoma 14.4 and Xcode15.3, even Xcode command line is installed, m4 can not be detected during "configure".

Corresponding part of outout from 'port -v install gmp'

... checking for sstream... yes checking for std::locale... yes checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons). Command failed: cd "......../gmp/work/gmp-6.3.0" && ./configure --prefix=/.... --host=applem1-apple-darwin23 --enable-cxx Exit code: 1 ... I found that the issue can be averted by adding the following lines in Portfile.

if {${os.platform} eq "darwin" && ${os.major} > 13 && [string match clang ${configure.compiler}]} { configure.env-append M4=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gm4 }

This has me completely stumped, because a: There is no port command b: There is no configure.env-append command c: There is no Portfile to be found anywhere.

This means that at the moment I cannot make a new installation of GMP (might be serious) or of flint. In the meantime I got Sonoma 14.5, but that does not work either. Does anybody know how to make the above 'hacks' to work?

vermaseren commented 3 months ago

Maybe I posted this too quickly, in the sense that I found a solution. But I still think this is not entirely trivial and may need some work in the installation scripts. 'The' solution seems to be that in the files 'configure' one has to include the line M4=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gm4 before the first use of M4. This holds for all relevant configure files.

There is also a problem wrt python vs python3. This can easily be repaired with a link.

tueda commented 3 months ago

It looks like this is the ticket and the corresponding fix is here. You can try port selfupdate.