[PySide] pyside build using pyenv-installed local Python fails, using system-installed Shiboken2 config/cmake file ?

PGNet Dev pgnet.dev at gmail.com
Thu Feb 27 17:02:25 CET 2020


On 2/27/20 2:29 AM, Cristián Maureira-Fredes wrote:
> for example look at what the folks at Arch do:

at 1st glance, they _do_ still presume their distro-installed python

> Mind sharing how did you build/install shiboken?
> zypper?

nope, not zypper. it presumes system-installed python, and does not play nicely with my current pyenv-installed python, and this local build attempt of pyside

here's what i'm doing so far:

install local, non-distro python

	pyenv install -v 3.8-dev
	pyenv global 3.8-dev
	pyenv global
		3.8-dev
	pyenv versions
		  system
		* 3.8-dev (set by /usr/local/pyenv/version)
	python -V
		Python 3.8.2+

	python -c "import sys; print('\n'.join(sys.path))"
		/usr/local/pyenv/versions/3.8-dev/lib/python38.zip
		/usr/local/pyenv/versions/3.8-dev/lib/python3.8
		/usr/local/pyenv/versions/3.8-dev/lib/python3.8/lib-dynload
		/usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages

get pyside source

	git clone https://code.qt.io/pyside/pyside-setup
	cd pyside-setup

check/match installed qt ver

	rpm -qa libqt5-qtbase-common-devel
		libqt5-qtbase-common-devel-5.14.1-lp151.1.1.x86_64

	git branch --track 5.14.1 origin/5.14.1
	git checkout 5.14.1

fix bad /lib assumption (borrowing distro's lib64 patch, @ https://build.opensuse.org/package/show/KDE:Qt5/python3-pyside2),

	curl \
	 -u 'user':'pass' \
	 --output /usr/local/src/pyside2-lib64.patch \
	 -X GET https://api.opensuse.org/source/KDE:Qt5/python3-pyside2/lib64.patch

	patch -p1 < /usr/local/src/pyside2-lib64.patch

to avoid eventual FAIL of

	make install
		FAIL
			...
			-- Installing: /usr/local/share/PySide2/typesystems/typesystem_3dextras.xml
			CMake Error at sources/pyside2-tools/cmake_install.cmake:41 (file):
			  file INSTALL cannot find "/usr/bin/uic": No such file or directory.
			Call Stack (most recent call first):
			  cmake_install.cmake:44 (include)

since

	which uic rcc
		/usr/lib64/qt5/bin/uic
		/usr/lib64/qt5/bin/rcc
	rpm -q --whatprovides `which uic rcc`
		libqt5-qtbase-common-devel-5.14.1-lp151.1.1.x86_64
		libqt5-qtbase-common-devel-5.14.1-lp151.1.1.x86_64

fix

	F="/usr/local/src/pyside-setup/sources/pyside2-tools/CMakeLists.txt"
	grep "set(TOOLS_PATH" ${F}
		set(TOOLS_PATH "${_qt5Core_install_prefix}/bin")

	perl -pi -e 's|^(set\(TOOLS_PATH ).*|${1}"/usr/lib64/qt5/bin")|g' ${F}
	grep "set(TOOLS_PATH" ${F}
		set(TOOLS_PATH "/usr/lib64/qt5/bin")

config,
manually spec'ing paths to pyenv-installed python headers/lib,
& paths to Shiboken & Pyside cmake files

	mkdir -p build
	cd       build
	cmake \
	 -DCMAKE_SKIP_INSTALL_RPATH=0 \
	 -DCMAKE_SKIP_RPATH=0 \
	 -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=1 \
	 -DPYTHON_EXECUTABLE=/usr/local/pyenv/shims/python3 \
	 -DPYTHON_INCLUDE_DIR=/usr/local/pyenv/versions/3.8-dev/include/python3.8 \
	 -DPYTHON_LIBRARY=/usr/local/pyenv/versions/3.8-dev/lib/libpython3.8.so \
	 -DShiboken2_DIR=/usr/local/pyside-setup/sources/shiboken2/data \
	 -DPySide2_DIR=/usr/local/pyside-setup/sources/pyside2/libpyside \
	..


build

	make V=1 -j8
	make install

completes with no errors,

	ls -altr /usr/local/bin/{shiboken,pyside,uic,rcc,designer}*
		-rwxr-xr-x 1 root root 588K Jan 28 10:54 /usr/local/bin/uic*
		-rwxr-xr-x 1 root root 796K Jan 28 10:54 /usr/local/bin/rcc*
		-rwxr-xr-x 1 root root 480K Jan 28 13:56 /usr/local/bin/designer*
		-rwxr-xr-x 1 root root 2.3K Feb 26 08:54 /usr/local/bin/shiboken_tool.py*
		-rwxr-xr-x 1 root root 3.2K Feb 26 08:55 /usr/local/bin/pyside_tool.py*
		-rwxr-xr-x 1 root root 372K Feb 27 07:25 /usr/local/bin/pyside2-lupdate*
		-rwxr-xr-x 1 root root 2.2M Feb 27 07:26 /usr/local/bin/shiboken2*

not sure I like the 'global' /usr/local/bin install location for those^ ... need to spec a CMAKE install prefix? use a python venv?

checking shiboken

	shiboken2 --version
		shiboken v5.14.1
		Copyright (C) 2016 The Qt Company Ltd.

in

	ldd /usr/local/bin/shiboken2

there are no UNDEFs, but a lot of 'odd' relative paths (/usr/lib64/../lib64/../lib64/../lib64/../lib64/ etc)

        linux-vdso.so.1 (0x00007ffc97da9000)
        libclang.so.7 => /usr/lib64/libclang.so.7 (0x00007f15574e2000)
        libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007f1556da5000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f1556a3d000)
        libQt5Xml.so.5 => /usr/lib64/libQt5Xml.so.5 (0x00007f1556800000)
        libQt5XmlPatterns.so.5 => /usr/lib64/libQt5XmlPatterns.so.5 (0x00007f1556254000)
        libQt5Network.so.5 => /usr/lib64/libQt5Network.so.5 (0x00007f1555ea3000)
        libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007f1555731000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f1555350000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f1555018000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1554e00000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f1554a46000)
        libclangAST.so.7 => /usr/lib64/../lib64/libclangAST.so.7 (0x00007f15546cd000)
        libclangBasic.so.7 => /usr/lib64/../lib64/libclangBasic.so.7 (0x00007f15543d4000)
        libclangFrontend.so.7 => /usr/lib64/../lib64/libclangFrontend.so.7 (0x00007f1554288000)
        libclangIndex.so.7 => /usr/lib64/../lib64/libclangIndex.so.7 (0x00007f155749e000)
        libclangLex.so.7 => /usr/lib64/../lib64/libclangLex.so.7 (0x00007f15573ef000)
        libclangSema.so.7 => /usr/lib64/../lib64/libclangSema.so.7 (0x00007f1553b48000)
        libclangTooling.so.7 => /usr/lib64/../lib64/libclangTooling.so.7 (0x00007f1553b03000)
        libclangARCMigrate.so.7 => /usr/lib64/../lib64/libclangARCMigrate.so.7 (0x00007f1553915000)
        libclangTidyPlugin.so.7 => /usr/lib64/../lib64/libclangTidyPlugin.so.7 (0x00007f15573e6000)
        libclangIncludeFixerPlugin.so.7 => /usr/lib64/../lib64/libclangIncludeFixerPlugin.so.7 (0x00007f15573db000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f1553711000)
        libLLVM.so.7 => /usr/lib64/../lib64/libLLVM.so.7 (0x00007f154fd0a000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f154faf3000)
        liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f154f8b9000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f154f69b000)
        libproxy.so.1 => /usr/lib64/libproxy.so.1 (0x00007f154f47d000)
        libssl.so.1.1 => /usr/lib64/libssl.so.1.1 (0x00007f154f211000)
        libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1 (0x00007f154ed7f000)
        libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007f154eaea000)
        libdouble-conversion.so.1 => /usr/lib64/libdouble-conversion.so.1 (0x00007f154e8d9000)
        libicui18n.so.60.2 => /usr/lib64/libicui18n.so.60.2 (0x00007f154e424000)
        libicuuc.so.60.2 => /usr/lib64/libicuuc.so.60.2 (0x00007f154e065000)
        libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007f154ddbb000)
        libzstd.so.1 => /usr/lib64/libzstd.so.1 (0x00007f154db13000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f154d7ec000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f15573ac000)
        libclangDriver.so.7 => /usr/lib64/../lib64/../lib64/libclangDriver.so.7 (0x00007f154d64c000)
        libclangEdit.so.7 => /usr/lib64/../lib64/../lib64/libclangEdit.so.7 (0x00007f154d63d000)
        libclangParse.so.7 => /usr/lib64/../lib64/../lib64/libclangParse.so.7 (0x00007f154d550000)
        libclangSerialization.so.7 => /usr/lib64/../lib64/../lib64/libclangSerialization.so.7 (0x00007f154d398000)
        libclangFormat.so.7 => /usr/lib64/../lib64/../lib64/libclangFormat.so.7 (0x00007f154d31f000)
        libclangToolingCore.so.7 => /usr/lib64/../lib64/../lib64/libclangToolingCore.so.7 (0x00007f154d30d000)
        libclangAnalysis.so.7 => /usr/lib64/../lib64/../lib64/libclangAnalysis.so.7 (0x00007f154d276000)
        libclangASTMatchers.so.7 => /usr/lib64/../lib64/../lib64/libclangASTMatchers.so.7 (0x00007f154d229000)
        libclangRewrite.so.7 => /usr/lib64/../lib64/../lib64/libclangRewrite.so.7 (0x00007f154d21a000)
        libclangStaticAnalyzerCheckers.so.7 => /usr/lib64/../lib64/../lib64/libclangStaticAnalyzerCheckers.so.7 (0x00007f154cfd0000)
        libclangTidy.so.7 => /usr/lib64/../lib64/../lib64/libclangTidy.so.7 (0x00007f154cf98000)
        libclangTidyAbseilModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyAbseilModule.so.7 (0x00007f154cf87000)
        libclangTidyAndroidModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyAndroidModule.so.7 (0x00007f154cf68000)
        libclangTidyBoostModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyBoostModule.so.7 (0x00007f154cf59000)
        libclangTidyCERTModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyCERTModule.so.7 (0x00007f154cf29000)
        libclangTidyCppCoreGuidelinesModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyCppCoreGuidelinesModule.so.7 (0x00007f154ceb3000)
        libclangTidyFuchsiaModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyFuchsiaModule.so.7 (0x00007f154ce99000)
        libclangTidyGoogleModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyGoogleModule.so.7 (0x00007f154ce61000)
        libclangTidyHICPPModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyHICPPModule.so.7 (0x00007f154ce3d000)
        libclangTidyLLVMModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyLLVMModule.so.7 (0x00007f154ce2e000)
        libclangTidyMiscModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyMiscModule.so.7 (0x00007f154cd8a000)
        libclangTidyModernizeModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyModernizeModule.so.7 (0x00007f154cb7d000)
        libclangTidyMPIModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyMPIModule.so.7 (0x00007f154cb6d000)
        libclangTidyObjCModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyObjCModule.so.7 (0x00007f154cb5b000)
        libclangTidyPerformanceModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyPerformanceModule.so.7 (0x00007f154caf1000)
        libclangTidyPortabilityModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyPortabilityModule.so.7 (0x00007f154cae6000)
        libclangTidyReadabilityModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyReadabilityModule.so.7 (0x00007f154c9ee000)
        libclangTidyZirconModule.so.7 => /usr/lib64/../lib64/../lib64/libclangTidyZirconModule.so.7 (0x00007f154c9e4000)
        libclangIncludeFixer.so.7 => /usr/lib64/../lib64/../lib64/libclangIncludeFixer.so.7 (0x00007f154c9c3000)
        libedit.so.0 => /usr/lib64/../lib64/../lib64/libedit.so.0 (0x00007f154c78b000)
        libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f154c55d000)
        libmodman.so.1 => /usr/lib64/libmodman.so.1 (0x00007f154c355000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f154c12c000)
        libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f154bf25000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f154bd1d000)
        liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007f154bafd000)
        libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007f154b7df000)
        libicudata.so.60.2 => /usr/lib64/libicudata.so.60.2 (0x00007f154b5de000)
        libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f154b351000)
        libclangToolingInclusions.so.7 => /usr/lib64/../lib64/../lib64/../lib64/libclangToolingInclusions.so.7 (0x00007f154b343000)
        libclangStaticAnalyzerCore.so.7 => /usr/lib64/../lib64/../lib64/../lib64/libclangStaticAnalyzerCore.so.7 (0x00007f154b1e6000)
        libclangStaticAnalyzerFrontend.so.7 => /usr/lib64/../lib64/../lib64/../lib64/libclangStaticAnalyzerFrontend.so.7 (0x00007f154b1b1000)
        libclangTidyUtils.so.7 => /usr/lib64/../lib64/../lib64/../lib64/libclangTidyUtils.so.7 (0x00007f154b158000)
        libclangTidyBugproneModule.so.7 => /usr/lib64/../lib64/../lib64/../lib64/libclangTidyBugproneModule.so.7 (0x00007f154b05a000)
        libfindAllSymbols.so.7 => /usr/lib64/../lib64/../lib64/../lib64/libfindAllSymbols.so.7 (0x00007f154b025000)
        libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007f154ae04000)
        libclangCrossTU.so.7 => /usr/lib64/../lib64/../lib64/../lib64/../lib64/libclangCrossTU.so.7 (0x00007f154adf8000)

not sure, yet, why that's occurring ... or if it's a problem


More information about the PySide mailing list