Opened 5 weeks ago

Closed 4 weeks ago

#70599 closed defect (worksforme)

clang-17 @17.0.6_3 Build failure on external hard disk

Reported by: attikkos Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port: clang-17

Description

Build fails with error message: %zsh: bus error sudo port install clang-17

My machine

  • Mac Studio
  • Apple M1 Max chip, 32G RAM
  • Sonoma 14.6.1
  • LACIE external drive (with hardly any data on it - 3% capacity); AppleAPFSMedia
  • Xcode 15.4 (15F31d)

Downloaded the MacPorts code from GitHub, and built it on my external drive. I have configured it so that MacPorts is stored on the external drive, and the port prefix points to the external drive.

I installed gmake, and cmake successfully. Then, I tried to install the latest gcc (gcc14 @14.2.0_1). The build was going well until clang-17 failed to build with the above error message, and a popup message stating: "Disk Not Ejected Properly". (See attachment.). Note that, I can subsequently issue any other port command, such as 'port installed' or install another port without a problem.

  • I issued a 'clean' and tried again with the same result.
  • I installed gcc13 successfully, which installed clang-16
  • I installed clang-18 successfully.
  • Still, clang-17 fails to install.
  • I did a full uninstall, except for port code, and tried again; no cigar.

Attachments (1)

Screenshot 2024-08-20 at 10.22.31 PM.png (70.7 KB) - added by attikkos 5 weeks ago.

Download all attachments as: .zip

Change History (9)

Changed 5 weeks ago by attikkos

comment:1 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

I can't imagine how MacPorts could inadvertently cause a disk to be forcibly ejected.

comment:2 Changed 5 weeks ago by jmroot (Joshua Root)

This sounds like flaky hardware TBH. I've had USB to SATA adaptors in the past that would disconnect or reset when there was a lot of I/O activity on them, and building clang-17 certainly does a lot more of that than most ports.

comment:3 Changed 5 weeks ago by attikkos

I do not want to speculate on something I have no knowledge of.

What I do know is that I can build clang-16 and clang-18, and indeed any other package so far, except clang-17.

Frankly, if gcc dropped its dependency on clang, I would be happy, but that ain't gonna happen.

comment:4 Changed 5 weeks ago by jmroot (Joshua Root)

Well, we are not able to reproduce this (I believe our x86_64 macOS 13 and 14 builders use an external HDD), so it's virtually impossible to debug if there is something wrong with clang-17's build system in particular. If anyone does figure it out, a pull request would be welcome.

comment:5 Changed 5 weeks ago by attikkos

Fair enough. Thanks for spending your time looking further into it.

Do I close the ticket or you?

comment:6 Changed 5 weeks ago by kencu (Ken)

gcc14 depends on gcc14-libcxx for some headers.

gcc14-libcxx has several variants

https://ports.macports.org/port/gcc14-libcxx/details/

you could choose to install gcc14-libcxx with a variant that matches one of the clang versions you have installed, thereby hopefully avoiding the need for clang-17

comment:7 Changed 5 weeks ago by attikkos

Thanks a lot for the advice.

And thanks to the entire MacPorts crew for the much needed service they provide.

comment:8 Changed 4 weeks ago by jmroot (Joshua Root)

Port: clang-17 added
Resolution: worksforme
Status: newclosed

Closing since there's not really anything we can do with the information we have. Please feel free to reopen if new information comes to light that makes this actionable.

Note: See TracTickets for help on using tickets.