Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin: can't build Numpy 1.19.1 with GCC < 8.4 #30392

Closed
embray opened this issue Aug 19, 2020 · 8 comments
Closed

Cygwin: can't build Numpy 1.19.1 with GCC < 8.4 #30392

embray opened this issue Aug 19, 2020 · 8 comments

Comments

@embray
Copy link
Contributor

embray commented Aug 19, 2020

Since #29766 I cannot build Numpy 1.19.1 on Cygwin, specifically with AVX enabled, due to this issue in Numpy (actually caused by a bug in GCC < 8.4): numpy/numpy#16290

I've been meaning to work on this issue anyways, so I'll see if I can find a clean workaround. If not, it also works to pass some CFLAGS to the Numpy build as noted on the upstream issues.

https://cygwin.com/packages/summary/gcc-core.html

Component: porting: Cygwin

Keywords: cygwin numpy

Issue created by migration from https://trac.sagemath.org/ticket/30392

@embray embray added this to the sage-9.2 milestone Aug 19, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Cygwin: can't build Numpy 1.9.1 Cygwin: can't build Numpy 1.19.1 Aug 19, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Aug 19, 2020

comment:2

Yes, this is important to fix. Unfortunately the CI infrastructure does not catch this because we cannot control the processor variant that will run the job. For example, https://github.com/sagemath/sage/runs/969113336?check_suite_focus=true https://github.com/sagemath/sage/runs/1002630008 has built numpy successfully.

With which compiler are you observing this failure?

@mkoeppe
Copy link
Member

mkoeppe commented Aug 31, 2020

comment:3

The discussion at numpy/numpy#14787 seems to suggest that nothing needs to be fixed with current compilers. Do you still experience the build problem?

@embray
Copy link
Contributor Author

embray commented Aug 31, 2020

comment:4

It is a problem with GCC<8.4.

I started on a patch to Numpy the week before last but hit a snag before I was able to finish it. Then I went on vacation :P

An ugly but acceptable workaround is also to set

CFLAGS=-ffixed-xmm16 -ffixed-xmm17 -ffixed-xmm18 -ffixed-xmm19 -ffixed-xmm20 -ffixed-xmm21 -ffixed-xmm22 -ffixed-xmm23 -ffixed-xmm24 -ffixed-xmm25 -ffixed-xmm26 -ffixed-xmm27 -ffixed-xmm28 -ffixed-xmm29 -ffixed-xmm30 -ffixed-xmm31

when compiling Numpy.

@mkoeppe
Copy link
Member

mkoeppe commented Aug 31, 2020

comment:5

Current cygwin has gcc 10.2.

I would suggest to limit support of a from-source build of Sage on Cygwin to the latest Cygwin version and encourage users to update Cygwin.

(Does cygwin even have a supported way to install an older version of the distribution?)

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Cygwin: can't build Numpy 1.19.1 Cygwin: can't build Numpy 1.19.1 with GCC < 8.4 Aug 31, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Mar 26, 2021

comment:10

We can close this one as outdated

@mkoeppe mkoeppe removed this from the sage-9.3 milestone Mar 26, 2021
@embray
Copy link
Contributor Author

embray commented Mar 29, 2021

comment:11

I believe so, yes. Most Cygwin installs are not on GCC<8.4 by default, and I have also fixed the issue in Numpy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants