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

spkg-configure for symengine #32421

Closed
dimpase opened this issue Aug 25, 2021 · 7 comments · Fixed by #36677
Closed

spkg-configure for symengine #32421

dimpase opened this issue Aug 25, 2021 · 7 comments · Fixed by #36677

Comments

@dimpase
Copy link
Member

dimpase commented Aug 25, 2021

symengine does not seem to have pkg-configure interface, so we need to test something

CC: @orlitzky @mkoeppe @isuruf @slel

Component: build: configure

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

@dimpase dimpase added this to the sage-9.5 milestone Aug 25, 2021
@mkoeppe
Copy link
Member

mkoeppe commented Aug 27, 2021

comment:3

Note that the Python wrapper symengine.py uses CMake to find the library (via the CMake metadata installed in local/lib/cmake/symengine) - so that's what spkg-configure.m4 should use too. Of course, this assumes that system cmake is available; but I think it's fine to only use system symengine when also system cmake is present.

@dimpase
Copy link
Member Author

dimpase commented Aug 29, 2021

comment:4

Replying to @mkoeppe:

Note that the Python wrapper symengine.py uses CMake to find the library (via the CMake metadata installed in local/lib/cmake/symengine) - so that's what spkg-configure.m4 should use too.

This requires writing cmake config script, i.e. CMakeLists.txt, as far as I can see.
Integrating this into spkg-configure.m4 is above my pay grade...

@isuruf
Copy link
Member

isuruf commented Aug 29, 2021

@dimpase
Copy link
Member Author

dimpase commented Aug 29, 2021

comment:6

Replying to @isuruf:

See https://github.com/symengine/symengine/wiki/Using-SymEngine-from-a-Cpp-project#non-cmake-projects

and how about asking for the version?

@orlitzky
Copy link
Contributor

comment:7

If we need a specific feature in newer versions of symengine, we can test for that feature instead of the version. And if nobody knows what features we need... then as a last resort, we can accept any version of symengine, and any consequent bug reports will tell us what we should have checked for.

@isuruf
Copy link
Member

isuruf commented Aug 29, 2021

comment:8

There's a symengine_version() C function that you can call to get it.
Or you can use the following program to see if it compiles,

#include <symengine/symengine_config.h>
#if (SYMENGINE_MAJOR_VERSION*10000 + SYMENGINE_MINOR_VERSION*100 + SYMENGINE_PATCH_VERSION < 00700)
# error "SymEngine 0.7.0 or newer is required"
error
#endif

@mkoeppe
Copy link
Member

mkoeppe commented Aug 29, 2021

comment:9

Replying to @dimpase:

Replying to @mkoeppe:

Note that the Python wrapper symengine.py uses CMake to find the library (via the CMake metadata installed in local/lib/cmake/symengine) - so that's what spkg-configure.m4 should use too.

This requires writing cmake config script, i.e. CMakeLists.txt, as far as I can see.
Integrating this into spkg-configure.m4 is above my pay grade...

Just create a directory conftest.dir and generate the file in there

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 1, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe removed this from the sage-10.0 milestone Mar 16, 2023
vbraun pushed a commit to vbraun/sage that referenced this issue Dec 7, 2023
    
update symengine and symengine_py to the latest versions, support Cython
3

Also, provide spkg-configure for symengine and symengine_py. Closes
sagemath#32421

Promote symengine_py to optional
    
URL: sagemath#36677
Reported by: Dima Pasechnik
Reviewer(s): Dima Pasechnik, Isuru Fernando, Matthias Köppe, Tobias Diez
@vbraun vbraun closed this as completed in e37e94d Dec 10, 2023
@mkoeppe mkoeppe added this to the sage-10.3 milestone Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants