Opened 2 years ago

Closed 2 years ago

#65613 closed defect (fixed)

openssh on Rosetta: Cannot install clang-11 for the arch 'powerpc' because its dependency python310 does not build for the required arch by default

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, rosetta, snowleopard Cc:
Port: openssh

Description

When invoked on 10.6.8 Rosetta, it errs out with a nonsense message:

10:panda svacchanda$ sudo port -v install openssh
--->  Computing dependencies for openssh..
Error: Cannot install clang-11 for the arch 'powerpc' because
Error: its dependency python310 does not build for the required arch by default
Error: and does not have a universal variant.

This is clearly wrong:

10:panda svacchanda$ port deps openssh
Full Name: openssh @9.0p1_6+kerberos5+xauth
Build Dependencies:   cctools, autoconf, automake, libtool, clang-11
Library Dependencies: openssl, libedit, ncurses, zlib, kerberos5
Runtime Dependencies: ssh-copy-id, xauth

Change History (6)

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

it would be perhaps helpful if right about here we put a powerpc blocker:

https://github.com/macports/macports-ports/blob/8b004c0f008ad275c0c8ad0ddf75235cd3fee9df/_resources/port1.0/compilers/clang_compilers.tcl#L15

so then you would not need to blacklist clang when building for powerpc in 25,000 portfiles.

comment:2 in reply to:  1 Changed 2 years ago by barracuda156

Replying to kencu:

it would be perhaps helpful if right about here we put a powerpc blocker:

https://github.com/macports/macports-ports/blob/8b004c0f008ad275c0c8ad0ddf75235cd3fee9df/_resources/port1.0/compilers/clang_compilers.tcl#L15

so then you would not need to blacklist clang when building for powerpc in 25,000 portfiles.

That would be certainly helpful, since at the moment no clang works for any PPC on any MacOS. (And Rosetta is the most affected here.)

But how to specify such condition correctly? I never did any PR into Macports base itself.

comment:3 Changed 2 years ago by barracuda156

  1. S. With this particular port it seems that disabling Apple keychain for Rosetta is the way to go. (It also solves the dependency problem above.)

Portfile has this:

    platform macosx {
        if {${os.major} < 10} {
            # See: https://trac.macports.org/ticket/60385
            configure.args-delete   --with-keychain=apple
        } elseif {${os.major} <= 11} {
            # clang is required to build the new Apple Keychain integration due
            # to it using the Object Subscripting feature, c.f. #59397.
            # We'll keep it simple and just blacklist any gcc version, cc
            # (which could be anything), system clang versions prior to those
            # shipped with Xcode 4.4.
            # Regarding the macports-clang versions, any version in the
            # MacPorts tree should suit our needs, since the clang
            # documentation lists FOSS clang/llvm 3.1 as the first version to
            # support Object Subscripting and the oldest version in our tree is
            # now 3.3.
            compiler.blacklist-append   *gcc* cc {clang < 421}
        }
    }

I just expanded the condition to Rosetta case: https://github.com/macports/macports-ports/pull/15605

comment:4 Changed 2 years ago by jmroot (Joshua Root)

You actually see this because clang-11 sets supported_archs i386 x86_64. IIRC you would get a better error message if you tried to install clang-11 directly (rather than as a dependency of something).

comment:5 in reply to:  1 Changed 2 years ago by jmroot (Joshua Root)

Replying to kencu:

it would be perhaps helpful if right about here we put a powerpc blocker:

https://github.com/macports/macports-ports/blob/8b004c0f008ad275c0c8ad0ddf75235cd3fee9df/_resources/port1.0/compilers/clang_compilers.tcl#L15

so then you would not need to blacklist clang when building for powerpc in 25,000 portfiles.

Perhaps, but ppc builds will already never try to use clang unless literally everything else in compiler.fallback is deemed unsuitable.

comment:6 Changed 2 years ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed

In 45363f06500cb4445173e4e6b8129ead0c1ba3f4/macports-ports (master):

openssh: disable apple keychain on Rosetta
Fixes: #65613

Note: See TracTickets for help on using tickets.