Skip to content

configure tests the wrong compiler #179

@mkoeppe

Description

@mkoeppe

Extension modules are built with the compiler configured in distutils/setuptools.
When setup.py calls the configure script, it should pass this compiler.

This will eliminate this error seen in https://github.com/sagemath/cysignals/actions/runs/6227465351/job/16902173349:

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether the compiler supports GNU C++... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C++11 features... none needed
[...]
checking for emms instruction... yes

 clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DCYTHON_CLINE_IN_TRACEBACK=0 -U_FORTIFY_SOURCE -Isrc/cysignals -Isrc -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c build/src/cysignals/signals.c -o build/temp.macosx-10.9-universal2-cpython-311/build/src/cysignals/signals.o -pthread
  In file included from build/src/cysignals/signals.c:1728:
  build/src/cysignals/implementation.c:539:13: warning: unused function 'print_enhanced_backtrace' [-Wunused-function]
  static void print_enhanced_backtrace(void)
              ^
  build/src/cysignals/implementation.c:123:9: error: unrecognized instruction mnemonic
      asm("emms");
          ^
  <inline asm>:1:2: note: instantiated into assembly here
          emms
          ^
  1 warning and 1 error generated.
  error: command '/usr/bin/clang' failed with exit code 1
  error: subprocess-exited-with-error
  
  Building wheel for cysignals (pyproject.toml): finished with status 'error'
  × Building wheel for cysignals (pyproject.toml) did not run successfully.
Failed to build cysignals
  │ exit code: 1
  ╰─> See above for output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions