#69464 closed defect (fixed)
gmp @6.3.0_0 configure error : configure: error: No usable m4 in $PATH or /usr/5bin
Reported by: | nanigashi-uji (Nanigashi Uji) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.1 |
Keywords: | sonoma haspatch | Cc: | |
Port: | gmp |
Description (last modified by nanigashi-uji (Nanigashi Uji))
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 }
Change History (6)
comment:1 Changed 8 months ago by nanigashi-uji (Nanigashi Uji)
Description: | modified (diff) |
---|
comment:2 Changed 8 months ago by jmroot (Joshua Root)
Owner: | set to MarcusCalhoun-Lopez |
---|---|
Port: | gmp added |
Status: | new → assigned |
comment:3 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)
I'd be very curious to learn where the "5" in /usr/5bin is coming from. Might want to attach the main.log file too.
comment:4 follow-up: 6 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | sonoma haspatch added |
---|
Ok, gmp's configure script, and other files, do literally reference /usr/5bin. Apparently it's a System V thing. Not relevant to macOS.
We have discovered in other tickets (e.g. comment:ticket:69467:6) that Apple forgot (?) to include m4
in the Xcode 15.3 command line tools (although they did still include gm4
), so that's probably what's to blame here.
Since gmp uses m4, it should use the newer MacPorts version of m4. Here's a PR to do that: https://github.com/macports/macports-ports/pull/22985
comment:5 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
We have discovered in other tickets (e.g. comment:ticket:69467:6) that Apple forgot (?) to include
m4
in the Xcode 15.3 command line tools (although they did still includegm4
), so that's probably what's to blame here.
Apple notified me that they fixed it in Xcode CLT 16.
Please attach the config.log.