Confused about ARB_LIBRARY

40 vistas
Ir al primer mensaje no leído

Marc Mezzarobba

no leída,
9 mar 2020, 10:00:48 a.m.9/3/20
para sage-...@googlegroups.com
Is it expected that ARB_LIBRARY is set to 'arb' (as opposed to
'flint-arb') on a Debian box where Sage links against the system
arb?

The linker complains about not finding -larb when I try to build
an external cython module that uses sage.rings.complex_arb. And
indeed, it should have looked for -lflint-arb:

~/co/sage:develop$ ldd /home/marc/co/sage/local/lib/python3.7/site-
packages/sage/rings/complex_arb.cpython-37m-x86_64-linux-gnu.so | grep arb
libflint-arb.so.2 => /lib/x86_64-linux-gnu/libflint-arb.so.2 (0x00007fbf0c11b000)

My setup.py calls cythonize(..., aliases=sage.env.cython_aliases().
I thought this should be enough to make it resolve the references to
ARB_LIBRARY in acb.pxd to the correct library. However,
cython_aliases() doesn't return what I'd expect:

~/co/sage:develop$ sage --nodotsage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.1.beta7, Release Date: 2020-03-08 │
│ Using Python 3.7.3. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: sage.env.cython_aliases()['ARB_LIBRARY']
'arb'

This is with yesterday's beta. I don't remember seeing this issue
before, but I may not have rebuilt this module with every release.

Am I doing something wrong, or is this a bug?

Thanks a lot,

--
Marc

Michael Orlitzky

no leída,
9 mar 2020, 12:26:41 p.m.9/3/20
para sage-...@googlegroups.com
On 3/9/20 10:00 AM, Marc Mezzarobba wrote:
> Is it expected that ARB_LIBRARY is set to 'arb' (as opposed to
> 'flint-arb') on a Debian box where Sage links against the system
> arb?

The "success" branch of the AC_CHECK_LIB([flint-arb],... call in arb's
spkg-configure.m4 looks off to me, because AC_CHECK_LIB (unlike
AC_SEARCH_LIBS) doesn't prepend -l<library> to LIBS if you provide a
non-empty success branch.

But, that doesn't explain why you're getting ARB_LIBRARY=arb. I would
expect that to be ARB_LIBRARY=flint-arb in any case. You might be able
to get more info by running ./configure again and looking for the arb
stuff in config.log.

Dima Pasechnik

no leída,
9 mar 2020, 12:58:12 p.m.9/3/20
para sage-devel,Matthias Koeppe
This appears to be a result of https://trac.sagemath.org/ticket/29052
Indeed, the rationale, wrong or not, is that the env. var. SAGE_ARB_LIBRARY
is only needed for building, not for running, Sage, and setting of
this variable has been therefore moved into
build/bin/sage-build-env-config(.in).

If you source build/bin/sage-build-env-config, i.e.

$ . build/bin/sage-build-env-config

then on Debian

$ ./sage -c "print(sage.env.cython_aliases()['ARB_LIBRARY'])"
flint-arb

as it should be.

Not sure whether anything should be fixed here.

Best
Dima
> --
> 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+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/47efdae1-9a51-2880-5bfe-e247d933cf25%40orlitzky.com.

Matthias Koeppe

no leída,
9 mar 2020, 1:18:36 p.m.9/3/20
para sage-devel
I have created #29305: Move ARB_LIBRARY back from sage-build-env-config to sage-env-config.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Matthias Koeppe

no leída,
9 mar 2020, 1:23:56 p.m.9/3/20
para sage-devel


On Monday, March 9, 2020 at 12:58:12 PM UTC-4, Dima Pasechnik wrote:
If you source build/bin/sage-build-env-config, i.e.

$ . build/bin/sage-build-env-config

then on Debian

$ ./sage -c "print(sage.env.cython_aliases()['ARB_LIBRARY'])"
flint-arb

as it should be.


sage-build-env-config is strictly for building sage. User packages should not try to use it.

 
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos