Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925479 - dev-python/shiboken6-6.6.2 fails to compile: pep384impl.h:53:16: error: type struct _typeobject violates the C++ One Definition Rule [-Werror=odr]
Summary: dev-python/shiboken6-6.6.2 fails to compile: pep384impl.h:53:16: error: type ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Ammerlaan
URL: https://bugreports.qt.io/browse/PYSID...
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-02-25 08:26 UTC by Agostino Sarubbo
Modified: 2024-03-03 07:28 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,175.69 KB, text/plain)
2024-02-25 08:26 UTC, Agostino Sarubbo
Details

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

Issue: dev-python/shiboken6-6.6.2 fails to compile.
Discovered on: amd64 (internal ref: lto_tinderbox)
System: LTO-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#LTO)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-25 08:26:51 UTC
Created attachment 885939 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-02-25 08:26:53 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: libshiboken/libshiboken6-python3.10.so.6.6.2 
/var/tmp/portage/dev-python/shiboken6-6.6.2/work/pyside-setup-everywhere-src-6.6.2/sources/shiboken6/libshiboken/pep384impl.h:53:16: error: type ‘struct _typeobject’ violates the C++ One Definition Rule [-Werror=odr]
Comment 3 Eli Schwartz 2024-02-28 21:49:14 UTC
Reproduced, reported upstream.
Comment 4 Larry the Git Cow gentoo-dev 2024-02-28 22:57:14 UTC
The bug has been closed via the following commit(s):

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

commit d76a2cff990028e249d92d195f002174df3f58d3
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-02-28 21:48:25 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-28 22:57:01 +0000

    dev-python/shiboken6: mark as LTO-unsafe
    
    Closes: https://bugs.gentoo.org/925479
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/shiboken6/shiboken6-6.6.2.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 5 Larry the Git Cow gentoo-dev 2024-03-03 04:00:56 UTC
The bug has been referenced in the following commit(s):

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

commit b6bfb7ce52d2f05ed2deda2aa94bf46e51d56844
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-03-01 07:43:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-03 04:00:12 +0000

    dev-python/shiboken6: disable terrible default of forcing limited API
    
    The python Limited API allows you to compile a native extension once for
    e.g. python 3.8, create a wheel package, and then install that on any
    version of python 3.8+. This is inherently non-useful to distros, which
    compile the extensions for each build regardless.
    
    The Limited API is slower than the internal API, and benefits nothing at
    all for our use case. But shiboken defaults to creating one. Manually
    pass the option to disable it.
    
    The Limited API builds of shiboken also have LTO issues that the regular
    builds do not. Odd. See comments at https://bugreports.qt.io/browse/PYSIDE-2619
    
    (Note that there are other LTO issues with shiboken which are fixed in
    git dev, so we can't remove filter-lto yet.)
    
    Bug: https://bugs.gentoo.org/925479
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../shiboken6/{shiboken6-6.6.2.ebuild => shiboken6-6.6.2-r1.ebuild}      | 1 +
 1 file changed, 1 insertion(+)
Comment 6 Andrew Ammerlaan gentoo-dev 2024-03-03 07:14:06 UTC
@Eli Thanks for digging into this one. Do you know if we need a similar fix for shiboken2? What about pyside{2,6}{,-tools}, they share the same codebase, do they also need this extra cmake arg?
Comment 7 Eli Schwartz 2024-03-03 07:28:34 UTC
I haven't looked at shiboken2 at all.

For pyside6, I was slightly confused as it appears to choose the Limited API based on whether shiboken6 was built with the Limited API. This does not seem very granular to me but for our use cases it is good enough to always build with the regular API, we don't need to build Limited API wheels.

(I actually did poke around a little bit with pyside6 and couldn't find an immediately obvious way to make it build a Limited API version after I rebuilt shiboken6. Weird.)