Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927770 - dev-python/pplpy-0.8.10 fails tests: ImportError: congruence.cpython-310-x86_64-linux-gnu.so: undefined symbol: _Z6moduloRKN23Parma_Polyhedra_Library17Linear_ExpressionE10__gmp_exprIA1_12__mpz_structS5_E
Summary: dev-python/pplpy-0.8.10 fails tests: ImportError: congruence.cpython-310-x86_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Orlitzky
URL: https://github.com/python/cpython/iss...
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-03-25 08:09 UTC by Agostino Sarubbo
Modified: 2024-03-29 21:07 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,119.40 KB, text/plain)
2024-03-25 08:09 UTC, Agostino Sarubbo
Details
ebuild patch (file_927770.txt,320 bytes, patch)
2024-03-29 12:56 UTC, Yutao Yuan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-03-25 08:09:03 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/pplpy-0.8.10 fails tests.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0015
Comment 1 Agostino Sarubbo gentoo-dev 2024-03-25 08:09:05 UTC
Created attachment 888494 [details]
build.log

build log and emerge --info
Comment 2 Michael Orlitzky gentoo-dev 2024-03-25 23:33:36 UTC
Beats me. I don't suppose you changed C++ compilers or linkers or something like that in between merging gmp/ppl and pplpy? The -l flags are there when linking that file, so the symbol might just not be there?

2024-03-25 06:31:28,750 root INFO x86_64-pc-linux-gnu-g++ -shared -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -O2 -march=x86-64 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -UNDEBUG /var/tmp/portage/dev-python/pplpy-0.8.10/work/pplpy-0.8.10-python3_10/build/temp.linux-x86_64-cpython-310/ppl/congruence.o /var/tmp/portage/dev-python/pplpy-0.8.10/work/pplpy-0.8.10-python3_10/build/temp.linux-x86_64-cpython-310/ppl/ppl_shim.o
  -L/usr/lib64 -lgmp -lgmpxx -lppl -lm
  -o /var/tmp/portage/dev-python/pplpy-0.8.10/work/pplpy-0.8.10-python3_10/build/lib.linux-x86_64-cpython-310/ppl/congruence.cpython-310-x86_64-linux-gnu.so
Comment 3 Yutao Yuan 2024-03-29 12:52:49 UTC
I think I have identified the problem here. Short answer: this package needs -j1.

Long answer: this package contains multiple extension modules, and all of them need to compile ppl_shim.cc. In a parallel build, ppl_shim.o from a previous compilation may be overwritten by a later one, which seems to make the linker think the symbols does not exist. It can be verified that after src_compile, manually going into the build directory and rerunning the linker produces the correct result.

I am not certain why pplpy-0.8.9 is not affected. It seems that in 0.8.9 extensions are always built sequentially. Maybe it is related to upstream build system changes from 0.8.9 to 0.8.10 (it is the only changes between two versions).
Comment 4 Yutao Yuan 2024-03-29 12:56:59 UTC
Created attachment 889006 [details, diff]
ebuild patch
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-29 13:08:22 UTC
Oh, thanks.  The previous version had non-parallel build forced with ambiguous comment, and since I couldn't reproduce with heavily parallel build myself, I've removed it.  I'm going to add it back.
Comment 6 Larry the Git Cow gentoo-dev 2024-03-29 13:09:00 UTC
The bug has been closed via the following commit(s):

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

commit a8dd5d7835e571c7b96406469a176557d118981c
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-03-29 13:08:24 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-03-29 13:08:24 +0000

    dev-python/pplpy: Force serial build again
    
    Closes: https://bugs.gentoo.org/927770
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pplpy/pplpy-0.8.10.ebuild | 5 +++++
 1 file changed, 5 insertions(+)
Comment 7 Michael Orlitzky gentoo-dev 2024-03-29 21:07:38 UTC
The useless comment was me, sorry. Thanks for debugging the issue Yutao. Now that we know what the problem is, I see that somebody named mgorny reported the problem upstream already in 2021 at $URL.