Bug 13149 - Wrong sip_module_dir in sip3 recipe
Summary: Wrong sip_module_dir in sip3 recipe
Status: RESOLVED INVALID
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: Other Multiple
: Undecided normal
Target Milestone: ---
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-01-24 11:32 UTC by Kirill Goncharov
Modified: 2019-01-24 17:33 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Goncharov 2019-01-24 11:32:14 UTC
I'm building an image with PyQt5 installed for RaspberryPi 3.
On the target machine I get import error:

root@raspberrypi3:~# python3
Python 3.5.6 (default, Jan 23 2019, 13:02:59) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt5'

This caused by the fact that PyQt5 is installed to /usr/lib/python3.5m/site-packages/ when all other python packages are in /usr/lib/python3.5/site-packages/ (without 'm' suffix) and it could be fixed by setting the proper path in pyqt.cfg:

pyqt_module_dir = ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages

instead of

pyqt_module_dir = ${D}/${libdir}/python${PYTHON_BASEVERSION}${PYTHON_ABI}/site-packages

(python3-pyqt5 recipe: https://github.com/meta-qt5/meta-qt5/blob/thud/recipes-python/pyqt5/python3-pyqt5_5.11.3.bb)

Similar problem exists in sip3 recipe, I get "ImportError: No module named 'PyQt5.sip'". It could be fixed by the following change in do_configure:

sip_module_dir = ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages

instead of

sip_module_dir = ${D}/${libdir}/python${PYTHON_BASEVERSION}${PYTHON_ABI}/site-packages

Is there a bug or I'm misundestanding something?

Layers used:
meta-oe thud:6094ae18c8a35e5cc9998ac39869390d7f3bb1e2
meta-qt5 thud:201fcf27cf07d60b7d6ab89c7dcefe2190217745
Comment 1 Randy MacLeod 2019-01-24 17:11:23 UTC
Thanks for reporting the bug.
Unfortunately, problems with PyQt5 aren't tracked on the Yocto bugzilla so I'm closing this defect.

Please open an issue on:
   https://github.com/meta-qt5/meta-qt5/issues
Comment 2 Kirill Goncharov 2019-01-24 17:19:45 UTC
Yes, I'm going to report to meta-qt5 as well.

But I suspect there is a bug in sip3 recipe too, which belongs to meta-oe layer.
Comment 3 Randy MacLeod 2019-01-24 17:33:20 UTC
Ah, I missed the sip_module_dir part of your report.
You're right, that's in meta-oe but that layer also does not use the YP bugzilla (yet!) so could you send them a patch or report the issue on the email list:
  https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded