Opened 7 months ago

Closed 7 months ago

Last modified 4 months ago

#69639 closed defect (fixed)

netcdf fails to build on Sonoma macOS 14.4.1

Reported by: EJFielding (Eric Fielding) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: sonoma Cc:
Port: netcdf

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I was trying to do the usual upgrade outdated and it was going to install a new version of netcdf netcdf-4.9.2_2. I also tried installing it directly with sudo port install netcdf +cdf5 +dap +netcdf4 +gcc12. The build failed when it could not find the "m4" program and then it requested that I install the command-line tools. I let it run the command-line tools installation, cleaned the port, and tried again, but I got the same error.

:info:build /Library/Developer/CommandLineTools/usr/bin/make  -f libdap4/CMakeFiles/dap4.dir/build.make libdap4/CMakeFiles/dap4.dir/build
:info:build xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.

Attachments (1)

main.log (376.4 KB) - added by EJFielding (Eric Fielding) 7 months ago.
netcdf main.log

Download all attachments as: .zip

Change History (9)

Changed 7 months ago by EJFielding (Eric Fielding)

Attachment: main.log added

netcdf main.log

comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: netcdf m4 removed
Owner: set to tenomoto
Status: newassigned

Ok, this will be the same bug that we discovered a little while ago, which is that Apple forgot to include m4 in the 15.3 version of the Xcode command line tools. So far Apple has not responded to my bug report. In other ports we've fixed the problem by using MacPorts m4 instead. See #69464, #69481, #69493, #69515.

comment:2 Changed 7 months ago by EJFielding (Eric Fielding)

Thanks for the update. The "xz" backdoor used "m4" to do its de-obfuscation, so there may be additional pressure on "m4" installations.

comment:3 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

I don't think the xz backdoor situation has any bearing on this ticket. Apple's omission of m4 from the Xcode 15.3 CLT is clearly a mistake and not deliberate, since they still included m4 under its alternate name gm4, they still included both m4 and gm4 in the full Xcode 15.3, and 15.3 was released before the existence of the xz backdoor was disclosed.

comment:4 in reply to:  1 ; Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: sonoma added

Replying to ryandesign:

So far Apple has not responded to my bug report.

In case anyone at Apple is looking for it, it's FB13684598.

comment:5 Changed 7 months ago by EJFielding (Eric Fielding)

As a workaround, I found that I could port uninstall netcdf and then MacPorts would install a variant of "netcdf" that was available as a binary when it needed netcdf as a dependent for other ports that I have installed and complete the port upgrade outdated. I am not sure how the buildbot is able to build the binary.

comment:6 in reply to:  5 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to EJFielding:

I am not sure how the buildbot is able to build the binary.

The macOS Sonoma buildbot workers have not been upgraded to Xcode 15.3 yet, and given this problem and some other problems we've encountered, I'm in no rush to do so.

comment:7 Changed 7 months ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: assignedclosed

In 129d451eb07471de700a2ee5fb6249601502679f/macports-ports (master):

netcdf: use MacPorts m4

Closes: #69639

comment:8 in reply to:  4 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

Replying to ryandesign:

So far Apple has not responded to my bug report.

In case anyone at Apple is looking for it, it's FB13684598.

Apple responded today that the problem should be fixed in Xcode CLT 16 beta 3. I checked 16 beta, 16 beta 2, and 16 beta 3, and m4 appears to be present again in all of them.

Note: See TracTickets for help on using tickets.