On 2025-04-20 14:26:12, Marc Culler wrote:
> However, I am not able to find any way to convince Sage's configure script 
> to use my python.  No matter what I try, it declares that there is no 
> suitable system python.

What does config.log say is the reason for rejection?

My first guess is that

  SAGE_SPKG_DEPCHECK([bzip2 liblzma libffi zlib], ...

is to blame. The "depcheck" macro tries to avoid library version
conflicts by ensuring spkg and system packages are not mixed and
matched. For example, if the bzip2 spkg is going to be used, we won't
use the system python because the system python is going to be linked
to a different copy of bzip2 (i.e. the system copy). If some other
sage package then links to both bzip2 and python, two copies of bzip2
could wind up loaded, and sage would crash.

IIRC you are building everything (except python, now) from SPKGs. If
so and if you are sure that your newly-built python was linked against
the sage copies of bzip2, zlib, etc., you can just ignore the DEPCHECK
(edit it out).


> Is this actually possible?  If so, what are the configure arguments needed 
> to make sage use a python installed in /x/y/z?
> (I.e. I want sage to build with python executable /x/y/z/bin/python3 and 
> python library located in /x/y/z/lib/python3.13).

Yes, in general there are a bunch of things you may need to
override/append to use a library in a nonstandard location:

  * -I for the headers at compile time
  * -L for the linker to find your libraries at link time
  * LD_LIBRARY_PATH / rpath to find the libraries at run time
  * PATH to find executables at run time
  * PKG_CONFIG_PATH because otherwise, even if you tweak the first
    four, pkg-config will say the dependency doesn't exist

Then for sage, you also have to pass the spkg-configure.m4 check, and
there are no rules for that except to read it.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/aAZSKVPCIixcfh7w%40mertle.

Reply via email to