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

sage.rings.finite_rings.element_givaro: Remove dependency on NTL #29910

Closed
mkoeppe opened this issue Jun 20, 2020 · 9 comments
Closed

sage.rings.finite_rings.element_givaro: Remove dependency on NTL #29910

mkoeppe opened this issue Jun 20, 2020 · 9 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 20, 2020

All dependencies on NTL seem to have been removed from this Cython module already.

In this ticket, we remove ntl from the list of includes and libraries to link.

Depends on #29786

CC: @kiwifb @fchapoton @videlec @ClementPernet

Component: finite rings

Author: Matthias Koeppe

Branch/Commit: 21f8162

Reviewer: François Bissey

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jun 20, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2020

Dependencies: #29786

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2020

Commit: 21f8162

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2020

comment:3

The branch consists of 1 commit on top of #29786


New commits:

aa75810src/module_list.py: Move options for most Extensions in sage.rings to distutils directives
43a9b16src/sage/misc/sageinspect.py: Fix up doctest that depends on a modified source file
a5bc828src/sage/misc/sageinspect.py: Fixup fixup
1baaa68src/sage/misc/sageinspect.py: Remove unused import
da75dc2Merge branch 't/29786/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_4__sage_rings_' into t/29910/sage_rings_finite_rings_element_givaro__remove_dependency_on_ntl
21f8162sage.rings.finite_rings.element_givaro: Remove dependency on NTL

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2020

Author: Matthias Koeppe

@kiwifb
Copy link
Member

kiwifb commented Jun 20, 2020

Reviewer: François Bissey

@kiwifb
Copy link
Member

kiwifb commented Jun 20, 2020

comment:5

Sounds fair to me. In gentoo we apply --as-needed at linking time to remove libraries not directly used.

 readelf -d /usr/lib/python3.7/site-packages/sage/rings/finite_rings/element_givaro.cpython-37m-x86_64-linux-gnu.so 

Dynamic section at offset 0x4db78 contains 30 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libgivaro.so.9]
 0x0000000000000001 (NEEDED)             Shared library: [libpari-gmp.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgmp.so.10]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libpython3.7m.so.1.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0xd000

no libntl in there, not even in ldd -r of the same object

ldd -r /usr/lib/python3.7/site-packages/sage/rings/finite_rings/element_givaro.cpython-37m-x86_64-linux-gnu.so 
	linux-vdso.so.1 (0x00007ffe86f86000)
	libgivaro.so.9 => /usr/lib64/libgivaro.so.9 (0x00007f6c5ff7e000)
	libpari-gmp.so.6 => /usr/lib64/libpari-gmp.so.6 (0x00007f6c5f711000)
	libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f6c5f698000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/libstdc++.so.6 (0x00007f6c5f42d000)
	libpython3.7m.so.1.0 => /usr/lib64/libpython3.7m.so.1.0 (0x00007f6c5f12c000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/libgcc_s.so.1 (0x00007f6c5f112000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f6c5ef57000)
	libgmpxx.so.4 => /usr/lib64/libgmpxx.so.4 (0x00007f6c5ef4e000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f6c5ee18000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f6c5ee13000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f6c6006f000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6c5edf3000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007f6c5edee000)

The commit looks good to me.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 20, 2020

comment:6

Thanks!

@vbraun
Copy link
Member

vbraun commented Jul 8, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants