Hi Volker,

On 2016-08-07, Volker Braun <vbraun.n...@gmail.com> wrote:
> On Sunday, August 7, 2016 at 3:04:18 PM UTC+2, Simon King wrote:
>>
>> OK, then I'll open a ticket to let the meataxe package provide a shared 
>> library. My to-be-newstylified cohomology package relies on C library 
>> that is created with -lmtx. 
>
>
> That would work, but its probably a better design to only have 
> sage.libs.meataxe provide a Python/Cython wrapper and be the only one to 
> link against libmtx; Your cohomology package would then only use it 
> via sage.libs.meataxe.

My cohomology package relies on another C library - I am upstream and will
call it "modres", as it computes resolutions of modular group algebras
of p-groups.

Thus, the full story currently is:
- My cohomology code (Python/Cython) cimports from sage.libs.modres,
  sage.libs.meataxe and sage.matrix.matrix_gfpn_dense.
  I build all these extension modules with
       libraries = ['mtx', 'modres']
  in module_list.py. Is that a mistake, i.e., can I drop mtx from the
  list?
- sage.matrix.matrix_gfpn_dense cimports from sage.libs.modres
- sage.libs.meataxe is a pxd file wrapping meataxe.h
- sage.libs.modres is a pxd file cimporting from sage.libs.meataxe and
  wrapping the headers of libmodres.
- modres is a C library libmodres plus some executables, all linked against
  libmtx
- meataxe is a static (by upstream's choice) C library libmtx plus some
  executables linked with -lmtx. In the executables, the correct value
  of MtxLibDir is determined by an environment variable. I am patching
  meataxe anyway and wouldn't mind to add another patch.

>From your and Leif's hints, I see the following ways out:
1. Drop upstream's choice and build libmtx as a shared library.
2. Keep libmtx static, but add a function to meataxe that allows to
   define MtxLibDir, and use that function separately in all modules
   that are built with -lmtx.

Is there a third way? Is one of them clearly better?

Best regards,
Simon

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to