Opened 23 months ago

Closed 23 months ago

Last modified 22 months ago

#66603 closed defect (fixed)

eigen3-devel: supported_archs noarch calls for Clang on Rosetta

Reported by: barracuda156 Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: base Version: 2.8.0
Keywords: Cc: eborisch (Eric A. Borisch)
Port: eigen3

Description

There is a weird bug in the base, apparently: many ports having noarch call for Clang on 10.6.x when the build is for ppc. Example (10.6.8 Rosetta):

10:opt svacchanda$  /usr/bin/sudo port -v -n install eigen3-devel 
--->  Computing dependencies for eigen3-devel..
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.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port eigen3-devel failed

Change History (7)

comment:1 Changed 23 months ago by jmroot (Joshua Root)

Cc: eborisch added
Component: baseports
Port: eigen3 added
Summary: supported_archs noarch calls for Clang on Rosettaeigen3-devel: supported_archs noarch calls for Clang on Rosetta

Not a base bug. The eigen3 Portfile sets compiler.cxx_standard 2011 which is what causes it to depend on a C++11 capable compiler.

comment:2 in reply to:  1 Changed 23 months ago by barracuda156

Replying to jmroot:

Not a base bug. The eigen3 Portfile sets compiler.cxx_standard 2011 which is what causes it to depend on a C++11 capable compiler.

I do not get the same error with every C++11 port. This only happens when noarch is there. These are ports which also define compiler.cxx_standard 2011:

10:~ svacchanda$ port deps libptytty
Full Name: libptytty @2.0_0
Build Dependencies:   cmake, gcc12
Library Dependencies: libgcc

10:~ svacchanda$ port deps libsigcxx2
Full Name: libsigcxx2 @2.10.8_0
Extract Dependencies: xz
Build Dependencies:   pkgconfig, mm-common, m4, graphviz, doxygen, libxslt,
                      gcc12, meson, ninja
Library Dependencies: libgcc

But:

10:~ svacchanda$ port deps eigen3
Full Name: eigen3 @3.4.0_1
Extract Dependencies: lbzip2
Build Dependencies:   cmake, pkgconfig, clang-11
Library Dependencies: libgcc

10:~ svacchanda$ port deps eigen3-devel
Full Name: eigen3-devel @3.4-tracking-20221231_0
Extract Dependencies: lbzip2
Build Dependencies:   cmake, pkgconfig, clang-11
Library Dependencies: libgcc

10:~ svacchanda$ port deps nanoflann
Full Name: nanoflann @1.4.3_0
Build Dependencies:   cmake, clang-11
Library Dependencies: libgcc

UPD. And you are right, it is not just noarch, but a combo of noarch with C++11.

Last edited 23 months ago by barracuda156 (previous) (diff)

comment:3 Changed 23 months ago by jmroot (Joshua Root)

OK, so it's the fact that clang is used with build_arch=ppc that you're concerned about. The decision whether to put clang or gcc first in the fallback list is based on ${configure.build_arch}, which is empty for noarch ports.

comment:4 Changed 23 months ago by jmroot (Joshua Root)

Component: portsbase

comment:5 in reply to:  3 Changed 23 months ago by barracuda156

Replying to jmroot:

OK, so it's the fact that clang is used with build_arch=ppc that you're concerned about. The decision whether to put clang or gcc first in the fallback list is based on ${configure.build_arch}, which is empty for noarch ports.

Yeah, it essentially breaks those ports for PPC, unless configure.compiler= is passed on command line, which is not something obvious. And things get worse when some dependency of a port has this problem.

comment:6 Changed 23 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 15270571ab178ddff693fbd722163fe1d638ed55/macports-base (master):

get_compiler_fallback: use build_arch as fallback

configure.build_arch may be empty for e.g. noarch ports, some of which
still use a compiler at build time.

Fixes: #66603

comment:7 in reply to:  6 Changed 22 months ago by barracuda156

Replying to jmroot:

In 15270571ab178ddff693fbd722163fe1d638ed55/macports-base (master):

get_compiler_fallback: use build_arch as fallback

configure.build_arch may be empty for e.g. noarch ports, some of which
still use a compiler at build time.

Fixes: #66603

Thank you!

Note: See TracTickets for help on using tickets.