Rosetta translation is a per-process thing–you cannot use an Apple silicon library directly in an Intel process.
> On Jan 13, 2021, at 11:41, Craig Treleaven <ctrelea...@cogeco.ca> wrote: > >> On Jan 11, 2021, at 9:07 PM, Ryan Schmidt <ryandes...@macports.org> wrote: >> On Jan 11, 2021, at 19:38, Craig Treleaven wrote: >> >>> A user with a new Apple Silicon-based Mac had a go at building mythtv.28. >>> It failed thusly: >>> >>> ---> Computing dependencies for mythtv.28 >>> Error: Cannot install mythtv-core.28 for the arch 'x86_64' because >>> Error: its dependency logrotate does not build for the required arch by >>> default >>> >>> https://trac.macports.org/ticket/62027 >>> >>> Given Rosetta2 on these systems, isn’t this a bogus error? On M1 Macs, we >>> might warn that a dependency is being built for an arch different from that >>> of the main target but why should it be a fatal error? >>> >>> What was done during the PPC to Intel transition? Did we try to force all >>> deps of a port to build with the same arch? >> >> MacPorts 2.6.4 is supposed to support all possible arch demotions. On arm64, >> you're supposed to be able to run x86_64. On x86_64, you're supposed to be >> able to run i386. On i386, you're supposed to be able to run ppc. Some of >> this was already in place before, and it was enhanced for 2.6.4 in this >> commit: >> >> https://github.com/macports/macports-base/commit/94f428eda6bd58b57c670c20fb2362ad7012310a >> >> See this ticket: >> >> https://trac.macports.org/ticket/61430 >> >> Installing a port for a demoted architecture would require its dependencies >> to be installed universal. MacPorts is trying to install the dependencies >> universal and is failing on logrotate because it does not have a universal >> variant. The solution is to add a universal variant to logrotate. >> Alternately, if logrotate does not install any libraries (and it looks like >> it does not), add "installs_libs no" to the logrotate portfile so that >> MacPorts knows it does not need to check its architecture. Or if logrotate >> does install libraries but whichever one of mythtv.28's dependencies depends >> on logrotate (looks like it's mythtv-core.28) doesn't link with any of its >> libraries, add "depends_skip_archcheck logrotate" to mythtv-core.28. >> > > Am I incorrect that Rosetta2 does NOT require library dependencies to be the > same arch as the main program? I thought I understood that an X86_64 program > could call an arm64 library (and vice versa) and that Rosetta2 would do the > right thing at run time. If so, MacPorts does not have to supply a > mult-arch/universal library. > > I understand that Rosetta2 is not going to around forever—maybe 2 to 5 years. > However, if it does automatically translate libraries at run time, that > would permit quite a number of ports to work immediately. No? > > Craig >