Opened 2 years ago

Closed 2 years ago

#64041 closed defect (duplicate)

[M1 Monterey] Trying to replace gcc-devel with gcc11: py39-numpy+gcc11+openblas fails

Reported by: ednl (Ewoud Dronkert) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: monterey arm64 Cc: diekhans (Mark Diekhans), jrjsmrtn
Port: py-numpy

Description

For some reason, gfortran is linked to gcc-devel instead of to gcc11, and py39-numpy depends on gfortran in its standard variant. So when I unsuspectingly installed py39-numpy, I got gcc-devel "for free". Trouble is, there's a new version of the devel branch every day, so any general port upgrade now pulls in new versions of gcc-devel and libgcc-devel, which takes a long time.

While trying to replace the current versions, I successfully installed gcc11, libgcc11 and openblas +gcc11 +lapack +native but when I tried to sudo port install py39-numpy +gcc11 +openblas it fails with:

:info:build In file included from /opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:205,
:info:build                  from /opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/Python.h:50,
:info:build                  from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py39-numpy/work/numpy-1.21.4/numpy/core/src/umath/_umath_tests.dispatch.c:9,
:info:build                  from build/src.macosx-12.0-arm64-3.9/numpy/core/src/umath/_umath_tests.dispatch.asimdhp.c:12:
:info:build /opt/local/lib/gcc11/gcc/arm64-apple-darwin21/11.1.0/include-fixed/math.h:68:5: error: #error "Unsupported value of __FLT_EVAL_METHOD__."
:info:build    68 | #   error "Unsupported value of __FLT_EVAL_METHOD__."

Apart from fixing this error, I think the best solution would be to once again link gfortran to a normal release version of gcc, if that is possible, instead of to gcc-devel.

Attachments (1)

main.log (383.2 KB) - added by ednl (Ewoud Dronkert) 2 years ago.
py39-numpy +gcc11 +openblas build log on M1 Monterey

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by ednl (Ewoud Dronkert)

Attachment: main.log added

py39-numpy +gcc11 +openblas build log on M1 Monterey

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: monterey arm64 added
Port: py-numpy added; py39-numpy removed

This is deliberately done because no released version of gcc works correctly on Apple Silicon machines yet. See [5bdd4ddc175ea2d5de0fc70c86115c584b10c390/macports-ports].

New versions of gcc-devel are not put into MacPorts "every day", nor need it necessarily take a long time for you to upgrade if an update is published; you should be able to receive binaries from us. However, we may not have produced the binaries yet, and if so, MacPorts will build from source on your system, which will take a long time. In this case, you could cancel the update and sudo port clean gcc-devel and postpone your upgrade for a day and by then we probably will have produced the binary.

Version 0, edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (next)

comment:2 Changed 2 years ago by cjones051073 (Chris Jones)

I was about to reply saying the same as Ryan. It is unfortunate but there is currently no official release of gcc that support Apple Silicon. We have some patches that have been apply to the gcc11 port, but these have proved to be not entirely reliable. So, as of now, the gcc-devel ports are I am afraid the best support for Arm, hence I switch back to using them by default.

I would really hope once gcc12 is out that will have better Arm support so at that point we can use that as the default across the board.

comment:3 Changed 2 years ago by ednl (Ewoud Dronkert)

OK, thanks for the info both, and your kind attention.

I said "every day" but I guess I meant more: every time I do try to update (which is not every day). And yes, often it means building instead of pulling a binary. Also the version numbering seems to be the date; that's why I thought it would be every day, something like nightly builds.

comment:4 Changed 2 years ago by diekhans (Mark Diekhans)

Cc: diekhans added

comment:5 Changed 2 years ago by jrjsmrtn

Cc: jrjsmrtn added

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

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.