Opened 9 months ago

Last modified 7 weeks ago

#32421 new enhancement

spkg-configure for symengine

Reported by: dimpase Owned by:
Priority: major Milestone: sage-9.7
Component: build: configure Keywords:
Cc: mjo, mkoeppe, isuruf, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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

Change History (12)

comment:1 Changed 9 months ago by dimpase

  • Cc mjo mkoeppe added

comment:2 Changed 9 months ago by dimpase

  • Cc isuruf added

comment:3 follow-up: Changed 9 months ago by 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. 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.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 9 months ago by 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...

comment:6 in reply to: ↑ 5 Changed 9 months ago by dimpase

comment:7 Changed 9 months ago by mjo

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.

comment:8 Changed 9 months ago by isuruf

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

comment:9 in reply to: ↑ 4 Changed 9 months ago by mkoeppe

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

comment:10 Changed 6 months ago by slelievre

  • Cc slelievre added

comment:11 Changed 5 months ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-9.6

comment:12 Changed 7 weeks ago by mkoeppe

  • Milestone changed from sage-9.6 to sage-9.7
Note: See TracTickets for help on using tickets.