Skip to content

docker build implicitly assumes CPU features that I don't have #40699

@emmanuelthome

Description

@emmanuelthome

Hi

I've been using sagemath with the docker image for quite a few years on a collection of x86_64 lab machines. It worked well until 10.6, even on old machines ("old" means 10 years old and more).

With the sagemath/sagemath:10.7 image (sha256:cff1baec214e7893efeb750f0b827ab24228002554a02ee0f7804936aab3323f), I'm no longer able to use sagemath on some of my older machines. A trivial reproducer is:

sage: GF(1009)['x'].gen()**17

which triggers a SIGILL (see also cado-nfs issue #30126, where I give more details)

Those machines happen to miss the adx CPU feature (adcx and addx CPU insns). It so happens that the build of the sagemath/sagemath:10.7 docker image did indeed include these instructions, so chaos is pretty much unavoidable. Such wasn't the case with 10.6:

localhost ~ $ docker run sagemath/sagemath:10.6 grep -i adx /home/sage/sage/local/include/flint/flint-config.h
/* Define if system has the ADX instruction set */
/* #undef FLINT_HAVE_ADX */
localhost ~ $ docker run sagemath/sagemath:10.7 grep -i adx /home/sage/sage/local/include/flint/flint-config.h
/* Define if x86_64 ADX assembly is available */
#define FLINT_HAVE_ASSEMBLY_x86_64_adx 1

I see that similar problems have appeared in the past, see e.g. sagemath issue #33863. So maybe it's this same old story that SAGE_FAT_BINARY doesn't really work, and we all depend on the specifics of the builder machine.

Does anyone know what exactly has changed between 10.6 and 10.7 that could explain this regression?

Do I have any option beyond building from source on these 10+-year-old machines?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions