Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 871921 - sci-libs/symengine: Add ~ppc64 keyword
Summary: sci-libs/symengine: Add ~ppc64 keyword
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: PPC64 Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords: CC-ARCHES, KEYWORDREQ
Depends on:
Blocks: 892183
  Show dependency tree
 
Reported: 2022-09-19 19:21 UTC by Chris Kerr
Modified: 2023-01-27 06:19 UTC (History)
5 users (show)

See Also:
Package list:
sci-libs/symengine ppc64 dev-libs/cereal ppc64 sci-mathematics/arb ppc64 sci-mathematics/gmp-ecm ppc64 sci-mathematics/flint ppc64 dev-libs/ntl ppc64 dev-libs/gf2x ppc64
Runtime testing required: ---
nattka: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Kerr 2022-09-19 19:21:23 UTC
The optional dependency sci-mathematics/gmp-ecm includes x86 assembly and therefore cannot be built on ppc64. Adding `sci-libs/symengine ecm` to `profiles/arch/powerpc/package.use.mask` will disable the use flag for this dependency.

I built sci-libs/symengine and all dependencies (excluding sci-mathematics/gmp-ecm) with FEATURES=test.

Reproducible: Always
Comment 1 Chris Kerr 2022-09-19 19:23:59 UTC
N.B. I don't know much about the symengine package itself - I am doing this as a stepping stone towards keywording dev-python/sympy for ppc64.
Comment 2 NATTkA bot gentoo-dev 2022-09-19 19:28:16 UTC Comment hidden (obsolete)
Comment 3 Chris Kerr 2022-09-20 08:31:39 UTC
I also found that, when sci-libs/symengine is compiled with USE=tcmalloc, then the tests for dev-python/symengine fail, whereas they pass when tcmalloc is not being used.

Further investigation shows that the problem comes from importing symengine and scipy.fft at the same time

/var/tmp/portage/dev-python/symengine-0.9.2-r1/work/symengine.py-0.9.2-python3_10 # ./install/usr/bin/python
Python 3.10.6 (main, Aug 14 2022, 19:50:55) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import symengine
>>> import scipy
>>> import scipy.fft
src/tcmalloc.cc:333] Attempt to free invalid pointer 0x1197b73f0 
Aborted (core dumped)


So we should also add tcmalloc to package.use.mask
Comment 4 NATTkA bot gentoo-dev 2022-09-22 07:48:19 UTC Comment hidden (obsolete)
Comment 5 NATTkA bot gentoo-dev 2022-10-13 22:20:29 UTC Comment hidden (obsolete)
Comment 6 Larry the Git Cow gentoo-dev 2022-10-13 22:30:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3722148932b514097e195b8794cc8cdc366a8a0

commit e3722148932b514097e195b8794cc8cdc366a8a0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-13 22:30:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-13 22:30:14 +0000

    profiles/arch/powerpc/ppc64: mask symengine[tcmalloc]
    
    Quoting Chris in the bug:
    ```
    /var/tmp/portage/dev-python/symengine-0.9.2-r1/work/symengine.py-0.9.2-python3_10 # ./install/usr/bin/python
    Python 3.10.6 (main, Aug 14 2022, 19:50:55) [GCC 11.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import symengine
    >>> import scipy
    >>> import scipy.fft
    src/tcmalloc.cc:333] Attempt to free invalid pointer 0x1197b73f0
    Aborted (core dumped)
    ```
    
    Bug: https://bugs.gentoo.org/871921
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/powerpc/ppc64/package.use.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 7 Chris Kerr 2022-10-14 16:02:04 UTC
(In reply to Chris Kerr from comment #0)
> The optional dependency sci-mathematics/gmp-ecm includes x86 assembly and
> therefore cannot be built on ppc64. Adding `sci-libs/symengine ecm` to
> `profiles/arch/powerpc/package.use.mask` will disable the use flag for this
> dependency.

This seems to have been forgotten as the gmp-ecm optional dependency was added to the package list. I have removed it again. Please add the relevant entry to package.use.mask so that the nattka check will pass.
Comment 8 NATTkA bot gentoo-dev 2022-10-14 16:04:21 UTC Comment hidden (obsolete)
Comment 9 Joonas Niilola gentoo-dev 2022-10-15 06:36:55 UTC
profiles/arch/powerpc/package.use.mask or profiles/arch/powerpc/ppc64/package.use.mask?
Comment 10 Chris Kerr 2022-10-15 13:52:47 UTC
(In reply to Joonas Niilola from comment #9)
> profiles/arch/powerpc/package.use.mask or
> profiles/arch/powerpc/ppc64/package.use.mask?

profiles/arch/powerpc/package.use.mask (or alternatively, if there is a way to do that, mask for all arches and unmask for x86 and amd64 only).
Comment 11 Chris Kerr 2022-10-15 14:02:41 UTC
(In reply to Chris Kerr from comment #10)

> or alternatively, if there is a way to do that, mask for all arches and unmask for x86 and amd64 only).

I looked into it in more detail. https://packages.gentoo.org/packages/sci-mathematics/gmp-ecm shows that several non-x86 architectures are supported. I then followed the link to the upstream and it has "powerpc32" and "powerpc64" directories. So the x86 assembly build errors I saw when compiling the sci-mathematics/gmp-ecm ebuild are probably a problem with the build script rather than that package being inherently incompatible with ppc64.

I will try building again and see if I can modify the sci-mathematics/gmp-ecm ebuild to get it working on ppc64.
Comment 12 NATTkA bot gentoo-dev 2022-10-16 04:12:25 UTC Comment hidden (obsolete)
Comment 13 Chris Kerr 2022-10-16 04:41:36 UTC
(In reply to Chris Kerr from comment #11)
> 
> I will try building again and see if I can modify the
> sci-mathematics/gmp-ecm ebuild to get it working on ppc64.

The fix was simpler than I thought - simply disable the "custom-tune" USE flag (which is on by default).

So please add `sci-mathematics/gmp-ecm custom-tune` to `profiles/arch/powerpc/package.use.mask` and forget what I said earlier about masking the ecm USE flag on symengine.
Comment 14 Chris Kerr 2022-10-16 04:58:41 UTC
(In reply to Chris Kerr from comment #13)

> 
> So please add `sci-mathematics/gmp-ecm custom-tune` to
> `profiles/arch/powerpc/package.use.mask` 

Make that profiles/arch/powerpc/ppc64/64le/package.use.mask as I suspect that the problem is that I am using ppc64le but the custom tuned assembly is for big-endian ppc64.
Comment 16 Chris Kerr 2022-11-13 14:31:01 UTC
(In reply to Joonas Niilola from comment #15)
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=5bdf7768de4b59c0d93eb49e7d0f65a948820949

Thank you Joonas. Now all the blockers to keywording this package have been fixed so we can go ahead and add the keyword.
Comment 17 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-11-18 17:29:19 UTC
ppc64 done

all arches done