FAILED: PySide2/QtSerialPort/CMakeFiles/QtSerialPort_pyi /var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2_build-python3_11/PySide2/QtSerialPort/CMakeFiles/QtSerialPort_pyi cd /var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2_build-python3_11/PySide2/QtSerialPort && /usr/bin/cmake -E env LD_LIBRARY_PATH=/var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2_build-python3_11/libpyside:/usr/lib64 /usr/bin/python3.11 /var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtSerialPort/../support/generate_pyi.py QtSerialPort --sys-path /var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2_build-python3_11 /usr/lib/python3.11/site-packages/shiboken2 Traceback (most recent call last): File "/var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtSerialPort/../support/generate_pyi.py", line 322, in <module> generate_all_pyi(outpath, options=options) File "/var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtSerialPort/../support/generate_pyi.py", line 299, in generate_all_pyi generate_pyi(import_name, outpath, options) File "/var/tmp/portage/dev-python/pyside2-5.15.10-r2/work/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtSerialPort/../support/generate_pyi.py", line 215, in generate_pyi top = __import__(import_name) ^^^^^^^^^^^^^^^^^^^^^^^ File "shibokensupport/feature.py", line 139, in _import ImportError: /usr/lib64/libudev.so.1: invalid ELF header
Created attachment 872326 [details] emerge --info
Created attachment 872327 [details] build log
> ImportError: /usr/lib64/libudev.so.1: invalid ELF header This looks like a problem with your udev installation. Which package is providing udev here? Can you try recompiling it?
(In reply to Andrew Ammerlaan from comment #3) > > ImportError: /usr/lib64/libudev.so.1: invalid ELF header > > This looks like a problem with your udev installation. Which package is > providing udev here? Can you try recompiling it? sys-apps/systemd-utils Compiled it yesterday, got the same error.
∞ cat /usr/lib64/libudev.so.1 /* GNU ld script Since Gentoo has critical dynamic libraries in /lib, and the static versions in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we run into linking problems. This "fake" dynamic lib is a linker script that redirects the linker to the real lib. And yes, this works in the cross- compiling scenario as the sysroot-ed linker will prepend the real path. See bug https://bugs.gentoo.org/4411 for more info. */ OUTPUT_FORMAT ( elf64-x86-64 ) GROUP ( /lib64/libudev.so.1 )
@systemd team, do you have any idea what is happening here and what we can do about it? I cannot reproduce this on my system with sys-apps/systemd, it seems to be specific to sys-apps/systemd-utils.
Can you force it to load /lib64/libudev.so.1 instead of /usr/lib64/libudev.so.1?
I suspect this has nothing to do with systemd vs systemd-utils. The difference is probably split-usr, where /usr/lib64/libudev.so.1 is a linker script instead of an ELF shared object. I have no idea how PySide2 works, so I'm not sure how/why it would try to load libudev.so.1 without using the runtime linker (ld.so).
Ah, I think the issue is the build system sets LD_LIBRARY_PATH=/usr/lib64. You can see that LD_LIBRARY_PATH setting in the command line from comment 0. That causes ld.so to load libraries directly from /usr/lib64 instead of consulting /etc/ld.so.cache.
I'm guessing the LD_LIBRARY_PATH setting comes from this cmake file. https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside2/cmake/Macros/PySideModules.cmake?h=v5.15.10-lts-lgpl#n165
(In reply to Mike Gilbert from comment #10) > I'm guessing the LD_LIBRARY_PATH setting comes from this cmake file. > > https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside2/cmake/ > Macros/PySideModules.cmake?h=v5.15.10-lts-lgpl#n165 The /usr/lib64 part of LD_LIBRARY_PATH is coming from the env: else() # Handles both macOS and Linux. set(env_value "$ENV{${ld_prefix_var_name}}") if(env_value) string(APPEND ld_prefix ":${env_value}") endif() endif() I can patch this code out, but maybe it makes more sense to find out what is putting this in the env in the first place.
Could you please put the previous, working version back in the tree? emerge fails to resolve the system upgrade (things like firefox and mpv) after failing to build pyside2 despite of --keep-going, and masking it just makes it refuse to update world altogether.
(In reply to Sergey 'L29Ah' Alirzaev from comment #12) > Could you please put the previous, working version back in the tree? emerge > fails to resolve the system upgrade (things like firefox and mpv) after > failing to build pyside2 despite of --keep-going, and masking it just makes > it refuse to update world altogether. This is not feasible since this requires re-adding all of the old Qt5 packages as well. Are you sure it is still broken in 5.15.11? If I look at the log it seems the latest version doesn't set LD_LIBRARY_PATH as aggressively as the previous version. If it is still broken you can try patching out this line in sources/pyside2/cmake/Macros/PySideModules.cmake: """ set(env_value "$ENV{${ld_prefix_var_name}}") """ I want to get rid of pyside2 as soon as possible anyway, it is unmaintained upstream and we have only a few reverse dependencies that are all well on their way to port to pyside6.
(In reply to Andrew Ammerlaan from comment #13) > This is not feasible since this requires re-adding all of the old Qt5 > packages as well. Are you sure it is still broken in 5.15.11? If I look at > the log it seems the latest version doesn't set LD_LIBRARY_PATH as > aggressively as the previous version. What packages? The installed pyside2 version (5.15.10::gentoo) seems to work with the current qt5 packages (at least, freecad runs). I upgrade world every night and it always fails. https://github.com/FreeCAD/FreeCAD/issues/6992 doesn't seem like freecad will migrate in the next half a year.
(In reply to Sergey 'L29Ah' Alirzaev from comment #14) > (In reply to Andrew Ammerlaan from comment #13) > > This is not feasible since this requires re-adding all of the old Qt5 > > packages as well. Are you sure it is still broken in 5.15.11? If I look at > > the log it seems the latest version doesn't set LD_LIBRARY_PATH as > > aggressively as the previous version. > > What packages? The installed pyside2 version (5.15.10::gentoo) seems to work > with the current qt5 packages (at least, freecad runs). This bug is reported against 5.15.10-r2, I think you'll have more luck with 5.15.11-r1. We don't have qt 5.15.10 in the tree any more at all.
(In reply to Andrew Ammerlaan from comment #15) > (In reply to Sergey 'L29Ah' Alirzaev from comment #14) > > (In reply to Andrew Ammerlaan from comment #13) > > > This is not feasible since this requires re-adding all of the old Qt5 > > > packages as well. Are you sure it is still broken in 5.15.11? If I look at > > > the log it seems the latest version doesn't set LD_LIBRARY_PATH as > > > aggressively as the previous version. > > > > What packages? The installed pyside2 version (5.15.10::gentoo) seems to work > > with the current qt5 packages (at least, freecad runs). > > This bug is reported against 5.15.10-r2, I think you'll have more luck with > 5.15.11-r1. We don't have qt 5.15.10 in the tree any more at all. I don't have qt 5.15.10 either, yet pyside2 5.15.10 works with the current qt5.
Can you try building 5.15.11-r1 as requested (unclear if you've tried it)? If it fails, please try the patch Andrew suggests.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=114a15884faf88f202073de48812613b264f49e0 commit 114a15884faf88f202073de48812613b264f49e0 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-01-02 04:04:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-05 04:10:37 +0000 2024-01-05-usr-initramfs: add news item Revival of commit a79dd69b0cca439bc0c483c9193c79e0554819d0. Bug: https://bugs.gentoo.org/868306#c10 Bug: https://bugs.gentoo.org/902829 Bug: https://bugs.gentoo.org/915379 Bug: https://bugs.gentoo.org/825078 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> .../2024-01-05-usr-initramfs.en.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1e27ebcaab82dea490ab48f29c269240c0b74ba commit b1e27ebcaab82dea490ab48f29c269240c0b74ba Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2024-03-09 07:40:02 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2024-03-09 07:40:48 +0000 profiles/package.deprecated: deprecate pyside2 and friends Bug: https://bugs.gentoo.org/864391 Bug: https://bugs.gentoo.org/920544 Bug: https://bugs.gentoo.org/915379 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> profiles/package.deprecated | 8 ++++++++ 1 file changed, 8 insertions(+)