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

Write custom create_extension() for Cython #22554

Closed
jdemeyer opened this issue Mar 9, 2017 · 20 comments
Closed

Write custom create_extension() for Cython #22554

jdemeyer opened this issue Mar 9, 2017 · 20 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Mar 9, 2017

Implement a custom create_extension() function for Cython. This new function does some things which were done in setup.py in different places, but now have one dedicated place. It should also fix the problem where -std=c99 is used for a C++ extension, which is an error for Clang. Also duplicate flags (like -msse -mmse) are removed.

This requires an upstream patch cython/cython#466

Upstream: Fixed upstream, but not in a stable release.

Component: build

Author: Jeroen Demeyer

Branch/Commit: 0c0c603

Reviewer: Dima Pasechnik

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

@jdemeyer jdemeyer added this to the sage-7.6 milestone Mar 9, 2017
@jdemeyer jdemeyer changed the title Use create_extension() from Cython Write custom create_extension() for Cython Mar 9, 2017
@jdemeyer
Copy link
Author

jdemeyer commented Mar 9, 2017

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Commit: 4446cb4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

4446cb4Write custom create_extension() for Cython

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Changed commit from 4446cb4 to 47452a3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

47452a3Write custom create_extension() for Cython

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f59e4e1Write custom create_extension() for Cython

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Changed commit from 47452a3 to f59e4e1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

0c0c603Write custom create_extension() for Cython

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 9, 2017

Changed commit from f59e4e1 to 0c0c603

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Mar 19, 2017

comment:11

I can't really comment on this patch, but I've successfully built sage with it on my Mac with homebrew (which provides gfortran, so the Sage gcc is not installed), using Apple's "gcc" (clang)

@jdemeyer
Copy link
Author

comment:12

Replying to @mkoeppe:

I can't really comment on this patch, but I've successfully built sage with it on my Mac with homebrew (which provides gfortran, so the Sage gcc is not installed), using Apple's "gcc" (clang)

Just to be clear: I assume you mean with SAGE_INSTALL_GCC=no, otherwise Sage will build and use GCC anyway.

@mkoeppe
Copy link
Member

mkoeppe commented Mar 19, 2017

comment:13

Turns out I used a different "feature" of the build system. I had configured using ./configure CC=gcc-6 CXX=g++-6 (they are from homebrew) and then configure was happy; but then the build just used /usr/bin/gcc anyway. (This bug is #22646.)

@jdemeyer
Copy link
Author

Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.

@dimpase
Copy link
Member

dimpase commented Mar 27, 2017

comment:15

What does "This requires an upstream patch" mean? That it should be applied to the upstream tarball?

(in fact one does not seem to need it to be applied to Sage, so this probably needs to be clarified in the ticket description)

@jdemeyer
Copy link
Author

comment:16

Replying to @dimpase:

What does "This requires an upstream patch" mean?

That the patch from the linked github pull request should be applied to the Cython sources. In this case, the patch is added as build/pkgs/cython/patches/create_extension.patch and the Cython version number is bumped to force rebuilding Cython with that patch.

@dimpase
Copy link
Member

dimpase commented Mar 27, 2017

Reviewer: Dima Pasechnik

@vbraun
Copy link
Member

vbraun commented Mar 29, 2017

Changed branch from u/jdemeyer/use_create_extension___from_cython to 0c0c603

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

4 participants