Opened 3 years ago

Closed 12 months ago

#63521 closed defect (fixed)

clang-12 @12.0.1 +analyzer+libstdcxx fails in patch stage

Reported by: p-bro Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager)
Port: clang-12

Description

Building current version of clang-12 fails to build on Mac OS 11.6 (Apple M1) in patch stage with the following error:

:error:patch Failed to patch clang-12: can't read "gcc_subdirectory_x86_64": no such variable
:debug:patch Error code: NONE
:debug:patch Backtrace: can't read "gcc_subdirectory_x86_64": no such variable
:debug:patch     while executing
:debug:patch "$post $targetname"

Full log is attached.

This happened during an attempt to restore the port selection from a computer running Catalina on a new Mac using the Migration procedure.

Attachments (1)

main.log (111.0 KB) - added by p-bro 3 years ago.
clang-12 build log

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by p-bro

Attachment: main.log added

clang-12 build log

comment:1 Changed 3 years ago by kencu (Ken)

Yes, that could happen. On Catalina, clang-12 defaults to using the +libstdcxx variant. But on an M1, that variant is not supposed to be used so it is not defaulted on:

https://github.com/macports/macports-ports/blob/47a76de2d0f5d7974c8d8ae09fff976b2ec03d56/lang/llvm-12/Portfile#L465

Please just do this:

sudo port clean clang-12
sudo port install clang-12

and it should work fine, and then you can go on and restore the rest of your list.

I could make the variant invisible on M1, but I was hoping that we might possibly get it to work at some point so I left it as a non-default variant that I might come back to work on later.

But that seems unlikely to ever happen, indeed, so I'll look at just making it disappear from M1s.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 3 years ago by p-bro

Removing the +libstdcxx variant indeed solved the problem. Thank you.

comment:3 Changed 2 years ago by kencu (Ken)

Owner: changed from kencu to macports-tickets@…

comment:4 Changed 22 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:5 Changed 12 months ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: assignedclosed

Issue with this variant is now addressed, plus it is anyway no longer enabled by default where it is not needed (which is the vast majority of cases).

Note: See TracTickets for help on using tickets.